ResponsesConfig
Defined in: core/src/providers/responses.ts:53
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:54
baseUrl?
Section titled “baseUrl?”optional baseUrl?: string;Defined in: core/src/providers/responses.ts:57
Any endpoint speaking the Responses format. Defaults to OpenAI itself.
effort?
Section titled “effort?”optional effort?: "low" | "medium" | "high" | "none" | "max";Defined in: core/src/providers/responses.ts:60
fallbackOptions?
Section titled “fallbackOptions?”optional fallbackOptions?: FallbackOptions<Provider>;Defined in: core/src/fallback.ts:109
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:103
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?: FetchLike;Defined in: core/src/providers/responses.ts:62
headers?
Section titled “headers?”optional headers?: Record<string, string>;Defined in: core/src/providers/responses.ts:67
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:59
Names the provider in errors and logs.
imageLimits?
Section titled “imageLimits?”optional imageLimits?: ImageLimits;Defined in: core/src/providers/responses.ts:93
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:81
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:61
model: string;Defined in: core/src/providers/responses.ts:55
optional path?: string;Defined in: core/src/providers/responses.ts:90
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.
redactErrors?
Section titled “redactErrors?”optional redactErrors?: boolean;Defined in: core/src/providers/responses.ts:64
Leave the provider’s words out of every error. See PresetProviderConfig.redactErrors.
replayReasoning?
Section titled “replayReasoning?”optional replayReasoning?: boolean;Defined in: core/src/providers/responses.ts:97
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"].
servesHostedTools?
Section titled “servesHostedTools?”optional servesHostedTools?: readonly ( | "web_search" | "web_fetch" | "code_execution" | "file_search" | "image_generation")[];Defined in: core/src/providers/responses.ts:107
For providers imported from @providerkit/core/hosted.
The hosted tools this endpoint runs. Defaults to web search, code
execution, file search and image generation on api.openai.com, and to
none anywhere else, the ChatGPT backend included, until someone checks
that endpoint. One that ignores a tool answers unsearched without saying so.
serviceTier?
Section titled “serviceTier?”optional serviceTier?: ServiceTier;Defined in: core/src/providers/responses.ts:99
Default service_tier for every call; StreamOptions.serviceTier wins.
sessionHeader?
Section titled “sessionHeader?”optional sessionHeader?: string;Defined in: core/src/providers/responses.ts:70
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:107
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.