VS Code model picker changes model but keeps custom model_provider
What version of the IDE extension are you using?
26.602.71036
What subscription do you have?
Pro 20x
Which IDE are you using?
VS Code
What platform is your computer?
Linux 7.0.11-200.fc44.x86_64 x86_64 unknown
What issue are you seeing?
The VS Code extension model picker changes only model, but keeps the previous custom model_provider.
I am using a custom Responses-compatible provider in ~/.codex/config.toml:
model = "gpt-oss:120b"
model_provider = "respawn"
model_reasoning_effort = "xhigh"
[model_providers.respawn]
name = "Respawn"
base_url = "http://192.168.1.134:8080/v1"
experimental_bearer_token = "local-dev-key"
wire_api = "responses"
This works with the custom provider. However, if I use the VS Code extension model picker to switch to GPT-5.5, the extension rewrites only:
model = "gpt-5.5"
but leaves:
model_provider = "respawn"
This creates an invalid configuration: the extension then tries to call the custom provider with model = "gpt-5.5" instead of switching back to the built-in OpenAI provider.
What steps can reproduce the bug?
- Configure a custom provider in
~/.codex/config.toml:
model = "gpt-oss:120b"
model_provider = "respawn"
model_reasoning_effort = "xhigh"
[model_providers.respawn]
name = "Respawn"
base_url = "http://192.168.1.134:8080/v1"
experimental_bearer_token = "local-dev-key"
wire_api = "responses"
- Reload VS Code.
- Start a new Codex thread in the VS Code extension.
- Confirm the custom provider/model works.
- Open the model picker under the composer.
- Select
GPT-5.5.
- Inspect
~/.codex/config.toml.
The config becomes:
model = "gpt-5.5"
model_provider = "respawn"
What is the expected behavior?
The model picker should treat model and model_provider as a pair.
Expected behavior could be one of:
- Selecting a built-in OpenAI model such as
GPT-5.5should also setmodel_provider = "openai".
- The picker should expose provider + model together, for example
OpenAI / GPT-5.5andRespawn / gpt-oss:120b.
- Custom provider models should remain selectable in the picker after switching away from them.
At minimum, the extension should not create an invalid mixed config where a built-in OpenAI model is sent to a custom provider.
Additional information
Codex VS Code extension version: 26.602.71036
The CLI/custom provider config itself works. The issue appears specific to the VS Code extension model picker mutating only model while preserving model_provider.
Related issues:
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗