From d69762461cff2bd73df0cd72b4646550cc304378 Mon Sep 17 00:00:00 2001 From: S2D2 Date: Thu, 19 Nov 2026 03:40:06 +0000 Subject: [PATCH] chore(examples): bump example models to GPT-6.2 Sol, Claude Haiku 5.5 and Sonnet 5.5 - Responses API and AI SDK examples: gpt-5.1 -> gpt-6.2-sol - Anthropic example: claude-haiku-4-5-20251001 -> claude-haiku-5-5 - Claude Agent SDK example: claude-sonnet-4-5-20250929 -> claude-sonnet-5-5 - Chat Completions example: gpt-5.1 -> gpt-6.1-terra with reasoning_effort 'none'. The GPT-6.2 models reject function tools on /v1/chat/completions ("use /v1/responses or set reasoning_effort to 'none'", and they do not accept 'none'), so the Chat Completions example uses the newest model that does. - README snippets and the toClaudeAgentSdk doc comment follow the examples. Co-Authored-By: Claude Opus 5.5 Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com> --- README.md | 12 +++++++----- examples/ai-sdk-integration.ts | 2 +- examples/anthropic-integration.ts | 2 +- examples/claude-agent-sdk-integration.ts | 2 +- examples/openai-integration.ts | 8 ++++++-- examples/openai-responses-integration.ts | 2 +- src/tool.ts | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5b06c1e3..d1adc42b 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,9 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [ { role: 'user', content: 'Create a time-off request for employee id cxIQ5764hj2' }, ]; const response = await openai.chat.completions.create({ - model: 'gpt-5.1', + model: 'gpt-6.1-terra', + // Chat Completions takes function tools only with reasoning off; the Responses API takes both + reasoning_effort: 'none', messages, tools: tools.toOpenAI(), }); @@ -175,7 +177,7 @@ const tools = await toolset.fetchTools(); const openai = new OpenAI(); await openai.responses.create({ - model: 'gpt-5.1', + model: 'gpt-6.2-sol', instructions: 'You are a helpful HR assistant.', input: 'What is the phone number for employee c28xIQ?', tools: tools.toOpenAIResponses(), @@ -206,7 +208,7 @@ const tools = await toolset.fetchTools(); const anthropic = new Anthropic(); await anthropic.messages.create({ - model: 'claude-haiku-4-5-20251001', + model: 'claude-haiku-5-5', max_tokens: 1024, system: 'You are a helpful HR assistant.', messages: [ @@ -244,7 +246,7 @@ const toolset = new StackOneToolSet({ accountId: process.env.STACKONE_ACCOUNT_ID const tools = await toolset.fetchTools(); await generateText({ - model: openai('gpt-5.1'), + model: openai('gpt-6.2-sol'), tools: await tools.toAISDK(), stopWhen: stepCountIs(3), }); @@ -278,7 +280,7 @@ const mcpServer = await tools.toClaudeAgentSdk(); const result = query({ prompt: 'Get the employee with id: abc123', options: { - model: 'claude-sonnet-4-5-20250929', + model: 'claude-sonnet-5-5', mcpServers: { 'stackone-tools': mcpServer }, tools: [], // Disable built-in tools allowedTools: ['mcp__stackone-tools'], // Run the StackOne tools without a permission prompt diff --git a/examples/ai-sdk-integration.ts b/examples/ai-sdk-integration.ts index b00f31b0..a42ac2df 100644 --- a/examples/ai-sdk-integration.ts +++ b/examples/ai-sdk-integration.ts @@ -44,7 +44,7 @@ const aiSdkIntegration = async (): Promise => { // The AI SDK will automatically call the tool if needed const { text, steps } = await generateText({ - model: openai('gpt-5.1'), + model: openai('gpt-6.2-sol'), tools: aiSdkTools, prompt: 'List the first 5 employees', stopWhen: stepCountIs(3), diff --git a/examples/anthropic-integration.ts b/examples/anthropic-integration.ts index 84fbdf89..4b98e843 100644 --- a/examples/anthropic-integration.ts +++ b/examples/anthropic-integration.ts @@ -34,7 +34,7 @@ const anthropicIntegration = async (): Promise => { // Create a message with tool calls const response = await anthropic.messages.create({ - model: 'claude-haiku-4-5-20251001', + model: 'claude-haiku-5-5', max_tokens: 1024, system: 'You are a helpful assistant that can access tools.', messages: [ diff --git a/examples/claude-agent-sdk-integration.ts b/examples/claude-agent-sdk-integration.ts index 1ee48be5..360b7dc8 100644 --- a/examples/claude-agent-sdk-integration.ts +++ b/examples/claude-agent-sdk-integration.ts @@ -38,7 +38,7 @@ const claudeAgentSdkIntegration = async (): Promise => { const result = query({ prompt: 'List the first 5 employees', options: { - model: 'claude-sonnet-4-5-20250929', + model: 'claude-sonnet-5-5', mcpServers: { // oxlint-disable-next-line typescript/no-explicit-any, typescript/no-unsafe-type-assertion -- Compatible MCP server type 'stackone-tools': mcpServer as any, diff --git a/examples/openai-integration.ts b/examples/openai-integration.ts index f1b7c5a4..918cb5a6 100644 --- a/examples/openai-integration.ts +++ b/examples/openai-integration.ts @@ -57,7 +57,10 @@ const openaiIntegration = async (): Promise => { }, ]; const response = await openai.chat.completions.create({ - model: 'gpt-5.1', + model: 'gpt-6.1-terra', + // Chat Completions accepts function tools only with reasoning off; use the Responses API to + // combine tools with reasoning (see openai-responses-integration.ts) + reasoning_effort: 'none', messages, tools: openAITools, }); @@ -76,7 +79,8 @@ const openaiIntegration = async (): Promise => { messages.push(message, ...(await tools.executeOpenAIToolCalls(toolCalls))); const final = await openai.chat.completions.create({ - model: 'gpt-5.1', + model: 'gpt-6.1-terra', + reasoning_effort: 'none', messages, tools: openAITools, }); diff --git a/examples/openai-responses-integration.ts b/examples/openai-responses-integration.ts index 09536b50..907d3662 100644 --- a/examples/openai-responses-integration.ts +++ b/examples/openai-responses-integration.ts @@ -34,7 +34,7 @@ const openaiResponsesIntegration = async (): Promise => { // Create a response with tool calls using the Responses API const response = await openai.responses.create({ - model: 'gpt-5.1', + model: 'gpt-6.2-sol', instructions: 'You are a helpful assistant that can access various tools.', input: 'List the first 5 employees', tools: openAIResponsesTools, diff --git a/src/tool.ts b/src/tool.ts index 618ce79b..9252f86b 100644 --- a/src/tool.ts +++ b/src/tool.ts @@ -825,7 +825,7 @@ export class Tools implements Iterable { * const result = query({ * prompt: 'Get employee info', * options: { - * model: 'claude-sonnet-4-5-20250929', + * model: 'claude-sonnet-5-5', * mcpServers: { * 'stackone-tools': mcpServer, * },