Skip to content

feat: run Data on its own Google key - #12

Merged
EthanThatOneKid merged 1 commit into
mainfrom
data-gemini-key
Sep 25, 2026
Merged

EthanThatOneKid merged 1 commit into
mainfrom
data-gemini-key

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

Data's self-hosted agent now answers with google/gemini-2.5-flash on the DATA_GEMINI_API_KEY secret, replacing the free OpenRouter handle that the shared free pool kept rate-limiting.

What changed

  • lib/zo-secrets.ts — the one-off OPENROUTER_API_KEY alias becomes PROVIDER_ALIASES + applyProviderAliases, so every prefixed secret is copied onto the canonical name the Letta harness reads. Now covers DATA_GEMINI_API_KEY -> GEMINI_API_KEY.
  • channels/http/index.ts — uses the table, narrows the named load to both provider key pairs, and logs which aliases it applied.
  • lib/zo-secrets.test.ts — covers the alias table (copy, no-clobber, nothing-to-do).
  • channels/http/README.md, services/http-api.md — record the second key and the verification.

Verification

  • Bare-env start of channels/http/index.ts logged provider: exported DATA_OPENROUTER_API_KEY as OPENROUTER_API_KEY, DATA_GEMINI_API_KEY as GEMINI_API_KEY, and POST /ask answered from channels/http/index.ts with a citation.
  • letta --backend local model set google/gemini-2.5-flash then model get showed the handle; a headless turn answered. google/gemini-3.5-flash on this free-tier key returns 429 at 5 requests/minute, so the agent runs google/gemini-2.5-flash.
  • npm test 24 pass, npm run typecheck clean.

…o its canonical name

Data's self-hosted agent now runs google/gemini-2.5-flash on DATA_GEMINI_API_KEY
instead of a free OpenRouter handle that the shared free pool kept rate-limiting.

The Letta harness reads provider keys under their canonical names only, so the
one-off OPENROUTER_API_KEY alias becomes PROVIDER_ALIASES +
applyProviderAliases in lib/zo-secrets.ts, covering DATA_GEMINI_API_KEY ->
GEMINI_API_KEY as well. Adds the missing test coverage for the alias table and
records the verification in services/http-api.md.
@wazoocomputer

wazoocomputer Bot commented Sep 25, 2026

Copy link
Copy Markdown

This pull request updates Data to use its own Google Gemini key, replacing the previously used OpenRouter key. This change addresses rate-limiting issues experienced with the shared free pool. The core change involves modifying how API keys are handled, specifically by introducing PROVIDER_ALIASES and applyProviderAliases to correctly map prefixed secrets to their canonical names for the Letta harness.

File Path Change Type Summary
channels/http/README.md modified Updated API key documentation
channels/http/index.ts modified Implemented provider alias application and logging
lib/zo-secrets.test.ts modified Added tests for provider alias logic
lib/zo-secrets.ts modified Introduced provider alias constants and application logic
services/http-api.md modified Updated documentation for new API key handling and verification

Reviewers, please start by examining lib/zo-secrets.ts to understand the new key aliasing mechanism.

@wazoocomputer

wazoocomputer Bot commented Sep 25, 2026

Copy link
Copy Markdown

This pull request updates Data to use its own Google Gemini key, replacing the previously used OpenRouter key. This change addresses rate-limiting issues experienced with the shared free pool. The core change involves modifying how API keys are handled, specifically by introducing PROVIDER_ALIASES and applyProviderAliases to correctly map prefixed secrets to their canonical names for the Letta harness.

File Path Change Type Summary
channels/http/README.md modified Updated API key documentation
channels/http/index.ts modified Implemented provider alias application and logging
lib/zo-secrets.test.ts modified Added tests for provider alias logic
lib/zo-secrets.ts modified Introduced provider alias constants and application logic
services/http-api.md modified Updated documentation for new API key handling and verification

Reviewers, please start by examining lib/zo-secrets.ts to understand the new key aliasing mechanism.

@EthanThatOneKid
EthanThatOneKid merged commit f6c68c2 into main Sep 25, 2026
1 check passed
@EthanThatOneKid
EthanThatOneKid deleted the data-gemini-key branch September 25, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant