configuration file wipped

Resolved 💬 4 comments Opened Jul 31, 2025 by extremesecrecy Closed Oct 27, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator) responded on this thread — see the highlighted reply below.

What version of Codex is running?

_No response_

Which model were you using?

_No response_

What platform is your computer?

_No response_

What steps can reproduce the bug?

Every time that I change providers, the configuration json file gets reset loosing configuration.

What is the expected behavior?

Non-provider configuration should remain.

What do you see instead?

Complete file is regenerated from template.

Additional information

_No response_

View original on GitHub ↗

4 Comments

bolinfest collaborator · 1 year ago

The config file is ~/.codex/config.toml. The config.json is a legacy file.

extremesecrecy · 1 year ago

Well, that one is still not working.

# ==============================
# Codex CLI config for Ollama
# ==============================

[default]
provider = "ollama"

[profiles.ollama]
model = "mistral-small:latest"
provider = "ollama"

[model_providers.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
wire_api = "chat"

[models.mistral_small]
provider = "ollama"
model = "mistral-small:latest"

[models.qwen3]
provider = "ollama"
model = "qwen3:latest"

[models.codellama]
provider = "ollama"
model = "codellama:latest"

I cannot get it to work unless I hard code CODEX_OSS_BASE_URL=http://localhost:11434/v1 and I run it codex --oss -m mistral-small:latest. If I try the profile or by model, etc. It still tries to use OpenAi.

seratch member · 1 year ago
provider = "ollama"

Can you try model_provider = "ollama" instead?

etraut-openai contributor · 10 months ago

I presume this issue is no longer relevant, so I'm closing it. If you have related questions, feel free to post in the discussion forum.