Skip to content

fix: restrict quota routing to verified ChatGPT providers - #77

Merged
carenthomas merged 1 commit into
mainfrom
sarah/codex-plan-failover-mod
Aug 10, 2026
Merged

fix: restrict quota routing to verified ChatGPT providers#77
carenthomas merged 1 commit into
mainfrom
sarah/codex-plan-failover-mod

Conversation

@sarahwooders

Copy link
Copy Markdown
Contributor

Summary

  • persist the exact provider aliases discovered as non-base chatgpt_oauth
  • require both the current provider and selected destination to be members of that verified set before changing the conversation model
  • reject non-OpenAI and unknown aliases passed through /codex-quota-router plans
  • discard stale provider names when authoritative discovery returns no eligible ChatGPT OAuth providers

The original router only filtered provider type during discovery. Its execution guard later trusted cached providerNames, and the plans command accepted arbitrary aliases. A stale or manually injected non-OpenAI provider could therefore enter the routing pool.

Validation

  • npm run validate
  • bundled packages/codex-quota-router/mods/index.ts with Bun
  • runtime harness confirms an Anthropic conversation is not changed while an exhausted verified ChatGPT OAuth provider routes to another verified ChatGPT OAuth provider
  • runtime harness confirms plans anthropic is rejected as ineligible
  • verified the current cached aliases (sarah, chatgpt-cameron, chatgpt-jin, and chatgpt-plus-pro) are all chatgpt_oauth / byok records from /v1/providers

👾 Generated with Letta Code

Persist the exact non-base chatgpt_oauth provider set returned by discovery and require both source and destination aliases to belong to it, preventing stale or manually injected non-OpenAI providers from being routed.

See [trace](https://app.letta.com/chat/agent-57231da8-42f3-4523-b190-66c3eda21057?conversation=conv-202253d3-cebc-494f-9604-55ff0cfcda1d). Resume conversation with `letta --conv conv-202253d3-cebc-494f-9604-55ff0cfcda1d`

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
@sarahwooders
sarahwooders marked this pull request as ready for review August 7, 2026 00:44
@carenthomas
carenthomas merged commit dbcfa4a into main Aug 10, 2026
1 check passed
@carenthomas
carenthomas deleted the sarah/codex-plan-failover-mod branch August 10, 2026 22:40
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.

2 participants