Interface: OpenAIResponsesParams
@providerprotocol/ai / openai / OpenAIResponsesParams
Interface: OpenAIResponsesParams
Section titled “Interface: OpenAIResponsesParams”Defined in: src/providers/openai/types.ts:287
Parameters for the OpenAI Responses API.
These parameters are passed directly to the /v1/responses endpoint.
The Responses API is the modern, recommended API that supports built-in
tools like web search, image generation, file search, and code interpreter.
Examples
Section titled “Examples”const params: OpenAIResponsesParams = { max_output_tokens: 1000, temperature: 0.7, reasoning: { effort: 'medium' }};import { tools } from './types';
const params: OpenAIResponsesParams = { max_output_tokens: 2000, tools: [tools.webSearch(), tools.imageGeneration()]};OpenAICompletionsParams for the legacy Chat Completions API parameters
Properties
Section titled “Properties”background?
Section titled “background?”
optionalbackground:boolean
Defined in: src/providers/openai/types.ts:330
Background processing - run response asynchronously
conversation?
Section titled “conversation?”
optionalconversation:string|OpenAIConversation
Defined in: src/providers/openai/types.ts:339
Conversation context - items prepended to input_items Cannot be used with previous_response_id
include?
Section titled “include?”
optionalinclude:string[]
Defined in: src/providers/openai/types.ts:327
Fields to include in output Supported values:
- ‘web_search_call.action.sources’: Include web search sources
- ‘code_interpreter_call.outputs’: Include code execution outputs
- ‘computer_call_output.output.image_url’: Include computer call images
- ‘file_search_call.results’: Include file search results
- ‘message.input_image.image_url’: Include input image URLs
- ‘message.output_text.logprobs’: Include logprobs with messages
- ‘reasoning.encrypted_content’: Include encrypted reasoning tokens
max_output_tokens?
Section titled “max_output_tokens?”
optionalmax_output_tokens:number
Defined in: src/providers/openai/types.ts:289
Maximum output tokens
max_tool_calls?
Section titled “max_tool_calls?”
optionalmax_tool_calls:number
Defined in: src/providers/openai/types.ts:351
Maximum total calls to built-in tools in a response Applies across all built-in tool calls, not per tool
metadata?
Section titled “metadata?”
optionalmetadata:Record<string,string>
Defined in: src/providers/openai/types.ts:345
Metadata key-value pairs (max 16, keys max 64 chars, values max 512 chars)
parallel_tool_calls?
Section titled “parallel_tool_calls?”
optionalparallel_tool_calls:boolean
Defined in: src/providers/openai/types.ts:301
Whether to enable parallel tool calls
previous_response_id?
Section titled “previous_response_id?”
optionalprevious_response_id:string
Defined in: src/providers/openai/types.ts:333
Continue from a previous response (cannot use with conversation)
prompt?
Section titled “prompt?”
optionalprompt:OpenAIPromptTemplate
Defined in: src/providers/openai/types.ts:356
Reference to a prompt template and its variables
prompt_cache_key?
Section titled “prompt_cache_key?”
optionalprompt_cache_key:string
Defined in: src/providers/openai/types.ts:362
Stable identifier for caching similar requests Used to optimize cache hit rates (replaces user field)
prompt_cache_retention?
Section titled “prompt_cache_retention?”
optionalprompt_cache_retention:"in-memory"|"24h"
Defined in: src/providers/openai/types.ts:368
Retention policy for prompt cache Set to “24h” to enable extended prompt caching up to 24 hours
reasoning?
Section titled “reasoning?”
optionalreasoning:object
Defined in: src/providers/openai/types.ts:304
Reasoning configuration (for gpt-5 and o-series models)
effort?
Section titled “effort?”
optionaleffort:"none"|"low"|"medium"|"high"|"minimal"|"xhigh"
summary?
Section titled “summary?”
optionalsummary:"auto"|"detailed"|"concise"
Include summary of reasoning
safety_identifier?
Section titled “safety_identifier?”
optionalsafety_identifier:string
Defined in: src/providers/openai/types.ts:374
Stable identifier for abuse detection Recommend hashing username or email address
service_tier?
Section titled “service_tier?”
optionalservice_tier:"default"|"priority"|"auto"|"flex"|"scale"
Defined in: src/providers/openai/types.ts:311
Service tier
store?
Section titled “store?”
optionalstore:boolean
Defined in: src/providers/openai/types.ts:342
Store response for continuation
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: src/providers/openai/types.ts:292
Temperature for randomness (0.0 - 2.0)
tools?
Section titled “tools?”
optionaltools:OpenAIBuiltInTool[]
Defined in: src/providers/openai/types.ts:398
Built-in tools for the Responses API Use the tool helper constructors: tools.webSearch(), tools.imageGeneration(), etc.
Example
Section titled “Example”import { tools } from 'provider-protocol/openai';
const model = llm({ model: openai('gpt-4o'), params: { tools: [ tools.webSearch(), tools.imageGeneration({ quality: 'high' }), ], },});top_logprobs?
Section titled “top_logprobs?”
optionaltop_logprobs:number
Defined in: src/providers/openai/types.ts:298
Number of top logprobs to return (0-20)
top_p?
Section titled “top_p?”
optionaltop_p:number
Defined in: src/providers/openai/types.ts:295
Top-p (nucleus) sampling (0.0 - 1.0)
truncation?
Section titled “truncation?”
optionaltruncation:"auto"|"disabled"
Defined in: src/providers/openai/types.ts:314
Truncation strategy
optionaluser:string
Defined in: src/providers/openai/types.ts:377
User identifier (deprecated, use safety_identifier or prompt_cache_key)