Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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),
});
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-sdk-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const aiSdkIntegration = async (): Promise<void> => {

// 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),
Expand Down
2 changes: 1 addition & 1 deletion examples/anthropic-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const anthropicIntegration = async (): Promise<void> => {

// Create a message with tool calls
const response = await anthropic.messages.create({
model: 'claude-haiku-4-5-20251001',
model: 'claude-haiku-5-5',
Comment thread
glebedel marked this conversation as resolved.
Resolved
max_tokens: 1024,
system: 'You are a helpful assistant that can access tools.',
messages: [
Expand Down
2 changes: 1 addition & 1 deletion examples/claude-agent-sdk-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const claudeAgentSdkIntegration = async (): Promise<void> => {
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,
Expand Down
8 changes: 6 additions & 2 deletions examples/openai-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ const openaiIntegration = async (): Promise<void> => {
},
];
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,
});
Expand All @@ -76,7 +79,8 @@ const openaiIntegration = async (): Promise<void> => {
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,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/openai-responses-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const openaiResponsesIntegration = async (): Promise<void> => {

// 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,
Expand Down
2 changes: 1 addition & 1 deletion src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ export class Tools implements Iterable<BaseTool> {
* const result = query({
* prompt: 'Get employee info',
* options: {
* model: 'claude-sonnet-4-5-20250929',
* model: 'claude-sonnet-5-5',
* mcpServers: {
* 'stackone-tools': mcpServer,
* },
Expand Down
Loading