Skip to content

Make config.toml profiles selectable via CLI #4849

Description

@jschmdt

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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions