Allow --oss / --local-provider to use user-defined [model_providers] entries
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start with codex-rs/config/src/config_toml.rs and trace validate_oss_provider, ensure_oss_provider_ready, and get_default_model_for_oss_provider; check the related tests and how user-defined [model_providers.<id>] entries are loaded. Confirm --oss --local-provider <id> accepts a configured provider while readiness checks and default model behavior remain as described. Done when the issue’s proposed cases are covered by tests.
Written by the indexing model from the issue text.
Description
What variant of Codex are you using?
CLI
What feature would you like to see?
Let --oss / --local-provider (and oss_provider in config.toml) accept any provider ID that the user has defined under [model_providers.<id>], not only lmstudio and ollama.
Today validate_oss_provider (codex-rs/config/src/config_toml.rs) rejects every other ID with Invalid OSS provider '<id>'. Must be one of: lmstudio, ollama. A user who runs a different local OpenAI-compatible server can already reach it through a custom [model_providers.*] entry plus model_provider = "<id>", but cannot use the --oss flow for it.
Proposed behavior:
codex --oss --local-provider <id>accepts<id>when[model_providers.<id>]exists in the user's config.- The built-in readiness checks in
ensure_oss_provider_readystay specific tolmstudioandollama; for user-defined providers, Codex skips setup, as it already does for unknown IDs. get_default_model_for_oss_providerreturnsNonefor user-defined providers, so the user's configuredmodelis used.
This would cover requests for individual local runtimes without Codex having to maintain each one, for example #47189 (osaurus).
Additional information
I maintain Rapid-MLX, an open-source OpenAI-compatible inference server for Apple Silicon, so I'm one of the runtimes that would use this. A config that works today without --oss:
model_provider = "rapid-mlx"
model = "qwen3.8-27b-4bit"
[model_providers.rapid-mlx]
name = "Rapid-MLX"
base_url = "http://127.0.0.1:8000/v1"
With this change, codex --oss --local-provider rapid-mlx would work with the same entry.
- Dominant language
- Rust
- Stars
- 136k
- Forks
- 21.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 998
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
bug extension mcp
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
app documentation skills
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
openai/codex#62895 · 1 comment ·
Maintainers usually reply within 1 day
-
app bug sandbox windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
CLI enhancement sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
Maintainers usually reply within 1 day
-
bug CLI performance
Difficulty 1/5 Under an hour Newbie friendliness 83/100
openai/codex#62286 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
topgrade-rs/topgrade#2540 ·
Maintainers usually reply within 1 day
-
Invalid JSON options for ngram and edge_ngram silently use defaultsPossibly taken @Tilendlesa claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
noemaforge/vimanam#153 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day