Skip to content

Codex through Ollama

Use this route when Codex is the coding harness and Ollama supplies its local or cloud model. It is distinct from native Codex authentication/model selection.

Connect and launch

pip install jsat
cd /path/to/project
jsat index .
jsat connect ollama tool=codex
jsat ollama --tool codex                 # interactive selector

Choose an exact local or cloud model when needed:

ollama pull qwen2.5:0.5b      # or any tag from `ollama list`
jsat ollama --tool codex -m qwen2.5:0.5b

ollama signin
jsat ollama --tool codex -m <model>-cloud

The chosen model belongs to the launched process and does not change JSAT's direct provider. Local models need one pull for the exact tag; cloud models need sign-in and no pull.

Use and verify

Inside Codex:

$jsat status
$jsat query find the checkout entry point

Ask Codex to call jsat__get_index_status, then verify its displayed model. This checks MCP and model routing independently.

Managed lifecycle

jsat start codex --via ollama --model qwen2.5:0.5b
jsat ps
jsat restart codex
jsat stop codex
jsat resume codex
jsat resume codex --session SESSION_ID

Troubleshooting

If an error reports an Ollama model with provider: openai, the provider/model pair is mixed. Use this launcher for Ollama-supplied Codex, native Codex for Codex-owned models, or jsat ai use ollama --model MODEL for direct JSAT calls.