Repository navigation
feat(cx): add reasoning effort variants for GPT-5.5 and GPT-5.4 - #865
Open
mugnimaestra wants to merge 2 commits into
Open
mugnimaestra wants to merge 2 commits into
mugnimaestra wants to merge 2 commits into
Conversation
Add withCodexEffortVariants() helper and generate -xhigh, -high, -low, -none model entries for gpt-5.5 and gpt-5.4 in the Codex provider. Consumer tools using @ai-sdk/openai-compatible (e.g. opencode) cannot pass 'none' or 'xhigh' reasoning effort because the SDK's zod schema only validates ['low', 'medium', 'high']. The model name suffix approach (gpt-5.5-xhigh) bypasses SDK validation entirely since reasoningEffort never appears in the request body — the effort level is encoded in the model name, which codex.js already parses and strips generically.
Contributor
Author
|
Updated this branch after review. Current scope:
Related but not exact duplicates: #748 / #668 are model-catalog cleanup requests; #718 / #717 / #812 cover Codex OAuth/request-contract/account availability; #836 covers review-model quota handling. |
Contributor
Author
|
Hi @decolua, when you have a chance, could you please take a look? I updated the PR with upstream Codex-aligned effort aliases and focused tests. Thanks! |
This was referenced May 4, 2026
Closed
|
Any update on this? |
|
Any update? I am doing this manually myself, everytime I update 9Router I add patches fixes that adds this. But it would be great if it was native in 9Router... |
golamrabbi696
added a commit
to golamrabbi696/EzRouter
that referenced
this pull request
Aug 12, 2026
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
withCodexEffortVariants()helper function (analogous towithCodexReviewModels()) that auto-generates-xhigh,-high,-low,-nonemodel entries for specified Codex modelsgpt-5.5andgpt-5.4in thecxprovider, generating 8 new model entries (4 effort levels × 2 models)codex.js— the executor already handles suffix stripping generically (line 184-192)Motivation
Consumer tools like opencode use
@ai-sdk/openai-compatible(Vercel AI SDK), which validatesreasoningEffortagainstz.enum(["low", "medium", "high"]). This meansnoneandxhighare rejected by the SDK before the request even reaches 9router.The model name suffix approach (e.g.
gpt-5.5-xhigh) bypasses SDK validation entirely becausereasoningEffortnever appears in the request body — the effort level is encoded in the model name, whichcodex.jsalready parses and strips generically at lines 184-192:Without server-side model entries for
gpt-5.5-xhigh,gpt-5.5-none, etc., consumers using the Vercel AI SDK cannot accessnoneorxhighreasoning effort for GPT-5.5 and GPT-5.4.This is an oversight —
gpt-5.3-codexalready has all effort variants manually enumerated, butgpt-5.5andgpt-5.4were added as quick 1-line entries without them.What Changed
open-sse/config/providerModels.jsCODEX_EFFORT_LEVELSconstant andwithCodexEffortVariants(modelIds)helper function — a higher-order function (likewithCodexReviewModels) that expands targeted model entries into effort level variantswithCodexReviewModels()in thecxprovider:New models generated
gpt-5.5-xhighgpt-5.5-highgpt-5.5-lowgpt-5.5-nonegpt-5.4-xhighgpt-5.4-highgpt-5.4-lowgpt-5.4-noneEach of these also gets a
-reviewvariant viawithCodexReviewModels()(e.g.gpt-5.5-xhigh-review).Why a helper function instead of manual entries?
["gpt-5.5", "gpt-5.4", "gpt-6.0"])(xHigh),(High),(Low),(None)suffixeswithCodexReviewModels()— effort variants also get-reviewvariants automaticallygpt-5.3-codex-*variants are unaffected (they're not in the target set)Related Issues
Testing
The executor's suffix parsing (
codex.jslines 184-192) is model-name-agnostic — it works on any model name ending with-xhigh,-high,-low,-medium, or-none. No executor changes needed.