Repository navigation
[dup] fix(providers): drop image_generation for gpt-5.3-codex-spark (#6651) - #6819
Closed
alltomatos wants to merge 1 commit into
Closed
alltomatos wants to merge 1 commit into
alltomatos wants to merge 1 commit into
Conversation
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.
Problem
Codex Desktop (and the Codex CLI) inject the Responses hosted tool
image_generationinto every request. On the native Codex Responses passthrough path, OmniRoute preserves that hosted tool unless the account is detected as a free plan.gpt-5.3-codex-sparkrejectsimage_generationupstream, so a paid account routing to spark fails with an upstream HTTP 400 — the tool is forwarded even though spark can never run it.Root cause
normalizeCodexTools()dropsimage_generationonly when itsdropImageGenerationoption istrue, and the Codex executor derived that flag solely from the plan type:image_generationis a member ofCODEX_HOSTED_TOOL_TYPESand is preserved for any non-free plan (open-sse/executors/codex/tools.ts). Spark's per-model incompatibility was never considered here — spark is only special-cased for quota/rate-limit scope inopen-sse/config/codexQuotaScopes.ts.Fix
Gate
dropImageGenerationon the spark scope as well as the free plan, via a small, testable predicate co-located with the other Codex tool-gating helpers:getCodexModelScope()already recognizesgpt-5.3-codex-spark(and reasoning-suffixed variants likegpt-5.3-codex-spark:high) as scope"spark", so the fix reuses existing spark detection rather than re-implementing it. The#2980free-plan behavior is unchanged; only the additional spark condition is new.Minimal surface: 1 production file (
open-sse/executors/codex.ts, +16/-1) plus a new unit test. No change tonormalizeCodexTools()itself — only how the executor derives the flag.Verification
TDD — the test fails on the unfixed tree and passes after the fix.
Neighboring Codex suites remain green:
Lint clean on changed files:
npm run typecheck:corereports only two pre-existing errors in unrelatedomniglyphcompression files (optional module not installed locally);codex.tstype-checks clean.Diff summary
open-sse/executors/codex.ts— addshouldDropCodexImageGeneration()predicate; use it at thenormalizeCodexTools()call site instead ofisCodexFreePlan()alone.tests/unit/codex-spark-image-generation-6651.test.ts— new regression test (spark-paid drop, free-plan [Feature] Add Codex OAuth Login Compatibility Mode for ChatGPT Account + API Routing #2980 guard, paid non-spark preserve, end-to-endnormalizeCodexTools).Closes #6651.
Thanks for the great work on OmniRoute!