Rensei docs
Providers

OpenAI / Codex Provider

OpenAI/Codex model provider configuration.

Rensei integrates with OpenAI's reasoning models via the Codex CLI. The Codex provider is optimized for code generation, reasoning, and complex problem-solving tasks.

Provider Summary

AttributeValue
Provider IDcodex
Display nameOpenAI Codex
Config namespaceopenai
Supported auth modesbyok, metered, shared, host-session
Requires endpointNo
CategoryCloud

A model profile may include any subset of these modes in its auth_modes array. The resolver prefers byok > metered > shared > host-session. The effective allowed set is filtered by the org and project access policy. See Auth Modes for the resolution algorithm.

Available Models

Rensei's catalog includes:

  • GPT-5 (gpt-5) - Latest OpenAI reasoning model. Up to 128K context window.
  • GPT-4 (gpt-4o) - High-capacity reasoning model. 128K context window.

The Codex provider routes these models through the OpenAI Codex CLI, which adds reasoning and extended thinking capabilities.

Check rensei catalog list --provider codex to see the current list.

Auth Modes

BYOK

Bring your own OpenAI API key:

  1. Get an API key from platform.openai.com/api-keys.
  2. In Settings → Integrations, click Add Provider and select OpenAI / Codex.
  3. Paste your API key and click Test Connection.
  4. In Settings → Model Profiles, create a profile with auth mode byok and select an OpenAI model.

Your org is billed directly by OpenAI.

Metered

Platform supplies a managed API key. Your org is billed through Rensei's cost ledger. Metered mode must be enabled for your organization by the platform operator - see Auth Modes for details.

Setup (user):

  1. In Settings → Model Profiles, create a profile with auth mode metered and an OpenAI model.
  2. Dispatch runs if your org is entitled; contact Rensei support to enable metered mode.

Shared

Free-tier platform key for trials. No setup required; quota is soft-limited per org per day.

  1. In Settings → Model Profiles, create a profile with auth mode shared and an OpenAI model.
  2. Dispatch runs if quota allows; returns SHARED_QUOTA_EXCEEDED otherwise.

Host-Session

Use OAuth credentials already logged in on your developer machine.

  1. Run rensei setup and authenticate with OpenAI.
  2. In Settings → Model Profiles, create a profile with auth mode host-session.
  3. Dispatch from the same machine where you ran rensei setup.

Note: Only works with local capacity pools (providerId='local'). Dispatching to cloud sandboxes (e2b, Vercel, Modal) will fail.

Configuration

Context Window Override

By default, Rensei uses the model's native context window. Override at dispatch time:

{
  "providerConfig": {
    "openai": {
      "contextWindow": 64000
    }
  }
}

This is useful if you want to limit tokens for cost or latency reasons.

Service Tier

Control request routing priority:

{
  "providerConfig": {
    "openai": {
      "serviceTier": "auto"
    }
  }
}

Options:

  • auto - Default; OpenAI optimizes routing.
  • fast - Prioritized; higher cost.
  • flex - Flexible; lower cost.

Reasoning Budget

GPT-5 and GPT-4o support configurable reasoning effort via extended thinking:

  • low - Quick answers with minimal reasoning overhead.
  • medium - Balanced; default reasoning depth.
  • high - Extended thinking for complex problems.

Set reasoning effort in the profile's Reasoning Effort dropdown or via API:

{
  "effort": "high"
}

Example Profile: Code Generation

rensei profile create \
  --name "openai-code-generation" \
  --provider codex \
  --model-id "gpt-5" \
  --auth-mode byok \
  --scope project \
  --project-id my-project

Then in a workflow LLM node:

nodeId: code_generation
nodeType: action/llm.inference
config:
  profileId: prof_openai_code_generation
  systemPrompt: "You are an expert software engineer. Generate clean, tested code."
  tools:
    - type: "code_execution"
      enabled: true

Pricing

View pricing in the model catalog:

rensei catalog show gpt-5 --format json | jq .pricing

Example:

{
  "inputPerMTokenCents": 2.50,
  "outputPerMTokenCents": 10.00
}

GPT-5 is more expensive than GPT-4 but offers superior reasoning. Use work-type routing to keep GPT-5 only for reasoning-heavy stages (QA, acceptance).

For metered mode, cost events are automatically emitted with the org ID for billing.

Troubleshooting

"No metered key is configured for provider 'codex'"

The platform's metered key pool for OpenAI is not configured. Contact your Rensei operator - deployment-level key pool setup is covered in the operator docs.

"Organisation is not entitled to use metered auth mode"

The org's metered_enabled feature flag is not set. Contact Rensei support to enable metered mode for your organization.

"AUTH_MODE_REQUIRES_LOCAL_CAPACITY"

You're dispatching a host-session profile to a cloud sandbox. Use a cloud-compatible auth mode (BYOK, metered, shared) or dispatch to a local pool.

Model not found in catalog

The model ID is correct but not in your catalog yet. Add it:

rensei catalog create \
  --provider codex \
  --model-id "gpt-5" \
  --display-name "GPT-5"

Request rate-limited

If you're hitting OpenAI rate limits, reduce request frequency or upgrade your OpenAI account tier. For metered mode, contact support to increase quota.

Further Reading

On this page