generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
area:modelsItems associated with model providersItems associated with model providers
Description
Summary
Extend the OpenAI model provider to support the Responses API, which is OpenAI's successor to the Chat Completions API. The current OpenAIModel implementation uses the Chat Completions API exclusively. The Responses API introduces built-in tool use, streaming improvements, and a simplified conversation state model. We should determine whether to add Responses API support alongside the existing Chat Completions path or as a separate provider.
Usage
⚠️ Agent-generated example - This is a preliminary API sketch and has not been finalized.
import { Agent } from '@strands-agents/sdk'
import { OpenAIModel } from '@strands-agents/openai'
const agent = new Agent({
model: new OpenAIModel({
modelId: 'gpt-4o',
apiType: 'responses', // opt into Responses API
}),
})
const result = await agent.invoke('What is the weather in Seattle?')Documentation
N/A
Reference
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:modelsItems associated with model providersItems associated with model providers