Repository navigation
Conversation
Probes Codex CLI for a working model when the user's configured default isn't available on their subscription. Tries the user's config first, then falls through gpt-5.3-codex and gpt-5.2-codex. Caches result for 24h at ~/.gstack/codex-model-cache. Returns "DEFAULT" (user config works), a model name (fallback), or "NONE" (exit 1). Supports --probe to force re-probe and configurable fallback list via gstack-config set codex_fallback_models.
Adds 2-line probe+guard to every codex bash block across templates and resolvers. Uses -c model="$CODEX_MODEL" (works for both codex exec and codex review). When probe returns NONE, existing Claude fallback paths activate. When DEFAULT, no model flag added. Updated sites: - codex/SKILL.md.tmpl: Step 0.5 + error handling - scripts/resolvers/review.ts: 4 sites (OH voice, adversarial, structured review, plan review) - scripts/resolvers/design.ts: 3 sites (design lite, sketch, voice) - autoplan/SKILL.md.tmpl: 1 probe + 3 phase commands
All 10 skills that use codex via review/design resolvers now include the model probe pattern in their generated output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
@16francej — recommend closing this PR as superseded by #1628. The branch hard-codes outdated model choices and may confuse authentication or network failures with unsupported models. Preserve contributor credit for the probing idea, but carry forward only bounded capability checks with explicit failure classification. |
Contributor
|
Thanks for this, @amoeri. This is now covered on main: Codex model resolution now goes request, then GSTACK_CODEX_MODEL, then config.toml, then the default, with a probe for unusable models (shipped in v1.91.16.0, #3014). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output. |
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
If your ChatGPT subscription doesn't include the model Codex defaults to, every
/codexinvocation silently failed and fell back to Claude reviewing itself. Thewhole point of Codex is an independent second opinion from a different AI. That was broken.
Probe-and-cache script (
bin/gstack-codex-model):gpt-5.3-codex→gpt-5.2-codexon "not supported" errorsgstack-config set codex_fallback_models11 invocation sites updated across 4 source files + 10 regenerated skills:
codex/SKILL.md.tmpl— Step 0.5 model probe + error handlingscripts/resolvers/review.ts— 4 sites (OH voice, adversarial, structured review, plan review)scripts/resolvers/design.ts— 3 sites (design lite, sketch, outside voice)autoplan/SKILL.md.tmpl— 1 probe + 3 phase commandsUses
-c model="$CODEX_MODEL"which works for bothcodex execandcodex review(discovered during review that
codex reviewdoesn't accept-m).Commits
feat: add gstack-codex-model probe-and-cache script— new bin/ scriptfeat: wire model probe into all codex invocation sites— templates + resolverschore: regenerate SKILL.md files from updated templates— 10 generated fileschore: bump version and changelog (v0.12.6.0)Pre-Landing Review
Reviewed via
/autoplan(CEO + Eng phases). 12 decisions made, 10 auto-decided,2 taste decisions confirmed by user (inline two-liners over helper abstraction,
manual verification over automated bash tests).
Key findings addressed:
-c model=not-m(codex review doesn't support -m)~/.codex/config.toml— probe the default directlyTest Coverage
Test plan
🤖 Generated with Claude Code