Skip to content

fix(provider): catalog none without --reasoning; -c after exec - #84

Merged
cursor[bot] merged 3 commits into
devfrom
cursor/catalog-no-reasoning-dd00
Aug 27, 2026
Merged

cursor[bot] merged 3 commits into
devfrom
cursor/catalog-no-reasoning-dd00

Conversation

@xjoker

@xjoker xjoker commented Aug 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Two custom-provider launch bugs that showed up against real gateways:

  1. Catalog advertised thinking levels for every slug. Cursor-style composer-2.5 /models rows expose a fast parameter, not reasoning effort. The generated Codex catalog still listed low…max. Codex then snaps an unset effort to low and sends reasoning.effort, which some gateways return as 404 not_found on POST /responses. Models without saved --reasoning now catalog as effort: none and supports_reasoning_summaries: false. Thinking models still advertise low…max when an effort is saved. -c model_reasoning_effort=none is not sent.

  2. Codex 0.149 ignores -c in front of exec. codex -c model_provider=… exec talks to api.openai.com (401 Missing bearer). codex exec -c … applies the provider. launch now puts provider overrides after exec / resume / …, and moves user flags that preceded the subcommand with them (launch or -- -m one-shot exec hi becomes codex exec -c … -m one-shot hi). Interactive launch (no subcommand) still has them in front. --json launch closes inherited stdin so exec does not wait on a pipe.

Test plan

  • cargo clippy --all-targets -- -D warnings
  • cargo test --lib chatgpt_argv_ / provider_argv_
  • cargo test --test test_launch_passthrough

CLI (isolated homes, real OpenRouter key + local mock /models):

  • Mock 4-row catalog: --fetch-models keeps local/chat-small + local/chat-plus, drops embedding/rerank
  • OpenRouter 417: --fetch-models rejected (gateway listed 417 models; pass --model)
  • launch or exec: nano reasoning effort: none → ping; r1 high → ping

TUI (codex-switch tui, same binary):

  • Add mockgw, f fetch: only the two chat slugs; ←/→ sets local/chat-plus to high; save
  • Edit or, f: red gateway listed 417 models; pass --model to pick slugs; list stays 2 slugs
  • Launch picker: nano (skip), r1 high; extra exec … ping starts Codex with provider: or, reasoning effort: none, isolated CODEX_HOME under $CODEX_SWITCH_HOME/providers/or/codex-home
Open in Web Open in Cursor 

Catalog entries with no saved effort list only none and set
supports_reasoning_summaries false so Codex does not send
reasoning.effort. That 404s gateways such as Cursor composer-2.5.

Co-authored-by: lolitaupdate <[email protected]>
@xjoker
xjoker marked this pull request as ready for review August 27, 2026 08:12
Codex 0.149 ignores `codex -c … exec` and falls back to api.openai.com.
Provider launch now emits `codex exec -c …`; interactive launch keeps
overrides in front. `--json launch` closes inherited stdin so exec does
not wait on a pipe.

Co-authored-by: lolitaupdate <[email protected]>
@cursor cursor Bot changed the title fix(provider): do not advertise thinking levels without --reasoning fix(provider): catalog none without --reasoning; -c after exec Aug 27, 2026
Codex 0.149 ignores options in front of exec, including user flags
such as -m. Splice now finds the subcommand even when it is not the
first token, puts -c after it, and moves those preceding flags with
it. Tests expect that after-exec order.

Co-authored-by: lolitaupdate <[email protected]>
@cursor
cursor Bot merged commit 477a763 into dev Aug 27, 2026
4 checks passed
@xjoker
xjoker deleted the cursor/catalog-no-reasoning-dd00 branch September 9, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants