Skip to content
InfercomInfercomInfercom Documentation

Terminal Tools

Codex CLI Integration Guide

Configure OpenAI Codex CLI with Infercom's EU sovereign inference. Agentic coding assistant with Responses API support and full GDPR compliance.

Codex CLI is OpenAI’s open-source agentic coding assistant that runs in your terminal. It can read files, write code, run commands, and iterate on its work using the Responses API.

Terminal window
npm install -g @openai/codex

Verify installation:

Terminal window
codex --version

Codex CLI supports custom providers via a TOML configuration file.

Terminal window
export INFERCOM_API_KEY="your-infercom-api-key"

Create ~/.codex/config.toml:

# Define Infercom as a provider
[model_providers.infercom]
name = "Infercom (EU Sovereign)"
base_url = "https://api.infercom.ai/v1"
env_key = "INFERCOM_API_KEY"
wire_api = "responses"
# Default profile using MiniMax-M2.7
model_provider = "infercom"
model = "MiniMax-M2.7"

Run Codex in any project directory:

Terminal window
codex

You should see Codex start with:

model: MiniMax-M2.7
provider: infercom

Use MiniMax-M2.7 - optimized for agentic coding with 192K context and built-in reasoning.

Start Codex in your project directory:

Terminal window
cd your-project
codex

Type your request and Codex will:

  • Read relevant files
  • Write or edit code
  • Run terminal commands
  • Iterate until the task is complete
  • “Add error handling to the login function”
  • “Write unit tests for the User class”
  • “Refactor this file to use async/await”
  • “Find and fix the bug causing the test to fail”

For scripted or one-shot use, use the exec subcommand:

Terminal window
codex exec "Add input validation to auth.py"

Full ~/.codex/config.toml reference:

# Default model to use
model = "MiniMax-M2.7"
# Provider to use
model_provider = "infercom"
# Approval mode: "suggest" (default), "auto-edit", or "full-auto"
approval_mode = "suggest"
# Sandbox mode for command execution
sandbox = "docker" # or "none" to disable
[model_providers.infercom]
name = "Infercom (EU Sovereign)"
base_url = "https://api.infercom.ai/v1"
env_key = "INFERCOM_API_KEY"
wire_api = "responses"
Mode Behavior
suggest Shows diffs and asks before applying (default)
auto-edit Automatically applies file changes, asks for commands
full-auto Automatically applies all changes

Verify your configuration:

Terminal window
# Check API key is set
echo $INFERCOM_API_KEY
# Test API directly
curl -s https://api.infercom.ai/v1/responses \
-H "Authorization: Bearer $INFERCOM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"MiniMax-M2.7","input":"Hello"}' | jq .status

Expected output: "completed"

Ensure the model name is exact (case-sensitive): MiniMax-M2.7

MiniMax-M2.7 runs at 400+ tokens/sec. If responses seem slow:

  1. Check your network connection
  2. Large context (many files) increases processing time
  3. First request may be slower due to model loading
Feature Benefit
EU Sovereign Data processed in Germany, GDPR compliant
Responses API Native support for Codex’s agentic architecture
Fast inference 400+ tokens/sec with MiniMax-M2.7
No vendor lock-in Open-source tool, standard API
  • Aider - Alternative terminal-based tool
  • OpenCode - Modern TUI with similar features
  • Responses API - API documentation for custom integrations