Skip to content

feat(openrouter): multi labeled API-key token accounts (port 0.45 #2271)#225

Closed
Finesssee wants to merge 1 commit into
mainfrom
port/045-openrouter-multi-key
Closed

feat(openrouter): multi labeled API-key token accounts (port 0.45 #2271)#225
Finesssee wants to merge 1 commit into
mainfrom
port/045-openrouter-multi-key

Conversation

@Finesssee

@Finesssee Finesssee commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Port upstream CodexBar 0.45 #2271: enable multiple labeled OpenRouter API keys via the existing token-account switcher.

Changes

  • Token accounts: OpenRouter is now a supported token-account provider (OPENROUTER_API_KEY env injection, sk-or-v1-... placeholder).
  • Desktop fetch: build_fetch_context prefers the active token-account key over a stored api_keys.json value so account switching is not shadowed by a default key.
  • OpenRouter provider: already reads FetchContext.api_key first — no provider logic change required.
  • CLI: codexbar account ... openrouter works via support catalog; usage injects the active (or --account label/index) key for env-backed token accounts.
  • Tests: multi-key env resolution, labeled --account lookup, and FetchContext precedence (token vs stored).

Stacked multi-account cards remain the existing token-account UI; no new stacked-card surface was added.

Commands run

  • cargo test --manifest-path rust/Cargo.toml openrouter_
  • cargo test --manifest-path rust/Cargo.toml test_token_account_support
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml fetch_context_openrouter

Notes


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

…eipete#2271)

Enable labeled OpenRouter API keys via token accounts, prefer the active
token-account key over stored api_keys, and add usage --account selection.
@github-actions

Copy link
Copy Markdown

This repository allows each user to open at most 4 pull requests per 7 days.

Closing this automatically.

@github-actions github-actions Bot closed this Jul 21, 2026
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