Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 03:15 UTC
revert: remove model version updates from ts/examples
Keep model version updates only in docs/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmitha Mallesh committed
Mar 11, 2026 at 02:29 UTC
3bc29d92c42330698a1a7795bb83ed161d04aa55
25 files changed
+28
-28
ts/examples/anthropic/src/streaming.ts
+1
-1
@@ -31,7 +31,7 @@ async function main() {
31
console.log('🔄 Creating message with Anthropic...');
32
const stream = await anthropic.messages
33
.stream({
34
- model: 'claude-sonnet-4-6',
34
+ model: 'claude-3-5-sonnet-latest',
35
max_tokens: 1024,
36
messages: [
37
{
ts/examples/cloudflare-wrangler/src/index.ts
+2
-2
@@ -133,7 +133,7 @@ app.post('/hackernews-chat', async (c) => {
133
];
134
135
const response = await openai.chat.completions.create({
136
- model: 'gpt-5.4',
136
+ model: 'gpt-4o-mini',
137
messages: [{ role: 'user', content: message }],
138
tools,
139
});
@@ -150,7 +150,7 @@ app.post('/hackernews-chat', async (c) => {
150
if (toolResponses.length > 0) {
151
// create the final response
152
const finalResponse = await openai.chat.completions.create({
153
- model: 'gpt-5.4',
153
+ model: 'gpt-4o-mini',
154
messages,
155
});
156
ts/examples/connected-accounts/src/magic-flow-demo.ts
+1
-1
@@ -44,7 +44,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
44
];
45
46
const response = await openai.chat.completions.create({
47
- model: 'gpt-5.4',
47
+ model: 'gpt-4o-mini',
48
messages,
49
tools: tools,
50
tool_choice: 'auto',
ts/examples/langchain/src/index.ts
+1
-1
@@ -19,7 +19,7 @@ const toolNode = new ToolNode(tools);
19
20
// Create a model and give it access to the tools
21
const model = new ChatOpenAI({
22
- model: 'gpt-5.4',
22
+ model: 'gpt-4o-mini',
23
temperature: 0,
24
}).bindTools(tools);
25
ts/examples/llamaindex/src/index.ts
+1
-1
@@ -56,7 +56,7 @@ async function main() {
56
const hackernewsAgent = agent({
57
name: 'Hackernews Agent',
58
description: 'A helpful hackernews assistant',
59
- llm: openai({ model: 'gpt-5.4' }),
59
+ llm: openai({ model: 'gpt-4o-mini' }),
60
systemPrompt:
61
'You are a helpful hackernews assistant that helps users with their queries related to hackernews',
62
tools,
ts/examples/mastra/src/experimental.mcp.ts
+1
-1
@@ -51,7 +51,7 @@ const agent = new MastraAgent({
51
When fetching emails, provide a clear summary of the results including sender, subject, and date.
52
Be concise and provide actionable information based on the email content.
53
`,
54
- model: openai('gpt-5.4'),
54
+ model: openai('gpt-4o-mini'),
55
tools,
56
});
57
ts/examples/mastra/src/experimental.tool-router.ts
+1
-1
@@ -41,7 +41,7 @@ const agent = new MastraAgent({
41
When fetching emails, provide a clear summary of the results including sender, subject, and date.
42
Be concise and provide actionable information based on the email content.
43
`,
44
- model: openai('gpt-5.4'),
44
+ model: openai('gpt-4o-mini'),
45
tools,
46
});
47
ts/examples/mastra/src/index.ts
+1
-1
@@ -55,7 +55,7 @@ const hackernewsAgent = new Agent({
55
name: 'Weather Agent',
56
instructions:
57
'You are a helpful assistant that can use the Hackernews API to get user information.',
58
- model: openai('gpt-5.4'),
58
+ model: openai('gpt-4o-mini'),
59
tools: tools,
60
});
61
ts/examples/mastra/src/mcp.ts
+1
-1
@@ -105,7 +105,7 @@ const gmailAgent = new Agent({
105
When fetching emails, provide a clear summary of the results including sender, subject, and date.
106
Be concise and provide actionable information based on the email content.
107
`,
108
- model: openai('gpt-5.4'),
108
+ model: openai('gpt-4o-mini'),
109
tools: wrapTools(serverInstance, tools),
110
});
111
ts/examples/mcp/src/index.ts
+1
-1
@@ -42,7 +42,7 @@ const tools = await mcpClient.tools();
42
43
// 6. Pass tools to Vercel-specific Agent.
44
const stream = streamText({
45
- model: openai('gpt-5.4'),
45
+ model: openai('gpt-4o-mini'),
46
messages: [
47
{
48
role: 'user',
ts/examples/openai/src/agents-api/experiment.mcp.ts
+1
-1
@@ -45,7 +45,7 @@ const agent = new OpenAIAgent({
45
When fetching emails, provide a clear summary of the results including sender, subject, and date.
46
Be concise and provide actionable information based on the email content.
47
`,
48
- model: 'gpt-5.4',
48
+ model: 'gpt-4o-mini',
49
tools: tools,
50
});
51
ts/examples/openai/src/agents-api/experiment.tool-router.ts
+1
-1
@@ -40,7 +40,7 @@ const agent = new OpenAIAgent({
40
When fetching emails, provide a clear summary of the results including sender, subject, and date.
41
Be concise and provide actionable information based on the email content.
42
`,
43
- model: 'gpt-5.4',
43
+ model: 'gpt-4o-mini',
44
tools: tools,
45
});
46
ts/examples/openai/src/chat-completions.ts
+2
-2
@@ -32,7 +32,7 @@ async function main() {
32
console.log(`🔄 Sending query to OpenAI: "${query}"`);
33
34
const response = await openai.chat.completions.create({
35
- model: 'gpt-5.4',
35
+ model: 'gpt-4o',
36
messages: [
37
{
38
role: 'system',
@@ -64,7 +64,7 @@ async function main() {
64
console.log('✅ Tool execution result:', JSON.parse(toolResult));
65
66
const finalResponse = await openai.chat.completions.create({
67
- model: 'gpt-5.4',
67
+ model: 'gpt-4o',
68
messages: [
69
{
70
role: 'system',
ts/examples/openai/src/index.ts
+1
-1
@@ -35,7 +35,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
35
* Create a chat completion
36
*/
37
const response = await openai.chat.completions.create({
38
- model: 'gpt-5.4',
38
+ model: 'gpt-4o-mini',
39
messages,
40
tools: tools,
41
tool_choice: 'auto',
ts/examples/openai/src/responses-api/experiment.mcp.ts
+1
-1
@@ -41,7 +41,7 @@ console.log({ tools });
41
// 4. Pass tools to OpenAI-specific Agent.
42
const openai = new OpenAI();
43
const emailResponse = await openai.responses.create({
44
- model: 'gpt-5.4',
44
+ model: 'gpt-4o-mini',
45
instructions: `
46
You are a helpful Gmail assistant that fetches and summarizes emails.
47
When fetching emails, provide a clear summary of the results including sender, subject, and date.
ts/examples/openai/src/responses-api/index.ts
+2
-2
@@ -13,7 +13,7 @@ console.log(`✅ Tools fetched from composio`);
13
14
console.log(`🔄 Generating response from OpenAI...`);
15
const initialResponse = await openai.responses.create({
16
- model: 'gpt-5.4',
16
+ model: 'gpt-4.1',
17
input: 'Tell me about the user `pg` in hackernews',
18
tools,
19
});
@@ -40,7 +40,7 @@ const modelInputs = await composio.provider.handleResponse(
40
console.log(`🔄 Submitting tool outputs to OpenAI...`);
41
console.log(JSON.stringify(modelInputs, null, 2));
42
const finalResponse = await openai.responses.create({
43
- model: 'gpt-5.4',
43
+ model: 'gpt-4.1',
44
input: [...initialResponse.output, ...modelInputs],
45
tools,
46
});
ts/examples/openai/src/tools.ts
+1
-1
@@ -16,7 +16,7 @@ const tools = await composio.tools.get('default', {
16
const query = 'What is the user "pg"';
17
18
const response = await openai.chat.completions.create({
19
- model: 'gpt-5.4',
19
+ model: 'gpt-4o',
20
messages: [
21
{
22
role: 'system',
ts/examples/tool-router/src/claude-agent-sdk.ts
+1
-1
@@ -9,7 +9,7 @@ const session = await composio.create('user_123', { toolkits: ['gmail'] });
9
const stream = await query({
10
prompt: 'Use composio tools to fetch my last email from gmail',
11
options: {
12
- model: 'claude-sonnet-4-6',
12
+ model: 'claude-sonnet-4-5-20250929',
13
permissionMode: "bypassPermissions",
14
mcpServers: {
15
composio: {
ts/examples/tool-router/src/index.ts
+1
-1
@@ -13,7 +13,7 @@ const session = await composio.create('user_123', { toolkits: ['gmail'] });
13
const tools = await session.tools(modifiers);
14
15
const stream = await streamText({
16
- model: openai('gpt-5.4'),
16
+ model: openai('gpt-4o-mini'),
17
prompt: 'Find my last email from gmail?',
18
stopWhen: stepCountIs(10),
19
tools,
ts/examples/tool-router/src/langchain.ts
+1
-1
@@ -8,7 +8,7 @@ const composio = new Composio({
8
});
9
10
const llm = new ChatOpenAI({
11
- model: "gpt-5.4",
11
+ model: "gpt-4o",
12
})
13
14
async function main() {
ts/examples/tool-router/src/mcp.ts
+1
-1
@@ -31,7 +31,7 @@ mcpProgress.succeed(`${Object.values(tools).length} tools retrieved from MCP`);
31
32
console.log(`🤖 Waiting for agent response...`);
33
const stream = await streamText({
34
- model: openai('gpt-5.4'),
34
+ model: openai('gpt-4o-mini'),
35
prompt: 'Summarize my latest received email from gmail.',
36
stopWhen: stepCountIs(10),
37
onStepFinish: (step) => {
ts/examples/tools/src/ai.ts
+1
-1
@@ -41,7 +41,7 @@ const messages: OpenAI.ChatCompletionMessageParam[] = [
41
*/
42
console.log('🔄 Creating chat completion...');
43
const response = await openai.chat.completions.create({
44
- model: 'gpt-5.4',
44
+ model: 'gpt-4o-mini',
45
messages,
46
tools: tools,
47
tool_choice: 'auto',
ts/examples/vercel/src/ai.ts
+1
-1
@@ -35,7 +35,7 @@ async function run() {
35
];
36
37
const { text } = await generateText({
38
- model: openai('gpt-5.4'),
38
+ model: openai('gpt-4o-mini'),
39
tools,
40
messages,
41
stopWhen: stepCountIs(5),
ts/examples/vercel/src/stream.ts
+1
-1
@@ -13,7 +13,7 @@ const composio = new Composio({
13
14
const tools = await composio.tools.get('test-user-id', 'HACKERNEWS_GET_FRONTPAGE');
15
const stream = await streamText({
16
- model: openai('gpt-5.4'),
16
+ model: openai('gpt-4o-mini'),
17
tools,
18
prompt: 'Summarize the front page of HackerNews',
19
stopWhen: stepCountIs(5),
ts/examples/vercel/src/tool-loop-agent.ts
+1
-1
@@ -32,7 +32,7 @@ console.log(`✅ Tools loaded: ${Object.keys(tools).join(', ')}`);
32
33
// 3. Create a ToolLoopAgent with Composio tools
34
const hackerNewsAgent = new ToolLoopAgent({
35
- model: openai('gpt-5.4'),
35
+ model: openai('gpt-4o-mini'),
36
instructions: `You are a helpful assistant that can look up information about Hacker News users.
37
When asked about a user, use the available tools to fetch their profile information.
38
Provide a concise summary of the user's profile including their karma, about section, and any other relevant details.`,