Ollama: "Model metadata for qwen3.6:27b not found" warning even though the model is available and Codex can use it
What version of Codex CLI is running?
0.130.0
What subscription do you have?
None - I am using an Ollama provider
Which model were you using?
qwen3.6:27b
What platform is your computer?
Linux x86_6
What terminal emulator and version are you using (if applicable)?
zsh
What issue are you seeing?
hen I start Codex CLI with Ollama and select qwen3.6:27b, Codex shows:
> Model metadata for qwen3.6:27b not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
However, the model is present in Ollama and Codex is still able to use it successfully.
This makes it look like Codex does not have built-in metadata for this Ollama model slug and falls back to generic metadata.
What steps can reproduce the bug?
- Install/use Codex CLI
0.130.0 - Run Ollama locally
- Ensure the model exists:
```sh
ollama list
Example output includes:
qwen3.6:27b
- Start Codex with Ollama:
codex --oss --local-provider ollama -m qwen3.6:27b
or:
codex --dangerously-bypass-approvals-and-sandbox --oss -m qwen3.6:27b
- Observe the warning at startup
What is the expected behavior?
If Ollama serves the model successfully and Codex supports using arbitrary Ollama model slugs, Codex should either:
- recognize qwen3.6:27b without warning, or
- document that this warning is expected for newer/custom Ollama model slugs and clarify the practical impact
Additional information
Local checks from the same machine:
ollama --version
returned:
0.20.3
ollama show qwen3.6:27b
returned model details successfully, including architecture/context information.
ollama show --modelfile qwen3.6:27b
shows that Ollama serves it with:
RENDERER qwen3.5
PARSER qwen3.5
I also verified that Codex can execute a simple prompt against qwen3.6:27b; the warning does not prevent basic usage, but it suggests degraded behavior/performance.
This looks related to missing Codex-side metadata for the specific model slug rather than an Ollama availability problem.
Possibly related issue:
- #14757
3 Comments
There's all sorts of problems, for responses, codex sends invalid request params see: https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/1576
Got around that with
Slug has to match, so pay attention if using litellm etc.
Via litellm -> lm studio
apply_patch_tool_typemattered"apply_patch_tool_type": "function",I don't have the patience to trial and error/brute force my way through this schema.
If you try pulling keys schema validation will fail
@hsiong the harness only knows the shape of openai models and concepts, you have supply you're own custom definition so codex features know how to construct the shape of the request back to ollama,
-local-provider ollamawill give you requests sent to https://docs.ollama.com/api/openai-compatibility but that's it.It won't use ollama to get model info though so you will need:
model_catalog_json = "~/.codex/model-catalog.local.json"and define a model with the slugqwen3.6:27bschema info https://github.com/openai/codex/issues/14757#issuecomment-4456527070 I don't use ollama's endpoint, they may gracefully handle codex requests, but I highly doubt it. Make sure you are actively tailing ollama so you know how your session is degraded, even if you fix that warning. You will be sending invalid params from codex, they will either get dropped or fail.
Thanks, that clarifies it.
I understand now that
-local-provider ollamaonly routes requests to Ollama’s OpenAI-compatible endpoint; it does not make Codex read model metadata from Ollama.So I need to define my own local model catalog entry, for example:
with a model slug like:
I’ll also tail the Ollama logs while testing, since Codex may still send unsupported OpenAI-style params that Ollama might drop or reject.