OpenAI
Run Everruns agents on OpenAI models via the Responses API or Chat Completions, including Azure OpenAI and any OpenAI-compatible endpoint.
Everruns runs agents on OpenAI models through a uniform driver, mapping its provider-neutral messages, tools, and reasoning onto the OpenAI wire format. The same driver also powers any OpenAI-compatible endpoint through a custom base URL. For Azure deployments, use the dedicated Azure OpenAI provider instead.
What you get
Section titled “What you get”- Responses API (recommended), the default driver, with stateful
continuation and server-side context compaction on
api.openai.comand Azure OpenAI hosts. - Chat Completions: a compatibility driver (
openai_completions) for legacy integrations and OpenAI-compatible gateways. - Streaming, tool calls, and reasoning mapped to provider-neutral Everruns types, including extended thinking on reasoning models.
- Prompt caching via a deterministic cache key derived from the session (or agent, harness, organization) and model.
- Structured output: a direct model call can require a reply that matches
a JSON Schema, enforced by OpenAI (
text.formaton the Responses API,response_formaton Chat Completions). - Background mode for
xhighandmaxreasoning on OpenAI and Azure: the response keeps running at OpenAI if the connection drops or the worker running the turn restarts, and Everruns picks the stream back up instead of paying for the call twice. A cancelled turn cancels the response. Background mode stores the response, so organizations with zero data retention fall back to a normal streaming call. - WebSocket transport (opt-in): on
api.openai.com, a call can stream over OpenAI’s Responses WebSocket mode instead of HTTP streaming, keeping one connection open across the turns of a tool loop. OpenAI recommends it for theultrafastspeed tier. It is off by default; see WebSocket transport.
Configure in Everruns
Section titled “Configure in Everruns”- Go to Settings → Providers and click Add provider.
- Choose OpenAI (Responses API) for new setups, or OpenAI Completions for Chat Completions compatibility. For Azure, choose the dedicated Azure OpenAI provider instead.
- Paste your OpenAI API key. Get one from the OpenAI API keys page.
- (Optional) Set a base URL to target another OpenAI-compatible endpoint.
- Save. Everruns discovers available models automatically.
OpenAI-compatible endpoints
Section titled “OpenAI-compatible endpoints”The OpenAI driver works with any OpenAI-compatible API. Set the base URL to your endpoint. Self-hosted and proxy gateways are treated as stateless, so the driver replays the full transcript each turn instead of relying on server-side continuation. For Microsoft Azure deployments, use the dedicated Azure OpenAI provider, which is recognized as a stateful host.
WebSocket transport
Section titled “WebSocket transport”HTTP streaming (SSE) is the default. To use OpenAI’s
WebSocket mode
instead, opt in per call with the openai/websocket driver option set to
true (false opts a call out), or for a whole provider when you build it in
code:
use everruns_drivers::openai::OpenAIChatDriver;
let driver = OpenAIChatDriver::new().with_websocket_transport(true);Each turn of a tool loop continues on the connection the previous turn used,
sending only the new tool results. The transport applies to api.openai.com
only; Azure OpenAI and custom endpoints keep using HTTP streaming. If the socket
cannot connect, or drops or reports an error before the response starts, the
call is sent over HTTP streaming instead, so opting in never fails a call that
HTTP would have served. Background-mode calls always use HTTP.
Models
Section titled “Models”Models are discovered when the provider is created and on each sync. OpenAI’s
/models listing carries only identifiers, so capability and cost metadata come
from Everruns’ built-in model profiles, matched by model id.
- OpenAI Platform
everruns-driverson crates.io, featureopenai- Migrate between providers