Codex CLI uses OpenAI’s Responses API, not /v1/chat/completions. The GetVibe integration requires wire_api = "responses"; a chat-completions base URL copied into a generic SDK example is not a substitute. The generated setup is maintained in Codex CLI docs and can be refreshed from /api/integrations/codex.toml.
Install and set the key
Install the CLI and create its config directory. Keep the API key in the environment, not inside the TOML file:
npm install -g @openai/codex
mkdir -p ~/.codex
export GETVIBE_API_KEY="your-dashboard-key"Add this provider block to ~/.codex/config.toml:
model = "gpt-5.6-luna"
model_provider = "getvibe"
model_reasoning_effort = "medium"
model_reasoning_summary = "auto"
model_context_window = 786432
[model_providers.getvibe]
name = "GetVibe"
base_url = "https://getvibeapi.com/v1"
env_key = "GETVIBE_API_KEY"
wire_api = "responses"
request_max_retries = 4
stream_max_retries = 5
stream_idle_timeout_ms = 600000Do not put $GETVIBE_API_KEY in the TOML value. Codex reads the variable named by env_key; text inside a config file is not shell-expanded. For a team-managed setup, provision the environment variable through the shell profile or secret manager that launches Codex.
Choose a model that supports Responses
The generated Codex config is built from the published catalog and recommends a coding model plus profiles for fast and deep tasks. Before selecting another model, check that it is listed for the Responses API and has the context limit you intend to set. On the catalog snapshot checked October 3, 2026, GPT-6 Luna is $0.0055 input · $0.0274 output per 1M tokens, GPT-6 Sol is $0.1096 input · $0.548 output per 1M tokens, and GPT-6.1 Sol is $0.1096 input · $0.548 output per 1M tokens per million input and output tokens. Each value is rendered from the live model page.
A profile is useful when task classes have different cost and reasoning needs. Keep a fast profile for summaries or commit messages, and a deeper profile for cross-file changes. The project’s generated config demonstrates this pattern and updates its recommended IDs as the public catalog changes. Do not hand-edit a context window to exceed the model page’s supported limit: Codex can then send an oversized request that fails upstream.
Verify with a read-only repository task
Start Codex in a disposable checkout. Ask it to explain one function without editing. Confirm it is using the GetVibe provider and that the request completes. Then ask for a small patch with explicit permission review. If the CLI says a provider is missing, check the exact table name and that model_provider matches it. If authentication fails, verify GETVIBE_API_KEY in the same shell that launches Codex.
When the response says it cannot use tools, first verify the selected model’s Responses support and the CLI version. A model ID being visible on the general catalog does not imply every protocol is available for it. Keep the exact model ID in logs so a tool failure can be distinguished from an endpoint or auth failure.
Control context and agent cost
Codex reads repository files and sends tool results back as part of its conversation. Exclude generated output and dependency directories through ignore settings, ask it to inspect only relevant paths, and avoid repeating a huge specification in each prompt. The cost of an agent task includes every turn, not just the final patch. Compare dashboard usage after a representative task with the model page’s input and output rates.
For a fair model comparison, keep the same repository commit, prompt, approval policy, and tests. Use a bug fix and a cross-file task, then score test success and number of repair turns. GPT-6 Luna’s catalog rate on October 3, 2026 is shown at $0.0055 input · $0.0274 output per 1M tokens; the actual request bill depends on how much context and output the task uses.
Profiles and safe defaults
Start with medium reasoning for a normal coding task, then compare low for speed and high for difficult reasoning where the model supports those settings. More reasoning can increase output usage. Avoid setting a huge global context by habit; the generated file picks a measured model-specific window. Keep Codex’s approval behavior enabled until you understand what commands it proposes.
If the CLI starts successfully but never reaches GetVibe, inspect the effective config, not just the file you edited: Codex may be launched with another profile or config location. Run a harmless request, check usage in the dashboard, and only then use it on a valuable repository.
Use profiles for repeatable task classes
Codex profiles let a team keep one provider while changing the model and reasoning effort for a task. A fast profile can summarize a diff or draft a commit message; a deep profile can investigate a multi-file failure. Keep the profile name in the command your team documents so that two developers do not unknowingly compare different defaults. Profiles should use model IDs that are currently published and compatible with Responses.
The generated GetVibe config provides a pattern for fast and deep profiles, but it can change as the recommendation changes. Refresh it from the documented endpoint rather than copying an old model context limit. Codex may compact history according to the configured context window, so a window larger than the route accepts can turn long tasks into request errors instead of useful context.
Keep repository context focused
Before launching the agent, check that ignore rules exclude package caches, build outputs, generated API clients, and large fixtures. Tell Codex which package or test to inspect first. For a bug, ask it to reproduce the failure, name the files it plans to change, then make the smallest patch and run the test. This reduces repeated tool output and makes the result easier to review.
For a fair cost comparison, run the same prompt on the same commit. Include a task that needs no edit so you can see whether the agent respects the boundary, and a task that requires a test run so you can count repair loops. Record token usage and whether the patch passed, not just the final response length.
Reasoning and output budgets
Use the lowest reasoning effort that meets your quality target. High effort is useful for some planning tasks but can increase latency and output usage. Set an output budget large enough for the requested patch and explanation without leaving it unlimited. When the response stops early, inspect the finish reason before repeating the entire request; a targeted continuation may use less context.
Keep automatic command approvals conservative. Codex can propose a destructive shell command or change files outside the intended scope. Review the diff and test output before accepting it, even when the reasoning summary sounds confident.
Common errors
- Wrong endpoint: base URL must end in
/v1, andwire_apimust beresponses. - 401: export
GETVIBE_API_KEYin the process environment; TOML does not expand shell variables. - Context error: match
model_context_windowto the chosen model’s published page. - Tool behavior differs: test a Responses-compatible model and keep the CLI version current.
For JSON request fields, see Messages and Responses; for balances and metering see usage docs.
