Make config.toml profiles selectable via CLI
What feature would you like to see?
Custom Profiles in CLI – defined via config.toml
When I define a custom profile in the Codex config.toml like this:
[model_providers.lms]
name = "LM Studio"
base_url = "http://localhost:1234/v1"
[profiles.gpt-oss-120b-lms]
model_provider = "lms"
model = "gpt-oss:120b"
Make it available inside the model selector like this… See Screenshot of a mockup layout I created:
<img width="1023" height="324" alt="Image" src="https://github.com/user-attachments/assets/5cab4532-0b0e-4039-ae38-5a3318769a46" />
Behavior
- If a profile is defined via config.toml > make visible in the CLI /model selector
- If no profile is defined via config.toml > just show gpt-5-codex / gpt-5
1. gpt-5-codex (currrent)
2. gpt-5
3. custom-model-profile (only visible when defined)
Options in config.toml
To make it more concise, let the user add a small name description as well:
Option A:
Derivate the name directly from [profiles.gpt-oss-120b-lms] » Model name shown in CLI » gpt-oss-120b-lms
Option B
Let the user add a custom name and description inside the profile:
[profiles.gpt-oss-120b-lms]
model_provider = "lms"
model = "gpt-oss:120b"
👉 model_name="gpt-oss-120b"
👉 model_description="This is a custom description."
Other UX possibilities to implement this feature:
Implement this feature via a new shortcut /provider:
- When called in Codex » this shortcut lists all custom providers you defined in
confg.toml - Switch easily between OpenAI and local providers "OpenAI", "Ollama" & "LM Studio"
- When provider is selected » "/models" now lists all corresponding custom models like
gpt-oss-120b-lms(example mentioned earlier), etc.
Additional information
Would streamline the UX workflow for selecting models:
Instead codex --oss --profile gpt-oss-120b-lms » Just start codex and select the custom defined profiles and models.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can't believe we still cannot do this.
Makes codex unusable for me with Azure.
@tom-nash, most Azure users define a custom model provider within their
config.toml. Does that not meet your needs?No, unfortunately it doesn't
This issue is one of UX. As the OP mentioned, /models doesn't show the custom model provider list correctly.
Switching is not possible for custom providers without restarting the CLI with flags, which is ridiculous and does not meet my needs.
Open code gets the UX right for custom model providers if you need a reference.
I want to use Codex much more than open code, because they have their own issues - but the lack of model switching or automatic profile switching within the CLI is still stopping me.
Thanks for the response @etraut-openai
I'm going to try this simple bash autocomplete: https://www.perplexity.ai/search/9dcfce1c-10a1-4d83-9bc6-385a957daf44
+1 for this.
models list in Codex GUI does not show custom models defined in
.toml.❌ the MOST WORST thing: when you change model in
.toml, you MUST restart VSCode/Codex Extension!!! What a Terrible UX!!!Named configurations are selectable with
--profile.What about Codex VSCode Extension?