Open models can be used with OpenAI's Codex CLI through Ollama. This integration allows the tool to read, modify, and execute code within a user's working directory using open-weight alternatives.
By default, Codex utilizes the local gpt-oss:20b model when running locally. Users can switch to different models by specifying the -m flag during execution.
All models hosted on Ollama Cloud are compatible with the Codex integration. This ensures broader availability for developers utilizing cloud-based inference services.
The tool requires a large context window to function correctly. A minimum of 32K tokens is recommended, though specific documentation details how to adjust this length within Ollama.
For detailed setup instructions and configuration options, engineers should refer to the Codex integration guide.
Source: https://ollama.com/blog/codex



