Skip to content

docs: custom API providers (PR-5) - #71

Merged
xjoker merged 3 commits into
cursor/provider-tui-add-remove-5a91from
cursor/provider-docs-5a91
Aug 26, 2026
Merged

docs: custom API providers (PR-5)#71
xjoker merged 3 commits into
cursor/provider-tui-add-remove-5a91from
cursor/provider-docs-5a91

Conversation

@xjoker

@xjoker xjoker commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #70 (cursor/provider-tui-add-remove-5a91). Last PR in the custom API providers series. Retarget to dev after #67#70 merge.

What this is

User-facing documentation for saving a third-party API endpoint (OpenRouter, or another Responses-capable gateway) and launching Codex with it. No product-code changes except the wiki-page list in tests/test_distribution_contract.rs.

Pages

  • New wiki page docs/wiki/Providers.md: add/list/show/remove, launch overlay (codex -c + child env, zero writes to ~/.codex), OpenRouter example, DeepSeek-via-gateway, disabling Codex's built-in web_search for third-party models, TUI two-tab add/remove, storage (0700/0600), no-argv key contract, MCP preserved, non-goals.
  • Sidebar, Home, Feature guide, Command reference, Configuration, Architecture, FAQ, Troubleshooting (incl. Server tool request failed row), Getting started, Chinese guide, Developer onboarding.
  • README.md / README_CN.md, docs/CHANGELOG.md.

End-to-end tested against real OpenRouter

Verified with the real codex CLI 0.149.1 and a live OpenRouter key (isolated CODEX_HOME/CODEX_SWITCH_HOME, key never in argv, deleted after):

  • Switching mechanism: -c overlay applied, base-config MCP survives, key injected via env only, auth.json never touched.
  • Real Codex round-trips through OpenRouter on multiple models: minimax/minimax-m3:free (free), mistralai/mistral-nemo (cheap), openai/gpt-4o-mini.
  • Finding now documented: Codex enables its built-in web_search server tool by default; most third-party models reject it with HTTP 400 Server tool request failed. Fix: top-level web_search = "disabled" (or -c web_search=disabled).

Out of scope (still)

  • Provider use / persisting a key into live auth.json
  • Direct Chat Completions vendors (DeepSeek official API)
  • Provider quota in the TUI

Verification (local, CODEX_SWITCH_HOME / CODEX_HOME unset)

  • cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings — ok
  • cargo test --all — all green (wiki link/anchor + navigation contract tests included)

Format and audit CI on this stack stays red until #63 merges.

Open in Web Open in Cursor 

Document provider add/list/show/remove, launch overlay, TUI two-tab
add/remove, OpenRouter and DeepSeek-via-gateway, and the no-argv key
contract. Wiki page plus README, command reference, architecture, and
changelog.

Co-authored-by: xJoker <xjoker@users.noreply.github.com>
@xjoker
xjoker marked this pull request as ready for review August 26, 2026 02:38
cursoragent and others added 2 commits August 26, 2026 03:02
…models

End-to-end testing against OpenRouter showed Codex enables its built-in
web_search server tool by default, which most third-party models reject
with HTTP 400 'Server tool request failed'. Document the top-level
web_search='disabled' config (and -c override), plus the note that some
reasoning models impose their own request requirements.

Co-authored-by: xJoker <xjoker@users.noreply.github.com>
…etting

Smoke-tested DeepSeek and Kimi (thinking + non-thinking) over OpenRouter.
web_search rejection is model-specific, not universal: deepseek-v3.2,
kimi-k2, and minimax-m3:free accept it (HTTP 200); gpt-oss-20b rejects it
(400). Thinking models (deepseek-r1, kimi-k2-thinking) need
model_reasoning_effort set or they 400 with 'Reasoning is mandatory'.
Reword from 'most models' to model-specific, and document the reasoning
effort override.

Co-authored-by: xJoker <xjoker@users.noreply.github.com>
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