Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

revert: remove model version updates from ts/examples

Sushmitha Mallesh3bc29d92c423
diff --git a/ts/examples/anthropic/src/streaming.ts b/ts/examples/anthropic/src/streaming.ts
index 750e22107..58fb2cd6a 100644
--- a/ts/examples/anthropic/src/streaming.ts
+++ b/ts/examples/anthropic/src/streaming.ts
@@ -31,7 +31,7 @@ async function main() {
console.log('πŸ”„ Creating message with Anthropic...');
const stream = await anthropic.messages
.stream({
- model: 'claude-sonnet-4-6',
+ model: 'claude-3-5-sonnet-latest',
max_tokens: 1024,
messages: [
{
diff --git a/ts/examples/cloudflare-wrangler/src/index.ts b/ts/examples/cloudflare-wrangler/src/index.ts
index a5e1a6bdd..191449b34 100644
--- a/ts/examples/cloudflare-wrangler/src/index.ts
+++ b/ts/examples/cloudflare-wrangler/src/index.ts
@@ -133,7 +133,7 @@ app.post('/hackernews-chat', async (c) => {
];
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
messages: [{ role: 'user', content: message }],
tools,
});
@@ -150,7 +150,7 @@ app.post('/hackernews-chat', async (c) => {
if (toolResponses.length > 0) {
// create the final response
const finalResponse = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
messages,
});
diff --git a/ts/examples/connected-accounts/src/magic-flow-demo.ts b/ts/examples/connected-accounts/src/magic-flow-demo.ts
index 4a987d6b3..03f434fe2 100644
--- a/ts/examples/connected-accounts/src/magic-flow-demo.ts
+++ b/ts/examples/connected-accounts/src/magic-flow-demo.ts
@@ -44,7 +44,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
];
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
messages,
tools: tools,
tool_choice: 'auto',
diff --git a/ts/examples/langchain/src/index.ts b/ts/examples/langchain/src/index.ts
index e73c9b606..0f43c52ea 100644
--- a/ts/examples/langchain/src/index.ts
+++ b/ts/examples/langchain/src/index.ts
@@ -19,7 +19,7 @@ const toolNode = new ToolNode(tools);
// Create a model and give it access to the tools
const model = new ChatOpenAI({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
temperature: 0,
}).bindTools(tools);
diff --git a/ts/examples/llamaindex/src/index.ts b/ts/examples/llamaindex/src/index.ts
index 401294496..d9e8136c9 100644
--- a/ts/examples/llamaindex/src/index.ts
+++ b/ts/examples/llamaindex/src/index.ts
@@ -56,7 +56,7 @@ async function main() {
const hackernewsAgent = agent({
name: 'Hackernews Agent',
description: 'A helpful hackernews assistant',
- llm: openai({ model: 'gpt-5.4' }),
+ llm: openai({ model: 'gpt-4o-mini' }),
systemPrompt:
'You are a helpful hackernews assistant that helps users with their queries related to hackernews',
tools,
diff --git a/ts/examples/mastra/src/experimental.mcp.ts b/ts/examples/mastra/src/experimental.mcp.ts
index fa4dc22b4..2404d6b91 100644
--- a/ts/examples/mastra/src/experimental.mcp.ts
+++ b/ts/examples/mastra/src/experimental.mcp.ts
@@ -51,7 +51,7 @@ const agent = new MastraAgent({
When fetching emails, provide a clear summary of the results including sender, subject, and date.
Be concise and provide actionable information based on the email content.
`,
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools,
});
diff --git a/ts/examples/mastra/src/experimental.tool-router.ts b/ts/examples/mastra/src/experimental.tool-router.ts
index 49bcb6162..1412a0c0f 100644
--- a/ts/examples/mastra/src/experimental.tool-router.ts
+++ b/ts/examples/mastra/src/experimental.tool-router.ts
@@ -41,7 +41,7 @@ const agent = new MastraAgent({
When fetching emails, provide a clear summary of the results including sender, subject, and date.
Be concise and provide actionable information based on the email content.
`,
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools,
});
diff --git a/ts/examples/mastra/src/index.ts b/ts/examples/mastra/src/index.ts
index a0d7c158e..7e207d19e 100644
--- a/ts/examples/mastra/src/index.ts
+++ b/ts/examples/mastra/src/index.ts
@@ -55,7 +55,7 @@ const hackernewsAgent = new Agent({
name: 'Weather Agent',
instructions:
'You are a helpful assistant that can use the Hackernews API to get user information.',
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools: tools,
});
diff --git a/ts/examples/mastra/src/mcp.ts b/ts/examples/mastra/src/mcp.ts
index aca71ebb0..47db38e4f 100644
--- a/ts/examples/mastra/src/mcp.ts
+++ b/ts/examples/mastra/src/mcp.ts
@@ -105,7 +105,7 @@ const gmailAgent = new Agent({
When fetching emails, provide a clear summary of the results including sender, subject, and date.
Be concise and provide actionable information based on the email content.
`,
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools: wrapTools(serverInstance, tools),
});
diff --git a/ts/examples/mcp/src/index.ts b/ts/examples/mcp/src/index.ts
index c2a0ba754..ac0d559a3 100644
--- a/ts/examples/mcp/src/index.ts
+++ b/ts/examples/mcp/src/index.ts
@@ -42,7 +42,7 @@ const tools = await mcpClient.tools();
// 6. Pass tools to Vercel-specific Agent.
const stream = streamText({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
messages: [
{
role: 'user',
diff --git a/ts/examples/openai/src/agents-api/experiment.mcp.ts b/ts/examples/openai/src/agents-api/experiment.mcp.ts
index e3ac05284..827ecdfea 100644
--- a/ts/examples/openai/src/agents-api/experiment.mcp.ts
+++ b/ts/examples/openai/src/agents-api/experiment.mcp.ts
@@ -45,7 +45,7 @@ const agent = new OpenAIAgent({
When fetching emails, provide a clear summary of the results including sender, subject, and date.
Be concise and provide actionable information based on the email content.
`,
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
tools: tools,
});
diff --git a/ts/examples/openai/src/agents-api/experiment.tool-router.ts b/ts/examples/openai/src/agents-api/experiment.tool-router.ts
index 2d7dde07e..5babc3948 100644
--- a/ts/examples/openai/src/agents-api/experiment.tool-router.ts
+++ b/ts/examples/openai/src/agents-api/experiment.tool-router.ts
@@ -40,7 +40,7 @@ const agent = new OpenAIAgent({
When fetching emails, provide a clear summary of the results including sender, subject, and date.
Be concise and provide actionable information based on the email content.
`,
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
tools: tools,
});
diff --git a/ts/examples/openai/src/chat-completions.ts b/ts/examples/openai/src/chat-completions.ts
index 292ff9ec3..bffaf7f18 100644
--- a/ts/examples/openai/src/chat-completions.ts
+++ b/ts/examples/openai/src/chat-completions.ts
@@ -32,7 +32,7 @@ async function main() {
console.log(`πŸ”„ Sending query to OpenAI: "${query}"`);
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o',
messages: [
{
role: 'system',
@@ -64,7 +64,7 @@ async function main() {
console.log('βœ… Tool execution result:', JSON.parse(toolResult));
const finalResponse = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o',
messages: [
{
role: 'system',
diff --git a/ts/examples/openai/src/index.ts b/ts/examples/openai/src/index.ts
index 8d7624c4f..a60d5088b 100644
--- a/ts/examples/openai/src/index.ts
+++ b/ts/examples/openai/src/index.ts
@@ -35,7 +35,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
* Create a chat completion
*/
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
messages,
tools: tools,
tool_choice: 'auto',
diff --git a/ts/examples/openai/src/responses-api/experiment.mcp.ts b/ts/examples/openai/src/responses-api/experiment.mcp.ts
index 97d408d31..a4ca8307b 100644
--- a/ts/examples/openai/src/responses-api/experiment.mcp.ts
+++ b/ts/examples/openai/src/responses-api/experiment.mcp.ts
@@ -41,7 +41,7 @@ console.log({ tools });
// 4. Pass tools to OpenAI-specific Agent.
const openai = new OpenAI();
const emailResponse = await openai.responses.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
instructions: `
You are a helpful Gmail assistant that fetches and summarizes emails.
When fetching emails, provide a clear summary of the results including sender, subject, and date.
diff --git a/ts/examples/openai/src/responses-api/index.ts b/ts/examples/openai/src/responses-api/index.ts
index 80cca553d..89bc03e4e 100644
--- a/ts/examples/openai/src/responses-api/index.ts
+++ b/ts/examples/openai/src/responses-api/index.ts
@@ -13,7 +13,7 @@ console.log(`βœ… Tools fetched from composio`);
console.log(`πŸ”„ Generating response from OpenAI...`);
const initialResponse = await openai.responses.create({
- model: 'gpt-5.4',
+ model: 'gpt-4.1',
input: 'Tell me about the user `pg` in hackernews',
tools,
});
@@ -40,7 +40,7 @@ const modelInputs = await composio.provider.handleResponse(
console.log(`πŸ”„ Submitting tool outputs to OpenAI...`);
console.log(JSON.stringify(modelInputs, null, 2));
const finalResponse = await openai.responses.create({
- model: 'gpt-5.4',
+ model: 'gpt-4.1',
input: [...initialResponse.output, ...modelInputs],
tools,
});
diff --git a/ts/examples/openai/src/tools.ts b/ts/examples/openai/src/tools.ts
index 6b65c4768..d53f0536c 100644
--- a/ts/examples/openai/src/tools.ts
+++ b/ts/examples/openai/src/tools.ts
@@ -16,7 +16,7 @@ const tools = await composio.tools.get('default', {
const query = 'What is the user "pg"';
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o',
messages: [
{
role: 'system',
diff --git a/ts/examples/tool-router/src/claude-agent-sdk.ts b/ts/examples/tool-router/src/claude-agent-sdk.ts
index 150a7893c..bf7739150 100644
--- a/ts/examples/tool-router/src/claude-agent-sdk.ts
+++ b/ts/examples/tool-router/src/claude-agent-sdk.ts
@@ -9,7 +9,7 @@ const session = await composio.create('user_123', { toolkits: ['gmail'] });
const stream = await query({
prompt: 'Use composio tools to fetch my last email from gmail',
options: {
- model: 'claude-sonnet-4-6',
+ model: 'claude-sonnet-4-5-20250929',
permissionMode: "bypassPermissions",
mcpServers: {
composio: {
diff --git a/ts/examples/tool-router/src/index.ts b/ts/examples/tool-router/src/index.ts
index 56282972e..df109c4b2 100644
--- a/ts/examples/tool-router/src/index.ts
+++ b/ts/examples/tool-router/src/index.ts
@@ -13,7 +13,7 @@ const session = await composio.create('user_123', { toolkits: ['gmail'] });
const tools = await session.tools(modifiers);
const stream = await streamText({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
prompt: 'Find my last email from gmail?',
stopWhen: stepCountIs(10),
tools,
diff --git a/ts/examples/tool-router/src/langchain.ts b/ts/examples/tool-router/src/langchain.ts
index 06f53a2d6..0fed09909 100644
--- a/ts/examples/tool-router/src/langchain.ts
+++ b/ts/examples/tool-router/src/langchain.ts
@@ -8,7 +8,7 @@ const composio = new Composio({
});
const llm = new ChatOpenAI({
- model: "gpt-5.4",
+ model: "gpt-4o",
})
async function main() {
diff --git a/ts/examples/tool-router/src/mcp.ts b/ts/examples/tool-router/src/mcp.ts
index b42e2a0e5..ea7493ddd 100644
--- a/ts/examples/tool-router/src/mcp.ts
+++ b/ts/examples/tool-router/src/mcp.ts
@@ -31,7 +31,7 @@ mcpProgress.succeed(`${Object.values(tools).length} tools retrieved from MCP`);
console.log(`πŸ€– Waiting for agent response...`);
const stream = await streamText({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
prompt: 'Summarize my latest received email from gmail.',
stopWhen: stepCountIs(10),
onStepFinish: (step) => {
diff --git a/ts/examples/tools/src/ai.ts b/ts/examples/tools/src/ai.ts
index f8ae342d1..726683e51 100644
--- a/ts/examples/tools/src/ai.ts
+++ b/ts/examples/tools/src/ai.ts
@@ -41,7 +41,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
*/
console.log('πŸ”„ Creating chat completion...');
const response = await openai.chat.completions.create({
- model: 'gpt-5.4',
+ model: 'gpt-4o-mini',
messages,
tools: tools,
tool_choice: 'auto',
diff --git a/ts/examples/vercel/src/ai.ts b/ts/examples/vercel/src/ai.ts
index e55e182a9..0ac6c3a90 100644
--- a/ts/examples/vercel/src/ai.ts
+++ b/ts/examples/vercel/src/ai.ts
@@ -35,7 +35,7 @@ async function run() {
];
const { text } = await generateText({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools,
messages,
stopWhen: stepCountIs(5),
diff --git a/ts/examples/vercel/src/stream.ts b/ts/examples/vercel/src/stream.ts
index 13361a375..db56c27a2 100644
--- a/ts/examples/vercel/src/stream.ts
+++ b/ts/examples/vercel/src/stream.ts
@@ -13,7 +13,7 @@ const composio = new Composio({
const tools = await composio.tools.get('test-user-id', 'HACKERNEWS_GET_FRONTPAGE');
const stream = await streamText({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
tools,
prompt: 'Summarize the front page of HackerNews',
stopWhen: stepCountIs(5),
diff --git a/ts/examples/vercel/src/tool-loop-agent.ts b/ts/examples/vercel/src/tool-loop-agent.ts
index afe517b28..b61eec037 100644
--- a/ts/examples/vercel/src/tool-loop-agent.ts
+++ b/ts/examples/vercel/src/tool-loop-agent.ts
@@ -32,7 +32,7 @@ console.log(`βœ… Tools loaded: ${Object.keys(tools).join(', ')}`);
// 3. Create a ToolLoopAgent with Composio tools
const hackerNewsAgent = new ToolLoopAgent({
- model: openai('gpt-5.4'),
+ model: openai('gpt-4o-mini'),
instructions: `You are a helpful assistant that can look up information about Hacker News users.
When asked about a user, use the available tools to fetch their profile information.
Provide a concise summary of the user's profile including their karma, about section, and any other relevant details.`,