---
title: "Use Augure with OpenAI Codex CLI"
description: "Run the OpenAI Codex CLI on Augure's Canadian, OpenAI-compatible API with a model_providers entry in config.toml."
tool: "OpenAI Codex CLI"
category: "agent"
canonical: "https://augureai.ca/docs/integrations/codex-cli"
updated: "2026-10-26"
verified: false
---
# Use Augure with OpenAI Codex CLI

You get the Codex terminal agent running on Augure models instead of OpenAI's, with inference on Canadian infrastructure. If you want a terminal agent built for Augure from the start, see [Augure Code](https://augureai.ca/docs/cli).

## Prerequisites

- Codex CLI installed (`npm install -g @openai/codex`).
- An Augure API key (`aug_sk_live_…`) from the [developer dashboard](https://chat.augureai.ca/developers/dashboard). Plans and pricing: [augureai.ca/developers](https://augureai.ca/developers).
- The key exported as `AUGURE_API_KEY`.

## Configure

Add a provider to `~/.codex/config.toml` and make it the default. `wire_api = "chat"` is required: Codex defaults to OpenAI's Responses API, which Augure does not expose.

```toml
# ~/.codex/config.toml
model = "ossington-5"
model_provider = "augure"
model_context_window = 256000
model_max_output_tokens = 32768

[model_providers.augure]
name = "Augure"
base_url = "https://api.augureai.ca/v1"
env_key = "AUGURE_API_KEY"
wire_api = "chat"
```

`env_key` names the environment variable Codex reads the key from; the key itself never goes in the file. Then:

```bash
export AUGURE_API_KEY=aug_sk_live_...
codex
```

To keep OpenAI as your default and switch per session, put the same two keys under a profile instead:

```toml
[profiles.augure]
model = "ossington-5"
model_provider = "augure"
```

```bash
codex --profile augure
```

You can also override from the command line without editing the file: `codex -c model_provider=augure -m rosedale-1`.

## Pick a model

| Model | When to use |
| --- | --- |
| `ossington-5` | Flagship reasoning. 256K context, 32,768 max output. Default for coding sessions. |
| `rosedale-1` | Premium reasoning, up to 1M context on paid plans, Canadian inference. Large repos, long agent loops. |
| `tofino-3` | Fast everyday model, 256K context, 16,384 max output, no thinking. Quick edits and questions. |

`model = "auto"` lets the gateway pick. On `ossington-5`, `reasoning_effort: "none"` turns thinking off; `low`, `medium` and `high` are accepted on reasoning models; `tofino-3` ignores it. Codex has a `model_reasoning_effort` setting, but whether it is sent on the `chat` wire API depends on the Codex version; if you need thinking off for speed, choose `tofino-3`. Full list: [/docs/models](https://augureai.ca/docs/models).

## Verify it works

Start `codex` and ask it something small, such as "list the files in this directory and summarize what the project does". The first reply confirms the provider is reachable. For the residency check, call the API once directly:

```bash test
curl -s https://api.augureai.ca/v1/chat/completions \
  -H "Authorization: Bearer $AUGURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tofino-3","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word OK."}]}'
```

The JSON ends with an `_augure` block, for example `"_augure": {"gateway_region": "ca-montreal-1", "inference_region": "ca-on-toronto", "request_id": "..."}`. `inference_region` tells you where the model ran. Inference is on Canadian infrastructure first, with disclosed failover to vetted EU partners under zero data retention, never the US.

## Notes

- Codex relies on tool calling for every file edit and shell command; Augure supports tools on `/v1/chat/completions`, and `ossington-5` and `rosedale-1` are the models to use for agent loops.
- Codex streams by default; Augure streams with `stream: true` and returns usage in the final chunk.
- Field names above (`name`, `base_url`, `env_key`, `wire_api`, `model_context_window`, `model_max_output_tokens`) follow the Codex configuration reference at the time of writing; check `codex --help` or the Codex docs if your version differs.
- OpenAI model aliases (`gpt-4o` to `ossington-4`, `gpt-4o-mini` to `tofino-3`) are accepted, but set `model` explicitly so Codex's context window settings match.

## See also

- [Augure Code](https://augureai.ca/docs/cli)
- [API reference](https://augureai.ca/docs/api)
- [Models](https://augureai.ca/docs/models)
- [MCP server](https://augureai.ca/docs/mcp)
- [IDE setup](https://augureai.ca/docs/ide)
- [Pricing](https://augureai.ca/pricing)
