ResponsesConfig
Defined in: core/src/providers/responses.ts:41
Standard options that any provider config can accept to configure fallbacks inline.
Extends
Section titled “Extends”Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey: string;Defined in: core/src/providers/responses.ts:42
baseUrl?
Section titled “baseUrl?”optional baseUrl?: string;Defined in: core/src/providers/responses.ts:45
Any endpoint speaking the Responses format. Defaults to OpenAI itself.
effort?
Section titled “effort?”optional effort?: "none" | "low" | "medium" | "high" | "max";Defined in: core/src/providers/responses.ts:48
fallbackOptions?
Section titled “fallbackOptions?”optional fallbackOptions?: FallbackOptions<Provider>;Defined in: core/src/fallback.ts:94
Custom cooldown or telemetry options for the fallback pool.
Inherited from
Section titled “Inherited from”ProviderFallbackConfig.fallbackOptions
fallbacks?
Section titled “fallbacks?”optional fallbacks?: readonly FallbackCandidate[];Defined in: core/src/fallback.ts:88
Secondary and tertiary providers to try if this provider fails/exhausts:
hand-built Providers, preset-id FallbackSpecs, or both.
Inherited from
Section titled “Inherited from”ProviderFallbackConfig.fallbacks
fetchImpl?
Section titled “fetchImpl?”optional fetchImpl?: (input, init?) => Promise<Response>;Defined in: core/src/providers/responses.ts:50
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
RequestInfo | URL |
init? |
RequestInit |
Returns
Section titled “Returns”Promise<Response>
headers?
Section titled “headers?”optional headers?: Record<string, string>;Defined in: core/src/providers/responses.ts:53
Extra request headers, where a subscription backend’s account id goes
(ChatGPT-Account-Id), which those backends reject the request without.
optional id?: string;Defined in: core/src/providers/responses.ts:47
Names the provider in errors and logs.
imageLimits?
Section titled “imageLimits?”optional imageLimits?: ImageLimits;Defined in: core/src/providers/responses.ts:79
What this backend accepts as an image. Each image it would refuse is replaced by a note naming the reason, instead of failing the request.
instanceSessionId?
Section titled “instanceSessionId?”optional instanceSessionId?: string;Defined in: core/src/providers/responses.ts:67
The id sessionHeader carries when a call has no sessionId. Absent, the
adapter mints one when it is built. Pass one when something rebuilds the
adapter (withKeyPool and withToken build one per attempt): each build
mints a new id, and a gateway that pins a session to one upstream host
then treats every call as a new session, re-routes it and misses its
prompt cache. Ignored without sessionHeader.
It is not sent as prompt_cache_key, which stays the per-call
sessionId’s: this id names the adapter, so it is shared by every
conversation the adapter serves, and a minted one never was a cache key.
maxTokens?
Section titled “maxTokens?”optional maxTokens?: number;Defined in: core/src/providers/responses.ts:49
model: string;Defined in: core/src/providers/responses.ts:43
optional path?: string;Defined in: core/src/providers/responses.ts:76
Where this backend serves the endpoint, when it is not /v1/responses.
The ChatGPT subscription surface serves it at /backend-api/codex/responses
with no version segment, so that backend needs
{ baseUrl: "https://chatgpt.com/backend-api/codex", path: "/responses" }.
Without the override the POST 404s, and a 404 classifies as “model”. The
user is told the model id does not exist when the path was the problem.
replayReasoning?
Section titled “replayReasoning?”optional replayReasoning?: boolean;Defined in: core/src/providers/responses.ts:83
Ask for the encrypted reasoning items and replay them on the next turn,
so the model keeps its chain of thought across a stateless turn. Only for
backends that accept include: ["reasoning.encrypted_content"].
serviceTier?
Section titled “serviceTier?”optional serviceTier?: ServiceTier;Defined in: core/src/providers/responses.ts:85
Default service_tier for every call; StreamOptions.serviceTier wins.
sessionHeader?
Section titled “sessionHeader?”optional sessionHeader?: string;Defined in: core/src/providers/responses.ts:56
Header that carries StreamOptions.sessionId. When set and a call has no
sessionId, one stable id for this provider instance rides instead.
watchdog?
Section titled “watchdog?”optional watchdog?: WatchdogOptions;Defined in: core/src/fallback.ts:92
Watch every candidate separately. A silent candidate then times out and rotates; wrapping the completed pool would abort the whole chain instead. Fallback specs inherit this unless they set their own watchdog.