cyberine
Providers

OpenAI API (Chat Completions + Responses)

  • Kind: raw API; the de-facto OpenAI-compatible standard Cyberine's LoopAgentAdapter targets
  • Official docs: https://developers.openai.com/api/docs (platform.openai.com/docs 301-redirects here)
  • Cyberine usage: reached via the LiteLLM gateway (openai/gpt alias) and is the API behind the Codex CLI.
  • Researched/verified: 2026-06-07 — confidence medium (gpt-5.x ids/pricing newer than the model's training cutoff; confirmed only via live fetch).

Base URL & auth

Base URLhttps://api.openai.com/v1
Auth headerAuthorization: Bearer <OPENAI_API_KEY> (+ optional OpenAI-Organization)
Keyshttps://platform.openai.com/api-keys

The openai Node SDK constructor accepts a custom baseURL — this is how Cyberine points the same client at LiteLLM/OpenRouter/DeepSeek without code changes.

Endpoints

Method + pathPurpose
POST /v1/chat/completionsClassic chat completions. The OpenAI-compatible interface Cyberine targets.
POST /v1/responsesNewer agentic API (state via previous_response_id, built-in tools). Default for new projects.
GET /v1/models, GET /v1/models/{id}Model catalog/metadata.
POST /v1/embeddingsEmbeddings (text-embedding-3-large/small, ada-002).
POST /v1/images/generationsImage gen (gpt-image-2).
POST /v1/batchAsync batch (50% cheaper).

Models (selected, Jun 2026)

Model idNotes
gpt-5.5Flagship 2026; 1M ctx; $5/$30 (cached input $0.50).
gpt-5.5-pro$30/$180.
gpt-5.4Affordable coding/pro; 1M ctx; $2.50/$15.
gpt-5.4-mini400K ctx; $0.75/$4.50.
gpt-5.4-nano$0.20/$1.25.
o3, o3-proReasoning models.
gpt-4.1, gpt-4.1-mini1M ctx; instruction + tool calling.
gpt-4o (-2024-11-20)128K ctx, 16384 max out; -2024-08-06 deprecated.
gpt-oss-120b / gpt-oss-20bOpen-weight.

openai/gpt in Cyberine config (LOOP_MODEL_B) is a placeholder, not a real id — override via the gateway.

Key request params

  • Chat Completions: model, messages, temperature, max_completion_tokens (use over deprecated max_tokens), stream + stream_options.include_usage, tools / tool_choice, response_format (json_object / json_schema), n, stop, top_p, penalties, logprobs, seed
  • Responses API: input (replaces messages), instructions (replaces system msg), max_output_tokens, previous_response_id, store, reasoning:{effort}, truncation, include

Notable features

  • Streaming SSE: chunks {choices:[{delta:{content|tool_calls}, finish_reason}]}, terminated by data: [DONE]; usage needs stream_options:{include_usage:true}.
  • Tool/function calling with strict:true schema adherence; arguments returned as JSON strings (must JSON.parse).
  • Structured Outputs (response_format:{type:'json_schema'}).
  • Responses API: agentic loop, built-in web/file search, computer use, code interpreter, remote MCP; better cache utilization.
  • Prompt caching (e.g. gpt-5.5 cached input 90% off), reasoning models (reasoning:{effort}), Batch API (50% off).

Gotchas

  • platform.openai.com/docs → developers.openai.com/api/docs (update hardcoded links).
  • max_tokens is deprecated → max_completion_tokens (Chat) / max_output_tokens (Responses).
  • n (multiple completions) not in Responses API.
  • Streaming usage requires explicit stream_options:{include_usage:true}.
  • Tool arguments are JSON strings, not objects.
  • gpt-4o-2024-08-06 deprecated → pin gpt-4o-2024-11-20.
  • Assistants API sunsets 2026-08-26 → migrate to Responses; v1/prompts shut down 2026-11-30.
  • Regional data-residency endpoints carry a 10% uplift for models released on/after 2026-03-05.

Pricing

Per 1M in/out (cached in), Standard tier, short context, verified live 2026-09-17: gpt-5.6-sol $4/$20 ($0.40); gpt-5.6-terra $2/$12 ($0.20); gpt-5.6-luna $0.20/$1.20 ($0.02); gpt-6-astra $10/$50 ($1.00). Table: https://developers.openai.com/api/docs/pricing

GPT-6 Sol and Luna (Codex rust-v0.156.1 model picker; kdhbf), verified live 2026-09-25 against the same table and the per-model pages /api/docs/models/gpt-6-sol, /gpt-6-luna, /gpt-6-astra: gpt-6-sol $2/$10 ($0.20), gpt-6-luna $0.10/$0.50 ($0.01), gpt-6-astra $10/$50 ($1.00); all three 1,050,000-token context, 128,000 max output, single snapshot each. All three are now in src/core/modelCatalog.ts and src/core/modelPricing.ts; no Cyberine default moved.

GPT-6.1 Sol, verified live 2026-10-02 against /api/docs/models/gpt-6.1-sol: $2/$10 ($0.10 cached, 5% of input where 6 Sol is 10%), 1,050,000-token context, 128,000 max output, single snapshot gpt-6.1-sol. Added to src/core/modelCatalog.ts, src/core/modelPricing.ts and the strength table (rank 5, model-strength.md).

Cyberine integration notes

Direct worker: loop-openai-build

loop-openai-build is a LoopAgentAdapter that calls https://api.openai.com/v1 directly (no gateway).

Env varDefaultPurpose
OPENAI_API_KEY(required)Enables the worker; absence skips it with a logged note.
OPENAI_BASE_URLhttps://api.openai.com/v1Override to point at a compatible endpoint.
OPENAI_MODELgpt-5.6-terraModel id passed to the adapter (default moved from gpt-4o in T643).

The worker is activated by including loop-openai-build in CYBERINE_BUILD_FLEET. It uses the /v1/chat/completions endpoint (streaming + tools + stream_options.include_usage); the Responses API is not used by LoopAgentAdapter.

Gateway path: LOOP_MODEL_B

OpenAI models are also reachable through the LiteLLM gateway (litellm.md) via LOOP_MODEL_B (e.g. openai/gpt-4o). This is the gateway route, separate from the direct key path above.

CLI workers

The Codex CLI worker (codex-cli.md) also targets OpenAI models; it uses the CLI binary rather than LoopAgentAdapter.

Sources