[Bug]: v0.14.0 (research preview) silently ignores --profile and custom model_providers, falls back to OpenAI

Open 💬 0 comments Opened Jun 12, 2026 by mwaxman1

What version of Codex CLI is running?

codex-cli 0.14.0 (research preview)

Which model were you using?

deepseek-v4-pro:cloud via Ollama (custom model_provider ollama-launch)

What platform is your computer?

Linux 6.17.0-35-generic x86_64 (Ubuntu 24.04)

What subscription do you have?

Ollama Max (Ollama Cloud subscription), not OpenAI

Bug description

Codex 0.14.0 silently ignores --profile and custom model_providers configuration. When invoking with --profile ollama-launch -m deepseek-v4-pro:cloud, codex displays:

model: codex-mini-latest
provider: openai

...instead of the configured model: deepseek-v4-pro:cloud / provider: ollama-launch. It then attempts to call OpenAI's API, which fails with 401 Unauthorized since no OpenAI credentials are configured.

This is a regression from 0.139.0, which correctly routes to the custom provider.

Steps to reproduce

  1. Install codex 0.14.0: pnpm add -g @openai/codex@0.14.0
  2. Configure a custom provider in ~/.codex/ollama-launch.config.toml:
model = "deepseek-v4-pro:cloud"
model_provider = "ollama-launch"
model_reasoning_effort = "high"
approval_policy = "never"
sandbox = "danger-full-access"

[model_providers.ollama-launch]
name = "Ollama"
base_url = "http://localhost:11434/v1/"
wire_api = "responses"
  1. Ensure Ollama is running: ollama serve (listening on localhost:11434)
  2. Run: codex --profile ollama-launch -m deepseek-v4-pro:cloud exec "Say hello"

Expected behavior

model: deepseek-v4-pro:cloud
provider: ollama-launch

Request goes to http://localhost:11434/v1/ using the configured model provider.

Actual behavior

model: codex-mini-latest
provider: openai

Request goes to OpenAI's Responses API, fails with 401 Unauthorized.

Full error output

[2026-06-12T13:27:02] OpenAI Codex v0.14.0 (research preview)
--------
workdir: /tmp/codex-smoke-test
model: codex-mini-latest
provider: openai
approval: never
sandbox: read-only
reasoning effort: medium
reasoning summaries: auto
--------
[2026-06-12T13:27:02] User instructions:
Reply with only "PONG" and nothing else.

[2026-06-12T13:27:04] stream error: unexpected status 401 Unauthorized: {
  "error": {
    "message": "Missing bearer or basic authentication in header",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}; retrying 1/10 in 218ms…
[... 10 retries, all 401 ...]
ERROR: unexpected status 401 Unauthorized

Workaround

Pin to 0.139.0: pnpm add -g @openai/codex@0.139.0

0.139.0 correctly routes --profile ollama-launch to the custom provider. This bug is specific to the 0.14.0 research preview release.

Related issues

This is the same class of bug as #987 and #1043 (early research preview versions also ignored custom providers and fell back to OpenAI), but those were in v0.1.* builds. The regression reappears in 0.14.0.

View original on GitHub ↗