Tawa docs

Codex

Scan Codex requests by pointing OPENAI_BASE_URL, or a custom model provider in config.toml, at your Tawa Guard proxy URL with an OpenAI API key.

Codex appends /responses to the base URL, so the value must end in /v1, which the OpenAI form of the proxy URL does.

export OPENAI_BASE_URL="https://proxy.tawaguard.com/<token>/openai/v1"
export OPENAI_API_KEY="<your OpenAI key>"
codex

Replace <token> with your proxy token.

Custom provider in config.toml

If your Codex version does not use OPENAI_BASE_URL, define a custom provider in config.toml. The file then contains the token, so keep it out of version control.

model_provider = "tawa"

[model_providers.tawa]
name = "Tawa Guard proxy"
base_url = "https://proxy.tawaguard.com/<token>/openai/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
requires_openai_auth = false
supports_websockets = false

What to know

  • Use an OpenAI API key. The OpenAI entry forwards only to api.openai.com. Codex signed in with ChatGPT sent requests to a different backend in the version tested (codex-cli 0.167.0-alpha.3.2), so those requests cannot go through the proxy.
  • Keep supports_websockets = false. The proxy handles HTTP and server-sent events.
  • The API-key path with a live OpenAI key was not tested.

This setup was not run end to end against the hosted proxy. Check a request in Monitoring before you rely on it.

On this page