fix(providers): resolve the Codex auto-ping model from the live catalog instead of a retired id - #12361
Merged
diegosouzapw merged 2 commits intoSep 2, 2026
Conversation
The opt-in Codex quota auto-ping (diegosouzapw#6977/diegosouzapw#6995) pinned its ping model to `gpt-5.1-codex-mini` in src/shared/constants/quotaAutoPing.ts. OpenAI shut that model down on 2026-07-23 and the repo's own lifecycle registry (open-sse/services/modelLifecycle.ts + config/quality/model-lifecycle.json) already rejects it on the request path, but the scheduler never consulted that gate: every window slide sent the dead id through the real executor, the failure landed in the 15-minute cooldown, and the same id was retried forever. The feature could no longer warm a window, and any future retirement of a pinned id would regress it the same way. The ping model is now resolved per tick from the provider catalog and the lifecycle registry: the first base-model entry (effort-suffixed variants are skipped because the ping sets `reasoning.effort` itself) that `isModelSelectable("codex", id)` allows, which is the same provider-scoped gate chatCore applies. The registry import stays lazy, like the executor import, because this module is on the instrumentation boot path (diegosouzapw#12074). When nothing in the catalog is selectable, the provider is paused before any throttle slot, usage read, or executor call, with one warning per state change instead of a blind retry loop. Closes diegosouzapw#11905 Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
…apw#12361 Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
pacocartones
added a commit
to pacocartones/OmniRoute
that referenced
this pull request
Sep 1, 2026
pacocartones
force-pushed
the
fix/codex-quota-ping-model
branch
from
September 1, 2026 23:28
e9cae75 to
1cdc758
Compare
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
gpt-5.1-codex-minias its ping model. OpenAI shut that model down on 2026-07-23 and the repo's own lifecycle registry already rejects it on the request path, but the scheduler never consulted that gate, so every window slide sent a dead id, hit the 15-minute failure cooldown, and retried the same id forever.isModelSelectable("codex", id)allows, the same gate chatCore uses). The registry import stays lazy because this module is on the instrumentation boot path (fix(backend): dev bundlers exhaust memory on oversized shared import graphs #12074).Related Issues
Validation
tests/unit/quota-auto-ping.test.ts22/22;instrumentation-import-graph-12074+hard-session-lease-bypass-inventory9/9;npm run typecheck:core0;git diff --checkclean;npm run check:changelog-integrityOKnpm run lint— repository-wide eslint exit 0 (run with--pass-on-unpruned-suppressions; the literal command reports only pre-existing unused global suppressions on this base)release/v3.8.51@158647618; focused checks rerun afterwardTDD: the three new tests fail on the base (resolver missing; the no-model case still emits
throttle, fetch, throttle, fetch) and pass with the fix; reverting only the production hunks makes exactly those three fail again.Tests Added Or Updated
tests/unit/quota-auto-ping.test.ts: three new tests: the resolver returns a catalog model that the lifecycle gate accepts and that is not the retired id; the tick sends the runtime-resolved model (not a hardcoded one); an empty or retired catalog pauses the provider with no throttle slot, usage read, executor call, or DB write on the first and later ticks.Coverage Notes
src/lib/services/quotaAutoPing.tsandsrc/shared/constants/quotaAutoPing.tsare covered bytests/unit/quota-auto-ping.test.ts(all 19 existing tests still pass; the new resolver, the pause path, and the change-only logging state are exercised directly).typecheck:coredoes not include this service; a scratch type-check of the two production files shows only errors that already exist on the base (getProviderConnectionsassignment here and two incredentialRefresh.ts).Reviewer Notes
gpt-5.6-sol), matchinggetDefaultModel; effort-suffixed variants are skipped because the ping already sendsreasoning.effort: "none". No new model literal is introduced, per the issue and the maintainer's comment. If a lighter model such asgpt-5.6-terrais preferred, that is a one-line ordering rule.QuotaAutoPingDepsgains a requiredresolvePingModelandQuotaAutoPingStategainspingModelCache; the only real constructor iscreateDefaultQuotaAutoPingDeps().open-sse/services/backgroundTaskDetector.tsstill mapsgpt-5.1-codextogpt-5.1-codex-mini, andcodexToolOptions.tsstill lists retired ids; separate concerns.