Make config.toml profiles selectable via CLI

Resolved 💬 8 comments Opened Oct 6, 2025 by jschmdt Closed Aug 5, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

  1. When called in Codex » this shortcut lists all custom providers you defined in confg.toml
  2. Switch easily between OpenAI and local providers "OpenAI", "Ollama" & "LM Studio"
  3. 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.

View original on GitHub ↗

8 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #3114
  • #3860
  • #4146
  • #4065

Powered by Codex Action

tom-nash · 6 months ago

I can't believe we still cannot do this.
Makes codex unusable for me with Azure.

etraut-openai contributor · 6 months ago

@tom-nash, most Azure users define a custom model provider within their config.toml. Does that not meet your needs?

tom-nash · 6 months ago

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

kdejaeger · 3 months ago

I'm going to try this simple bash autocomplete: https://www.perplexity.ai/search/9dcfce1c-10a1-4d83-9bc6-385a957daf44

steveepreston · 2 months ago

+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!!!

etraut-openai contributor · 23 days ago

Named configurations are selectable with --profile.

steveepreston · 21 days ago

What about Codex VSCode Extension?