Repository navigation
feat(provider): save per-provider Codex config overrides - #73
Merged
xjoker merged 5 commits intoAug 26, 2026
Merged
Conversation
Providers can now carry extra `codex -c KEY=VALUE` overrides (`provider add --set`, repeatable) that launch applies automatically, so model-specific Codex settings like `web_search=disabled` or `model_reasoning_effort=medium` no longer have to be retyped on every launch. Overrides are stored verbatim in provider.toml and layered on top of the model selection at launch. Codex, not codex-switch, remains the source of truth for valid keys/values: only KEY=VALUE shape is validated, values pass through untouched. Co-authored-by: xJoker <[email protected]>
Co-authored-by: xJoker <[email protected]>
`provider add --reasoning <effort>` saves model_reasoning_effort=<effort> and `--no-web-search` saves web_search=disabled, lowering the barrier for the two most common model-specific settings. They are shortcuts over --set: any value passes through to Codex unchecked (the effort set is Codex's to define), and an explicit --set for the same key still wins. Co-authored-by: xJoker <[email protected]>
After the model step the wizard offers a reasoning-effort single choice (default "(skip)") and a web_search on/off toggle, both saved into the provider's codex_config. Presets cover the common efforts; the CLI --set stays the escape hatch for any other value. Co-authored-by: xJoker <[email protected]>
…steps Co-authored-by: xJoker <[email protected]>
xjoker
marked this pull request as ready for review
August 26, 2026 05:01
cursor Bot
pushed a commit
that referenced
this pull request
Aug 26, 2026
Brings the whole custom-API-provider stack (#67-#73) up to date with dev (webbrowser 1.2.4, pay-per-use credits column, etc). The only conflict was src/tui/ui.rs: kept both dev's credits_table_* helpers and the provider tab/panel renderers, and merged the test-module imports. Full suite: 1019 passed. Co-authored-by: xJoker <[email protected]>
cursor Bot
pushed a commit
that referenced
this pull request
Aug 26, 2026
Real dev already carries #67 (provider store) and #72 (env config). Re-merged the true dev HEAD and resolved the add/add conflicts in provider.rs / cli.rs / commands/provider.rs by keeping the provider-docs full-feature versions (verified supersets of dev's #67). environment.json (#72) merged in cleanly. This PR now cleanly adds #68-#73 (launch / TUI / docs / codex overrides) that are not yet in dev. Full suite: 1019 passed. Co-authored-by: xJoker <[email protected]>
xjoker
added a commit
that referenced
this pull request
Aug 26, 2026
Completes the custom API provider feature. #67 (profiles store + CLI) and #72 (Cloud Agent environment) are already on dev; this adds the remaining pieces as a single clean commit on top of dev so the repo's rebase-and-merge can apply it without conflicts: - launch <provider>: codex -c overrides + env-injected API key (never argv, never ~/.codex/auth.json) - TUI Accounts/Providers tabs + add/remove provider wizard - per-provider Codex overrides: --set KEY=VALUE, --reasoning, --no-web-search, and matching TUI wizard steps (values passed to Codex verbatim) - provider documentation (docs/wiki/Providers.md, etc.) The original per-PR history is preserved in the already-merged #68-#73. Full suite: 1019 passed. Co-authored-by: xJoker <[email protected]>
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.
目的
让 provider 保存 Codex 启动 overrides,
launch时自动作为codex -c KEY=VALUE注入,省得用户每次手敲-- -c ...。在此之上提供语义化便捷选项,降低配置门槛。典型用途:给某些第三方模型固定web_search=disabled,或给思考模型固定model_reasoning_effort=medium。改动
存储 + 注入(底层)
ProviderProfile新增#[serde(default)] codex_config: Vec<String>,以"key=value"原样落盘到provider.toml。launch的codex_config_args()在 model 选择之后追加这些 override(层叠在用户~/.codex/config.toml之上,不写盘)。validate()只校验KEY=VALUE形状(含=且 key 非空);取值原样透传给 Codex,不硬校验枚举。provider list/show的 JSON 增加codex_config;show文本增加对应行(空则codex_config (none))。CLI
provider add --set KEY=VALUE(可重复)透传任意 override。provider add --reasoning EFFORT(→model_reasoning_effort=EFFORT)、--no-web-search(→web_search=disabled)便捷封装。冲突时显式--set覆盖便捷 flag。TUI 向导
←/→,默认(skip)不设)、web_search 开关(Space,默认保持开启)。选择落进codex_config。文档
Providers.md、Command-Reference.md记录--set/--reasoning/--no-web-search与 TUI 两步。底线
xhigh/max/ultra随 Codex 版本演进),未知值交给 Codex 报错;--set始终是任意 key 的逃生舱。契合"配置可替换、不硬编码"。验证
cargo fmt --check、cargo clippy --all-targets --all-features -- -D warnings、cargo test --all(1011 passed)全绿。validate拒绝无 key、codex_config落盘 round-trip;merge_codex_config翻译/覆盖/未知值透传;TUI 向导默认跳过与选择保存。test_distribution_contract wiki_通过。Base 是
cursor/provider-docs-5a91(栈式 PR)。