mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 18:05:31 +02:00
fix: default cross-model workflows to frontier models
This commit is contained in:
@@ -64,6 +64,19 @@ export const OPENAI_LITMUS_CHECKS = [
|
||||
*/
|
||||
export const CODEX_WEB_SEARCH_FLAG = `-c 'web_search="cached"'`;
|
||||
|
||||
/**
|
||||
* Default model for gstack-owned Codex invocations.
|
||||
*
|
||||
* Conductor's current Codex CLI default may lag the frontier model exposed to
|
||||
* agents, so gstack pins its own default and lets users override it per shell
|
||||
* with GSTACK_CODEX_MODEL or per invocation with an explicit `-c model=...`.
|
||||
* The -c form is accepted by both `codex exec` and `codex review`.
|
||||
*/
|
||||
export const CODEX_FRONTIER_MODEL = 'gpt-6-astra';
|
||||
export const CODEX_MODEL_CONFIG_FLAG = `-c "model=\\"\${GSTACK_CODEX_MODEL:-${CODEX_FRONTIER_MODEL}}\\""`;
|
||||
// Native review prefers review_model over model when the user has pinned it.
|
||||
export const CODEX_REVIEW_MODEL_CONFIG_FLAG = `${CODEX_MODEL_CONFIG_FLAG} -c "review_model=\\"\${GSTACK_CODEX_MODEL:-${CODEX_FRONTIER_MODEL}}\\""`;
|
||||
|
||||
/**
|
||||
* Shared Codex error handling block for resolver output.
|
||||
* Used by ADVERSARIAL_STEP, CODEX_PLAN_REVIEW, CODEX_SECOND_OPINION,
|
||||
@@ -151,7 +164,7 @@ Branch on the echoed \`CODEX_MODE\`:
|
||||
- **\`under_codex\`** — this session is already running INSIDE a Codex host, so spawning codex again is the same model reviewing itself at multiplied token cost (#2519). Print exactly one line: "[running under Codex — nested codex passes skipped; set GSTACK_FORCE_CODEX_REVIEW=1 to force]" and skip the codex invocations below; run the section's free in-host pass instead if it defines one.
|
||||
- **\`not_authed\`** — installed but no credentials. Print: "Codex installed but not authenticated — falling back to a Claude subagent (same model family, not an outside model). Run \`codex login\` or set \`$CODEX_API_KEY\`." Fall back to the Claude subagent path.
|
||||
- **\`broken_install\`** — the CLI is on PATH but cannot execute (spawn ENOENT, non-executable binary, missing vendor payload). Print: "Codex is installed but its binary cannot run — Codex passes skipped. Reinstall: \`npm install -g @openai/codex\`." Relay the probe's HINT lines and fall back to the Claude subagent path. This state exists because a missing binary used to land in the model probe's fail-open bucket and report \`ready\`, so every Codex pass was skipped silently (#2742).
|
||||
- **\`model_unusable\`** — authed but the account cannot use its configured model (#2477: HTTP 400 on every call, usually a stale \`model =\` pin in \`~/.codex/config.toml\`). Relay the probe's HINT lines, tell the user the one-line fix (update the pin; \`[notice.model_migrations]\` names the replacement), and fall back to the Claude subagent path. The ~10s round trip is cached for 1h; timeouts fail open to \`ready\`.
|
||||
- **\`model_unusable\`** — authed but the account cannot use gstack's selected Codex model (#2477: HTTP 400 on every call). Relay the probe's HINT lines, tell the user the one-line fix (set \`GSTACK_CODEX_MODEL=<supported-model>\` or pass an explicit \`-c model=...\` override), and fall back to the Claude subagent path. The ~10s round trip is cached for 1h; timeouts fail open to \`ready\`.
|
||||
- **\`ready\`** — run the Codex pass below.`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user