Skip to content
7 min read · 1,351 words

Interface: OpenAIResponsesAdapterOptions ​

Defined in: src/batteries/llm/openai_responses/types.ts:825

Configuration options for the OpenAI Responses adapter.

Properties ​

PropertyTypeDefault valueDescriptionDefined in
apiKey?stringundefinedAPI key for authenticating requests.src/batteries/llm/openai_responses/types.ts:828
autoAck?booleanundefinedWhether the executor should call ctx.ack() itself when a generation completes with no tool calls.src/batteries/llm/openai_responses/types.ts:866
background?booleanundefinedRequest the generation run in the background (async). NOT SUPPORTED — this adapter has no polling/resumption logic for a queued/in_progress background response, so true is rejected at validation time (E_INVALID_OPENAI_RESPONSES_OPTIONS) rather than silently treated as a completed, empty answer. false/undefined (the default, synchronous request/response) are unaffected.src/batteries/llm/openai_responses/types.ts:973
baseURL?stringundefinedBase URL for the OpenAI-compatible Responses endpoint.src/batteries/llm/openai_responses/types.ts:830
bucketOrder?ChatCompletionsBucketOrderundefinedDetermines order of memory and retrievable buckets in history assembly.src/batteries/llm/openai_responses/types.ts:848
contextWindow?numberundefinedSize of the model's token context window.src/batteries/llm/openai_responses/types.ts:850
fetch?{ (input: URL | RequestInfo, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; }undefinedCustom fetch implementation to use for HTTP requests.src/batteries/llm/openai_responses/types.ts:846
forgeToolsFilter?(forged: ToolRegistry, ctx: DispatchContext) => ToolRegistryundefinedOptional hook to shape forged artifact-query tools before they merge into the visible tool set.src/batteries/llm/openai_responses/types.ts:878
headers?Record<string, string>undefinedExtra HTTP headers to include with each request.src/batteries/llm/openai_responses/types.ts:836
helpers?Partial<OpenAIResponsesHelpers>undefinedOptional overrides for OpenAI Responses helpers.src/batteries/llm/openai_responses/types.ts:860
include?OpenAIResponsesIncludable[]undefinedAdditional output data requested from the model. Remarks 'reasoning.encrypted_content' is auto-added when reasoningReplay === 'encrypted'; a caller value does not need to repeat it (de-duplicated).src/batteries/llm/openai_responses/types.ts:927
localToolCallParser?| ToolCallParserName | ToolCallParserFnundefinedOptional fallback parser for tool calls the provider did not return structurally.src/batteries/llm/openai_responses/types.ts:876
max_output_tokens?numberundefinedHard limit on generated output tokens. Remarks The API enforces an UNDOCUMENTED minimum of 16 (400 Invalid 'max_output_tokens'... Expected a value >= 16) — enforced in this battery's validation schema so a too-small value fails at config time, not dispatch time.src/batteries/llm/openai_responses/types.ts:941
metadata?Record<string, string>undefinedMetadata key-value pairs forwarded to the provider.src/batteries/llm/openai_responses/types.ts:961
modelstringundefinedName of the model to use for generation. REQUIRED.src/batteries/llm/openai_responses/types.ts:919
onPromptAssembled?PromptAssembledObserverFnundefinedObserve the fully-assembled request before dispatch.src/batteries/llm/openai_responses/types.ts:872
onRawGeneration?RawGenerationObserverFnundefinedObserve the model's raw response for each completed generation.src/batteries/llm/openai_responses/types.ts:870
organization?stringundefinedOptional OpenAI organization id, sent as OpenAI-Organization.src/batteries/llm/openai_responses/types.ts:832
parallel_tool_calls?booleanundefinedAllow the model to emit multiple tool calls in one turn.src/batteries/llm/openai_responses/types.ts:943
project?stringundefinedOptional OpenAI project id, sent as OpenAI-Project.src/batteries/llm/openai_responses/types.ts:834
prompt_cache_key?stringundefinedVendor cache key for caching system/prefix content.src/batteries/llm/openai_responses/types.ts:955
prompt_cache_retention?"in_memory" | "24h"undefinedCache retention strategy for cached prefix content.src/batteries/llm/openai_responses/types.ts:957
reasoning?{ effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh"; summary?: "auto" | "concise" | "detailed"; }undefinedReasoning-effort / summary configuration for reasoning-capable models.src/batteries/llm/openai_responses/types.ts:929
reasoning.effort?"none" | "minimal" | "low" | "medium" | "high" | "xhigh"undefined-src/batteries/llm/openai_responses/types.ts:930
reasoning.summary?"auto" | "concise" | "detailed"undefined-src/batteries/llm/openai_responses/types.ts:931
reasoningReplay?ReasoningReplayMode'off'Reasoning-replay mode. Remarks 'off' (default) — thoughts never replay as native reasoning items; they render as plain text instead. 'encrypted' — replay signed reasoning items, auto-adding 'reasoning.encrypted_content' to include. 'summary-only' — replay reasoning items without requesting the encrypted payload. This is real, scoped, stateful machinery (persisted opaque payloads, prefix-fence fingerprinting, adjacency enforcement, item-id manipulation) — see the battery's design notes for the reasoning/output-item pairing hazard this default guards against.src/batteries/llm/openai_responses/types.ts:908
replayCompatibility?readonly string[]undefinedList of replay labels supported by the assistant.src/batteries/llm/openai_responses/types.ts:858
requestTimeoutMs?numberundefinedRequest timeout in milliseconds for API calls.src/batteries/llm/openai_responses/types.ts:842
retry?ChatCompletionsRetryConfigundefinedConfigures request retry behavior.src/batteries/llm/openai_responses/types.ts:844
safety_identifier?stringundefinedUnique safety system identifier or configuration id.src/batteries/llm/openai_responses/types.ts:959
selfIdentity?stringundefinedUnique identity label for the assistant instance.src/batteries/llm/openai_responses/types.ts:852
service_tier?"default" | "auto" | "flex" | "scale" | "priority"undefinedService reliability tier for processing the request.src/batteries/llm/openai_responses/types.ts:953
spoolStore?SpoolStoreundefinedBacking store for string / Uint8Array tool returns.src/batteries/llm/openai_responses/types.ts:862
stream?booleanundefinedWhether to stream the response via SSE.src/batteries/llm/openai_responses/types.ts:838
stream_options?{ include_obfuscation?: boolean; }undefinedConfiguration options for response streaming.src/batteries/llm/openai_responses/types.ts:975
stream_options.include_obfuscation?booleanundefined-src/batteries/llm/openai_responses/types.ts:975
streamIdleTimeoutMs?numberundefinedIdle timeout in milliseconds for the stream before aborting.src/batteries/llm/openai_responses/types.ts:840
strict?booleanundefinedGlobal strict default forwarded to every emitted tool declaration's strict field, when the caller hasn't already got a reason not to (kept undefined by default since strict: true requires additionalProperties: false and full required coverage that ADK's Joi-derived schemas don't guarantee).src/batteries/llm/openai_responses/types.ts:915
strictToolChoice?booleanundefinedWhether a tool_choice forcing a forged ephemeral artifact-query tool throws instead of warning.src/batteries/llm/openai_responses/types.ts:864
systemPromptChannel?SystemPromptChannel'instructions'Where the ADK-rendered system prompt is placed on the wire. Remarks 'instructions' (default) — the top-level instructions string field. 'developer-item' / 'system-item' — a leading developer/system-role input message item instead, for gateways that only understand the item form. Either way the CONTENT is always ADK-rendered; there is no consumer-facing escape hatch to hand-author it directly (see the instructions note below).src/batteries/llm/openai_responses/types.ts:892
temperature?numberundefinedSampling temperature control.src/batteries/llm/openai_responses/types.ts:945
text?{ format?: Record<string, unknown>; verbosity?: "low" | "medium" | "high"; }undefinedStructured-output format / verbosity configuration.src/batteries/llm/openai_responses/types.ts:965
text.format?Record<string, unknown>undefined-src/batteries/llm/openai_responses/types.ts:965
text.verbosity?"low" | "medium" | "high"undefined-src/batteries/llm/openai_responses/types.ts:965
thoughtSurfacing?"all" | "all-self" | "latest-self"undefinedDetermines which thoughts are surfaced back to the model.src/batteries/llm/openai_responses/types.ts:854
tokenEncoding?| TokenEncodingId | nullundefinedTokenizer encoding configuration for token counting.src/batteries/llm/openai_responses/types.ts:856
tool_choice?OpenAIResponsesToolChoiceundefinedTool-choice directive.src/batteries/llm/openai_responses/types.ts:963
toolCallIdFilter?ToolCallIdFilterFnundefinedOptional ingress hook for adapting provider tool-call ids; absent preserves the vendor id.src/batteries/llm/openai_responses/types.ts:874
top_logprobs?numberundefinedTop log-probability tokens limit.src/batteries/llm/openai_responses/types.ts:949
top_p?numberundefinedNucleus sampling probability threshold.src/batteries/llm/openai_responses/types.ts:947
truncation?"auto" | "disabled"undefinedContext-truncation strategy.src/batteries/llm/openai_responses/types.ts:951
unsupportedMediaPolicy?UnsupportedMediaPolicyundefinedPolicy for a @nhtio/adk!Media instance whose modality this wire cannot represent (audio, video).src/batteries/llm/openai_responses/types.ts:868