Codex mistakenly downloads oss model that already exists locally
What version of Codex is running?
codex-cli 0.80.0
What subscription do you have?
pro
Which model were you using?
qwen2.5-coder:32b
What platform is your computer?
Linux 6.8.0-90-generic x86_64 x86_64
What issue are you seeing?
According to https://docs.ollama.com/integrations/codex, Codex can use local Ollama models with its --oss <model_name> flag. However, if I specify a model that I've already downloaded to my localhost using ollama pull <name>, Codex attempts to re-download it. As these models can be quite large, this is a huge waste of resources.
What steps can reproduce the bug?
- Download a model using ollama. e.g.
ollama pull qwen2.5-coder:32b - Run codex with this model, e.g.
codex --oss qwen2.5-coder:32b. - Notice codex tries to redownload the model, e.g.
localhost:~$ ollama list
NAME ID SIZE MODIFIED
codellama:34b 685be00e1532 19 GB 2 hours ago
deepseek-coder-v2:16b 63fb193b3a9b 8.9 GB 2 hours ago
deepseek-coder:33b acec7c0b0fd9 18 GB 2 hours ago
qwen3-coder:30b 06c1097efce0 18 GB 4 hours ago
qwen2.5-coder:32b b92d6a0bd47e 19 GB 6 hours ago
qwen3:14b 7d7da67570e2 9.3 GB 8 months ago
localhost:~$ codex --oss qwen2.5-coder:32b
Downloading model: total 12.85 GB
0.38/12.85 GB (2.9%) 104.7 MB/s
What is the expected behavior?
If the ollama model is listed under ollama list then codex shouldn't redownload the model.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗