fix: restrict quota routing to verified ChatGPT providers - #77
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chatgpt_oauth/codex-quota-router plansThe original router only filtered provider type during discovery. Its execution guard later trusted cached
providerNames, and theplanscommand accepted arbitrary aliases. A stale or manually injected non-OpenAI provider could therefore enter the routing pool.Validation
npm run validatepackages/codex-quota-router/mods/index.tswith Bunplans anthropicis rejected as ineligiblesarah,chatgpt-cameron,chatgpt-jin, andchatgpt-plus-pro) are allchatgpt_oauth/byokrecords from/v1/providers👾 Generated with Letta Code