BlazeInferDocs
Integrations

Codex

Use BlazeInfer models in OpenAI Codex through the LiteLLM proxy.

SupportedTested with: Through LiteLLM 1.108.4

Codex is OpenAI's coding agent for the terminal. Use it with BlazeInfer models through LiteLLM: set up the LiteLLM proxy with your BlazeInfer models, then point Codex at the proxy.

Prerequisites

  • The LiteLLM proxy running with your BlazeInfer models, as in the LiteLLM guide. This page assumes it runs on http://localhost:4000 with a model named deepseek-v4.1-flash.
  • Your LiteLLM key: the proxy's master_key or a virtual key. If the proxy has no master_key, any value works. Your BLAZE_API_KEY stays on the proxy.

Point Codex at the proxy

File: ~/.codex/config.toml

model = "deepseek-v4.1-flash"
model_provider = "litellm"

[model_providers.litellm]
name = "LiteLLM"
base_url = "http://localhost:4000/v1"
env_key = "LITELLM_API_KEY"
wire_api = "responses"
  • model is a model_name from your LiteLLM config.
  • env_key names the environment variable that holds your LiteLLM key.
  • Keep wire_api = "responses"; LiteLLM converts the requests for BlazeInfer.

Set the key and start Codex:

export LITELLM_API_KEY="sk-your-litellm-key"
codex

Choose a model with a large context window; coding agents send long prompts.

On this page