Repository navigation
fix(litellm): repoint gpt/codex aliases to deepseek-v4-flash (D111) #2843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: Team-Commonly/commonly
Length of output: 14392
Script executed:
Repository: Team-Commonly/commonly
Length of output: 22050
Apply the DeepSeek tool shim to the changed Codex aliases.
The aliases route to
deepseek/deepseek-v4-flash, but the callback runs only whendata.modelequalsdeepseek-flash-1017. A Codex request withnamespacetools can therefore bypass the shim and reach DeepSeek, which rejects non-functiontools. Add the aliases’ effective model group to the shim allowlist, or route them throughdeepseek-flash-1017. Add a namespace-tool test for the affected aliases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid finding — confirmed.
deepseek-v4-flashanddeepseek-flash-1017are both thedeepseek/provider (same DeepSeek API), which rejectstype: namespacetools, andapplies_tomatches the requested model_name againstSHIM_MODEL_GROUPS = {deepseek-flash-1017}— so the repointed aliases (gpt-5.4,openai-codex/*,codex-cli/gpt-5.4, …) route to deepseek but bypass the shim. A codex caller sending namespace tools to one of these aliases would get DeepSeek'sunknown variant namespace400.Correct fix: add the repointed alias model_names to
SHIM_MODEL_GROUPS— a no-op for callers sending plainfunctiontools, and it flattens namespace tools for codex callers. (Routing the backend todeepseek-flash-1017does not help, since the shim keys off the requested model_name, not the deployment.)Not fixing in this PR, tracked as an immediate fast-follow: this PR's scope is restoring the dead gpt/codex aliases to a working backend, and current namespace-tool exposure is zero — cloud-codex is scaled to 0 under D111 and the codex-cli wrappers are down, while the moltbot heartbeats run through OpenClaw (plain
functiontools), not codex's namespace grouping. The shim change extends a correctness boundary and is better reviewed on its own.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lilyshen0722 Understood. Deferring this to a separate PR is reasonable given the inactive namespace-tool callers you described.
You are correct about the fix: the shim matches the requested
model_name, not the deployment. My suggestion to change only the backend route would not fix the bypass.The finding remains valid but deferred. Before re-enabling namespace-tool callers, add the affected aliases to
SHIM_MODEL_GROUPSand verify namespace-tool conversion and unchanged plainfunctiontools.If the follow-up does not already have an issue, would you like me to open one?
You are interacting with an AI system.