Repository navigation
Conversation
Keep model-access errors on the account/model pair, make quota auto-ping use an operator-selected model, and require a completed ping response. Parse incremental SSE and preserve upstream failure statuses for image clients. Support explicit image aliases without assuming global model retirement.
Qurtison
pushed a commit
to Qurtison/9router
that referenced
this pull request
Sep 8, 2026
…e model failures and validate streams # Conflicts: # .env.example # open-sse/config/codexConstants.js # open-sse/handlers/imageProviders/codex.js # src/app/api/providers/[id]/models/route.js # tests/unit/image-generation.test.js
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.
Codex discovery can list a model while requests advertise an older client identity. Separately, a model-access 400/404 currently marks the whole connection unavailable, quota auto-ping hardcodes
gpt-5.5, and HTTP 200 streams can contain failures that are discarded or counted as successful pings.This change handles these paths together:
0.153.4across discovery, chat, images and credential probes. Preserve the original author of Jordannst's image identity change.CODEX_IMAGE_MODEL_ALIASESfor clients that cannot yet change image IDs. There is no automatic model rewrite. A model-access 404 does not establish global retirement or grant access to an alias target.Configuration, behavior and local fixture instructions are in
docs/CODEX_COMPATIBILITY.md. No dependencies or database schema change.Validation
Final commit:
1137fefc. All HTTP/browser evidence below uses synthetic local accounts and upstream responses, not a live-provider availability claim.npm test --prefix tests -- unit/codex unit/quota-auto-ping.test.js unit/image-generation.test.js unit/auth-status.test.js --exclude unit/codex-image-fetch.test.jsReproduction: copying the framing, model-health and quota auto-ping regression suites onto the previous PR head
3abca444produced 16 failed / 18 passed. The corresponding suites pass on this branch.npm run buildcompleted, including standalone asset copying. ESLint over changed JavaScript files has zero new findings compared with the previous implementation. It still reports three existingreact-hooks/set-state-in-effecterrors and four existing warnings. The expanded test run additionally reproduces two existing remote-image-inlining failures incodex-image-fetch.test.js; the same two fail at3abca444, so that file is excluded from the green command above rather than presenting the wider run as fully green.After building, start
node tests/fixtures/codex-http-server.cjs, then run:Actual output:
Browser verification against the built local dashboard: the synthetic account remains active with a separate model warning; selecting Sol persists to
/api/settingswhile keeping auto-ping disabled and account opt-ins unchanged. Injecting a fixture-only failed PATCH restores Sol after selecting Terra and displays “Could not save auto-ping settings”. The test server binds to loopback, creates a fresh temporary database and blocks external fetches.Operational notes
Model entitlement remains an upstream/account constraint. Operators must select an accessible ping model and explicitly choose any image alias target. Existing account errors from earlier requests can be rechecked with Test Connection One-by-One. SSE clients receive errors inside the already-open HTTP 200 stream; JSON/binary callers receive mapped HTTP failure statuses. Rollback is a code revert; remove the optional alias environment variable and saved
codexAutoPing.modelif returning to the previous policy. There is no data migration to reverse.