Repository navigation
fix(providers): keep reasoning tiers when a codex catalog sends objects - #14593
Merged
diegosouzapw merged 1 commit intoSep 24, 2026
Conversation
The Codex live catalog reports supported_reasoning_levels as objects
shaped {effort}, not plain strings. The parser kept only strings, so
every tier was dropped and a model that clearly supports reasoning
arrived with no effort list. Read the effort field off an object entry
and ignore entries that are neither a string nor that shape.
Collaborator
|
Clean, minimal fix — the |
diegosouzapw
merged commit Sep 24, 2026
6c90a3d
into
cheaper-inference:release/v3.8.51
9 of 16 checks passed
diegosouzapw
added a commit
to TPOHH/OmniRoute
that referenced
this pull request
Sep 29, 2026
Reconcile the discovered-tier routing with the tip's Codex reasoning work: - applyCodexReasoningSelection now owns the force-rule (cheaper-inference#13556) and enabled:false handling plus the reasoning key whitelist (cheaper-inference#13643), so the block removed from codex.ts is not lost. - Legacy caps use the tip's alias sets via getCodexAliasEffortCap. - Discovery uses readCodexReasoningMetadata as the single source for supportedThinkingEfforts/defaultThinkingEffort (drops the duplicate helper added with cheaper-inference#14593). - Thread runtimeModelInfo alongside resolvedThinkingEffort (cheaper-inference#13720). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.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
The Codex live catalog reports
supported_reasoning_levelsas objects shaped{effort: "high"}, not plain strings. The parser kept only strings, so every tier was dropped and a model that supports reasoning arrived with an empty effort list.gpt-6-solandgpt-6-lunahit this on a live account catalog fetched with client version0.155.0(2026-09-22): six and five tiers respectively, all objects.reasoningEffortValuenow reads a string as before, and reads.effortoff an object. A number,null, a blank string, or an object with the wrong field is dropped. This is not a per-model allowlist, so the next model that ships the same object shape keeps its tiers without another patch.Test plan
node --import tsx/esm --test --test-name-pattern "upstream sends objects|non-object reasoning" tests/unit/provider-models-discovery-split.test.ts— 2 passed{effort: low..ultra}plus an empty effort and a{value}entry resolves to the six real tiers[1, null, {effort: "high"}]resolves to["high"]onlyRelated to #14547. #14547 stays open. Fast Quality Gates and other inherited failures on
release/v3.8.51are base-red; this diff only touches the Codex catalog parser and its unit test.