@mastra/mcp-docs-server 1.2.17-alpha.19 → 1.2.17-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -200,6 +200,7 @@ Each provider page includes installation instructions, configuration parameters,
200
200
  - [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
201
201
  - [LanceDB](https://mastra.ai/integrations/databases/lancedb)
202
202
  - [libSQL](https://mastra.ai/integrations/databases/libsql)
203
+ - [Mastra](https://mastra.ai/docs/mastra-platform/database)
203
204
  - [MongoDB](https://mastra.ai/integrations/databases/mongodb)
204
205
  - [MSSQL](https://mastra.ai/integrations/databases/mssql)
205
206
  - [Neon Postgres](https://mastra.ai/integrations/databases/neon)
@@ -17,8 +17,6 @@ Each step connects to the next in the workflow through defined schemas that keep
17
17
 
18
18
  Use `.then()` to run steps in order, allowing each step to access the result of the step before it.
19
19
 
20
- ![Chaining steps with .then()](/assets/images/workflows-control-flow-then-bde5e0fbefe5c64c19a8c3471c0e8439.jpg)
21
-
22
20
  ```typescript
23
21
  const step1 = createStep({
24
22
  inputSchema: z.object({
@@ -55,8 +53,6 @@ export const testWorkflow = createWorkflow({
55
53
 
56
54
  Use `.parallel()` to run steps simultaneously. All parallel steps must complete before the workflow continues to the next step. Each step's `id` is used when defining a following step's `inputSchema` and becomes the key on the `inputData` object used to access the previous step's values. The outputs of parallel steps can then be referenced or combined by a following step.
57
55
 
58
- ![Concurrent steps with .parallel()](/assets/images/workflows-control-flow-parallel-8e7fe60f1c4daa510431b37c973f6f8d.jpg)
59
-
60
56
  ```typescript
61
57
  const step1 = createStep({
62
58
  id: 'step-1',
@@ -8,8 +8,6 @@ Some workflows need to pause for human input before continuing. When a workflow
8
8
 
9
9
  Human-in-the-loop (HITL) input works much like [pausing a workflow](https://mastra.ai/docs/workflows/suspend-and-resume) using `suspend()`. The key difference is that when human input is required, you can return `suspend()` with a payload that provides context or guidance to the user on how to continue.
10
10
 
11
- ![Pausing a workflow with suspend()](/assets/images/workflows-suspend-4540783670f918109ac35beaf4db914b.jpg)
12
-
13
11
  ```typescript
14
12
  import { createWorkflow, createStep } from '@mastra/core/workflows'
15
13
  import { z } from 'zod'
@@ -93,8 +91,6 @@ The data returned by the step can include a reason and help the user understand
93
91
 
94
92
  As with [restarting a workflow](https://mastra.ai/docs/workflows/suspend-and-resume), use `resume()` with `resumeData` to continue a workflow after receiving input from a human. The workflow resumes from the step where it was paused.
95
93
 
96
- ![Restarting a workflow with resume()](/assets/images/workflows-resume-1e54b4d0c753ff79571f6d6b05109a60.jpg)
97
-
98
94
  ```typescript
99
95
  const workflow = mastra.getWorkflow('testWorkflow')
100
96
  const run = await workflow.createRun()
@@ -11,8 +11,6 @@ Use `suspend()` to pause workflow execution at a specific step. You can define a
11
11
  - If the condition isn’t met, the workflow pauses and returns `suspend()`.
12
12
  - If the condition is met, the workflow continues with the remaining logic in the step.
13
13
 
14
- ![Pausing a workflow with suspend()](/assets/images/workflows-suspend-4540783670f918109ac35beaf4db914b.jpg)
15
-
16
14
  ```typescript
17
15
  const step1 = createStep({
18
16
  id: 'step-1',
@@ -56,8 +54,6 @@ export const testWorkflow = createWorkflow({
56
54
 
57
55
  Use `resume()` to restart a suspended workflow from the step where it paused. Pass `resumeData` matching the step's `resumeSchema` to satisfy the suspend condition and continue execution.
58
56
 
59
- ![Restarting a workflow with resume()](/assets/images/workflows-resume-1e54b4d0c753ff79571f6d6b05109a60.jpg)
60
-
61
57
  ```typescript
62
58
  import { step1 } from './workflows/test-workflow'
63
59
 
@@ -55,6 +55,7 @@
55
55
  - [Laminar](https://mastra.ai/integrations/observability/laminar)
56
56
  - [Langfuse](https://mastra.ai/integrations/observability/langfuse)
57
57
  - [LangSmith](https://mastra.ai/integrations/observability/langsmith)
58
+ - [Mastra](https://mastra.ai/docs/mastra-platform/observability)
58
59
  - [OpenTelemetry](https://mastra.ai/integrations/observability/opentelemetry)
59
60
  - [PostHog](https://mastra.ai/integrations/observability/posthog)
60
61
  - [Sentry](https://mastra.ai/integrations/observability/sentry)
@@ -71,6 +72,7 @@
71
72
  - [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
72
73
  - [LanceDB](https://mastra.ai/integrations/databases/lancedb)
73
74
  - [libSQL](https://mastra.ai/integrations/databases/libsql)
75
+ - [Mastra](https://mastra.ai/docs/mastra-platform/database)
74
76
  - [MongoDB](https://mastra.ai/integrations/databases/mongodb)
75
77
  - [MSSQL](https://mastra.ai/integrations/databases/mssql)
76
78
  - [Neon Postgres](https://mastra.ai/integrations/databases/neon)
@@ -90,7 +90,6 @@ List of required environment variables for each model provider and gateway suppo
90
90
  | [LucidQuery](https://mastra.ai/models/providers/lucidquery) | `lucidquery/*` | `LUCIDQUERY_API_KEY` |
91
91
  | [Lynkr](https://mastra.ai/models/providers/lynkr) | `lynkr/*` | `LYNKR_API_KEY` |
92
92
  | [Meganova](https://mastra.ai/models/providers/meganova) | `meganova/*` | `MEGANOVA_API_KEY` |
93
- | [Merge Gateway](https://mastra.ai/models/providers/merge-gateway) | `merge-gateway/*` | `MERGE_GATEWAY_API_KEY` |
94
93
  | [Meta](https://mastra.ai/models/providers/meta) | `meta/*` | `META_MODEL_API_KEY` |
95
94
  | [MiniMax (minimax.io)](https://mastra.ai/models/providers/minimax) | `minimax/*` | `MINIMAX_API_KEY` |
96
95
  | [MiniMax (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn) | `minimax-cn/*` | `MINIMAX_API_KEY` |
@@ -136,7 +135,7 @@ List of required environment variables for each model provider and gateway suppo
136
135
  | [Sarvam AI](https://mastra.ai/models/providers/sarvam) | `sarvam/*` | `SARVAM_API_KEY` |
137
136
  | [Scaleway](https://mastra.ai/models/providers/scaleway) | `scaleway/*` | `SCALEWAY_API_KEY` |
138
137
  | [SCNet Token Plan](https://mastra.ai/models/providers/scnet-token-plan) | `scnet-token-plan/*` | `SCNET_API_KEY` |
139
- | [SCX.ai](https://mastra.ai/models/providers/scx) | `scx/*` | `SCX_API_KEY` |
138
+ | [SCX.ai](https://mastra.ai/models/providers/scx-ai) | `scx-ai/*` | `SCX_API_KEY` |
140
139
  | [SiliconFlow](https://mastra.ai/models/providers/siliconflow) | `siliconflow/*` | `SILICONFLOW_API_KEY` |
141
140
  | [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn) | `siliconflow-cn/*` | `SILICONFLOW_CN_API_KEY` |
142
141
  | [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex) | `snowflake-cortex/*` | `SNOWFLAKE_ACCOUNT`, `SNOWFLAKE_CORTEX_PAT` |
@@ -180,6 +179,7 @@ List of required environment variables for each model provider and gateway suppo
180
179
  | [Zhipu AI Coding Plan](https://mastra.ai/models/providers/zhipuai-coding-plan) | `zhipuai-coding-plan/*` | `ZHIPU_API_KEY` |
181
180
  | [Azure OpenAI](https://mastra.ai/models/gateways/azure-openai) (Gateway) | `azure-openai/*` | `AZURE_API_KEY`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID` |
182
181
  | [Mastra](https://mastra.ai/models/gateways/mastra) (Gateway) | `mastra/*` | `MASTRA_GATEWAY_API_KEY` |
182
+ | [Merge Gateway](https://mastra.ai/models/gateways/merge-gateway) (Gateway) | `merge-gateway/*` | `MERGE_GATEWAY_API_KEY` |
183
183
  | [Neon](https://mastra.ai/models/gateways/neon) (Gateway) | `neon/*` | `NEON_AI_GATEWAY_BASE_URL`, `NEON_AI_GATEWAY_TOKEN` |
184
184
  | [Netlify](https://mastra.ai/models/gateways/netlify) (Gateway) | `netlify/*` | `NETLIFY_TOKEN`, `NETLIFY_SITE_ID` |
185
185
  | [OpenRouter](https://mastra.ai/models/gateways/openrouter) (Gateway) | `openrouter/*` | `OPENROUTER_API_KEY` |
@@ -0,0 +1,212 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![Merge Gateway logo](https://models.dev/logos/merge-gateway.svg)Merge Gateway
4
+
5
+ Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 174 models through Mastra's model router.
6
+
7
+ Learn more in the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway).
8
+
9
+ ## Usage
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "merge-gateway/anthropic/claude-3-7-sonnet-20250219"
19
+ });
20
+ ```
21
+
22
+ > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway) for details.
23
+
24
+ ## Configuration
25
+
26
+ ```bash
27
+ # Use gateway API key
28
+ MERGE_GATEWAY_API_KEY=your-gateway-key
29
+
30
+ # Or use provider API keys directly
31
+ OPENAI_API_KEY=sk-...
32
+ ANTHROPIC_API_KEY=ant-...
33
+ ```
34
+
35
+ ## Available models
36
+
37
+ | Model |
38
+ | ------------------------------------------------ |
39
+ | `anthropic/claude-3-7-sonnet-20250219` |
40
+ | `anthropic/claude-fable-5` |
41
+ | `anthropic/claude-haiku-4-5-20251001` |
42
+ | `anthropic/claude-opus-4-1-20250805` |
43
+ | `anthropic/claude-opus-4-20250514` |
44
+ | `anthropic/claude-opus-4-5-20251101` |
45
+ | `anthropic/claude-opus-4-6` |
46
+ | `anthropic/claude-opus-4-7` |
47
+ | `anthropic/claude-opus-4-8` |
48
+ | `anthropic/claude-opus-5` |
49
+ | `anthropic/claude-sonnet-4-20250514` |
50
+ | `anthropic/claude-sonnet-4-5-20250929` |
51
+ | `anthropic/claude-sonnet-4-6` |
52
+ | `anthropic/claude-sonnet-5` |
53
+ | `bytedance/dola-seed-2.0-code` |
54
+ | `bytedance/dola-seed-2.0-code-preview` |
55
+ | `bytedance/dola-seed-2.0-lite` |
56
+ | `bytedance/dola-seed-2.0-mini` |
57
+ | `bytedance/dola-seed-2.0-pro` |
58
+ | `cohere/command-a-03-2025` |
59
+ | `cohere/command-r-08-2024` |
60
+ | `cohere/command-r-plus-08-2024` |
61
+ | `cohere/command-r7b-12-2024` |
62
+ | `deepseek/deepseek-r1` |
63
+ | `deepseek/deepseek-v3` |
64
+ | `deepseek/deepseek-v3.1` |
65
+ | `deepseek/deepseek-v3.2` |
66
+ | `deepseek/deepseek-v4-flash` |
67
+ | `deepseek/deepseek-v4-flash-0731` |
68
+ | `deepseek/deepseek-v4-pro` |
69
+ | `deepseek/deepseek-v4-pro-0813` |
70
+ | `google/gemini-2.5-computer-use-preview-10-2025` |
71
+ | `google/gemini-2.5-flash` |
72
+ | `google/gemini-2.5-flash-image` |
73
+ | `google/gemini-2.5-flash-lite` |
74
+ | `google/gemini-2.5-pro` |
75
+ | `google/gemini-3-flash-preview` |
76
+ | `google/gemini-3-pro-image` |
77
+ | `google/gemini-3-pro-preview` |
78
+ | `google/gemini-3.1-flash-image` |
79
+ | `google/gemini-3.1-flash-lite` |
80
+ | `google/gemini-3.1-flash-lite-preview` |
81
+ | `google/gemini-3.1-pro-preview` |
82
+ | `google/gemini-3.1-pro-preview-customtools` |
83
+ | `google/gemini-3.5-flash` |
84
+ | `google/gemini-3.5-flash-lite` |
85
+ | `google/gemini-3.6-flash` |
86
+ | `google/gemini-3.7-flash` |
87
+ | `google/gemini-embedding-001` |
88
+ | `google/gemini-flash-latest` |
89
+ | `google/gemini-flash-lite-latest` |
90
+ | `google/gemma-4-26b-a4b-it` |
91
+ | `google/gemma-4-31b-it` |
92
+ | `meta/llama-3.1-8b-instruct` |
93
+ | `meta/llama-3.3-70b-instruct` |
94
+ | `meta/muse-spark-1.1` |
95
+ | `meta/muse-spark-1.2` |
96
+ | `minimax/minimax-m2` |
97
+ | `minimax/minimax-m2.1` |
98
+ | `minimax/minimax-m2.5` |
99
+ | `minimax/minimax-m2.5-highspeed` |
100
+ | `minimax/minimax-m2.7` |
101
+ | `minimax/minimax-m2.7-highspeed` |
102
+ | `minimax/minimax-m3` |
103
+ | `mistral/codestral-latest` |
104
+ | `mistral/devstral-2512` |
105
+ | `mistral/devstral-medium-2507` |
106
+ | `mistral/devstral-medium-latest` |
107
+ | `mistral/devstral-small-2507` |
108
+ | `mistral/magistral-medium-latest` |
109
+ | `mistral/mistral-large-2411` |
110
+ | `mistral/mistral-large-2512` |
111
+ | `mistral/mistral-large-latest` |
112
+ | `mistral/mistral-medium-2505` |
113
+ | `mistral/mistral-medium-latest` |
114
+ | `mistral/mistral-small-latest` |
115
+ | `mistral/pixtral-large-latest` |
116
+ | `moonshot/kimi-k2.5` |
117
+ | `moonshot/kimi-k2.6` |
118
+ | `moonshot/kimi-k2.7-code` |
119
+ | `moonshot/kimi-k2.7-code-highspeed` |
120
+ | `moonshot/kimi-k3` |
121
+ | `moonshotai/kimi-k2-thinking` |
122
+ | `nvidia/nemotron-3.5-lightning-30b-a3b` |
123
+ | `nvidia/nemotron-nano-9b-v2` |
124
+ | `openai/gpt-3.5-turbo` |
125
+ | `openai/gpt-4` |
126
+ | `openai/gpt-4-turbo` |
127
+ | `openai/gpt-4.1` |
128
+ | `openai/gpt-4.1-mini` |
129
+ | `openai/gpt-4.1-nano` |
130
+ | `openai/gpt-4o` |
131
+ | `openai/gpt-4o-2024-05-13` |
132
+ | `openai/gpt-4o-2024-08-06` |
133
+ | `openai/gpt-4o-2024-11-20` |
134
+ | `openai/gpt-4o-mini` |
135
+ | `openai/gpt-5` |
136
+ | `openai/gpt-5-chat-latest` |
137
+ | `openai/gpt-5-mini` |
138
+ | `openai/gpt-5-nano` |
139
+ | `openai/gpt-5.1` |
140
+ | `openai/gpt-5.1-chat-latest` |
141
+ | `openai/gpt-5.2` |
142
+ | `openai/gpt-5.2-chat-latest` |
143
+ | `openai/gpt-5.3-chat-latest` |
144
+ | `openai/gpt-5.4` |
145
+ | `openai/gpt-5.4-mini` |
146
+ | `openai/gpt-5.4-nano` |
147
+ | `openai/gpt-5.5` |
148
+ | `openai/gpt-5.6-luna` |
149
+ | `openai/gpt-5.6-sol` |
150
+ | `openai/gpt-5.6-terra` |
151
+ | `openai/gpt-oss-120b` |
152
+ | `openai/gpt-oss-20b` |
153
+ | `openai/gpt-oss-safeguard-120b` |
154
+ | `openai/o1` |
155
+ | `openai/o3` |
156
+ | `openai/o3-mini` |
157
+ | `openai/o4-mini` |
158
+ | `qwen/qwen-flash` |
159
+ | `qwen/qwen-plus` |
160
+ | `qwen/qwen3-235b-a22b` |
161
+ | `qwen/qwen3-235b-a22b-instruct-2507` |
162
+ | `qwen/qwen3-30b-a3b` |
163
+ | `qwen/qwen3-32b` |
164
+ | `qwen/qwen3-coder-480b-a35b-instruct` |
165
+ | `qwen/qwen3-coder-flash` |
166
+ | `qwen/qwen3-coder-next` |
167
+ | `qwen/qwen3-coder-plus` |
168
+ | `qwen/qwen3-max` |
169
+ | `qwen/qwen3-next-80b-a3b-instruct` |
170
+ | `qwen/qwen3-next-80b-a3b-thinking` |
171
+ | `qwen/qwen3-vl-235b-a22b-instruct` |
172
+ | `qwen/qwen3-vl-235b-a22b-thinking` |
173
+ | `qwen/qwen3-vl-plus` |
174
+ | `qwen/qwen3.5-122b-a10b` |
175
+ | `qwen/qwen3.5-27b` |
176
+ | `qwen/qwen3.5-35b-a3b` |
177
+ | `qwen/qwen3.5-397b-a17b` |
178
+ | `qwen/qwen3.5-9b` |
179
+ | `qwen/qwen3.5-flash` |
180
+ | `qwen/qwen3.5-plus` |
181
+ | `qwen/qwen3.6-27b` |
182
+ | `qwen/qwen3.6-35b-a3b` |
183
+ | `qwen/qwen3.6-flash` |
184
+ | `qwen/qwen3.6-max-preview` |
185
+ | `qwen/qwen3.6-plus` |
186
+ | `qwen/qwen3.7-max` |
187
+ | `qwen/qwen3.7-plus` |
188
+ | `qwen/qwen3.8-2.4t-a95b` |
189
+ | `qwen/qwen3.8-max` |
190
+ | `sakana/fugu-ultra` |
191
+ | `sakana/sakana-namazu` |
192
+ | `thinkingmachines/inkling` |
193
+ | `writer/palmyra-x4` |
194
+ | `writer/palmyra-x5` |
195
+ | `xai/grok-4.20-0309-non-reasoning` |
196
+ | `xai/grok-4.20-0309-reasoning` |
197
+ | `xai/grok-4.3` |
198
+ | `xai/grok-4.5` |
199
+ | `xai/grok-4.6` |
200
+ | `xai/grok-build-0.1` |
201
+ | `zai/glm-4.5` |
202
+ | `zai/glm-4.5-air` |
203
+ | `zai/glm-4.5v` |
204
+ | `zai/glm-4.6` |
205
+ | `zai/glm-4.7` |
206
+ | `zai/glm-4.7-flash` |
207
+ | `zai/glm-4.7-flashx` |
208
+ | `zai/glm-5` |
209
+ | `zai/glm-5-turbo` |
210
+ | `zai/glm-5.1` |
211
+ | `zai/glm-5.2` |
212
+ | `zai/glm-5.3` |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![OpenRouter logo](https://models.dev/logos/openrouter.svg)OpenRouter
4
4
 
5
- OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 350 models through Mastra's model router.
5
+ OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 353 models through Mastra's model router.
6
6
 
7
7
  Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
8
8
 
@@ -149,6 +149,7 @@ ANTHROPIC_API_KEY=ant-...
149
149
  | `kwaipilot/kat-coder-air-v2.5` |
150
150
  | `kwaipilot/kat-coder-pro-v2` |
151
151
  | `kwaipilot/kat-coder-pro-v2.5` |
152
+ | `liquid/lfm-2.5-2.6b:free` |
152
153
  | `mancer/weaver` |
153
154
  | `meituan/longcat-2.0` |
154
155
  | `meta-llama/llama-3.1-70b-instruct` |
@@ -385,4 +386,6 @@ ANTHROPIC_API_KEY=ant-...
385
386
  | `z-ai/glm-5-turbo` |
386
387
  | `z-ai/glm-5.1` |
387
388
  | `z-ai/glm-5.2` |
389
+ | `z-ai/glm-5.2:free` |
390
+ | `z-ai/glm-5.3` |
388
391
  | `z-ai/glm-5v-turbo` |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Vercel logo](https://models.dev/logos/vercel.svg)Vercel
4
4
 
5
- Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 347 models through Mastra's model router.
5
+ Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 348 models through Mastra's model router.
6
6
 
7
7
  Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
8
8
 
@@ -382,4 +382,5 @@ ANTHROPIC_API_KEY=ant-...
382
382
  | `zai/glm-5.1` |
383
383
  | `zai/glm-5.2` |
384
384
  | `zai/glm-5.2-fast` |
385
+ | `zai/glm-5.3` |
385
386
  | `zai/glm-5v-turbo` |
@@ -12,6 +12,7 @@ Create custom gateways for private LLM deployments or specialized provider integ
12
12
 
13
13
  - [Azure OpenAI](https://mastra.ai/models/gateways/azure-openai)
14
14
  - [Mastra](https://mastra.ai/models/gateways/mastra)
15
+ - [Merge Gateway](https://mastra.ai/models/gateways/merge-gateway)
15
16
  - [Neon](https://mastra.ai/models/gateways/neon)
16
17
  - [Netlify](https://mastra.ai/models/gateways/netlify)
17
18
  - [OpenRouter](https://mastra.ai/models/gateways/openrouter)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Model Providers
4
4
 
5
- Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 6097 models from 178 providers through a single API.
5
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 6106 models from 178 providers through a single API.
6
6
 
7
7
  ## Features
8
8
 
@@ -36,14 +36,14 @@ for await (const chunk of stream) {
36
36
 
37
37
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
38
  | ----------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
- | `ambient/ambient/large` | 203K | | | | | | $1 | $4 |
39
+ | `ambient/ambient/large` | 203K | | | | | | $0.60 | $2 |
40
40
  | `ambient/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
41
41
  | `ambient/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
42
42
  | `ambient/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
43
43
  | `ambient/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.69 | $3 |
44
44
  | `ambient/stepfun/step-3.7-flash` | 262K | | | | | | $0.19 | $1 |
45
45
  | `ambient/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 |
46
- | `ambient/z-ai/glm-5.2` | 203K | | | | | | $1 | $4 |
46
+ | `ambient/z-ai/glm-5.2` | 203K | | | | | | $0.60 | $2 |
47
47
  | `ambient/zai-org/GLM-5.1-FP8` | 203K | | | | | | $1 | $4 |
48
48
  | `ambient/zai-org/GLM-5.2-FP8` | 203K | | | | | | $1 | $4 |
49
49
 
@@ -46,7 +46,7 @@ for await (const chunk of stream) {
46
46
  | `chutes/Qwen/Qwen3-32B-TEE` | 41K | | | | | | $0.10 | $0.42 |
47
47
  | `chutes/Qwen/Qwen3.5-397B-A17B-TEE` | 262K | | | | | | $0.45 | $3 |
48
48
  | `chutes/Qwen/Qwen3.6-27B-TEE` | 262K | | | | | | $0.30 | $2 |
49
- | `chutes/Qwen/Qwen3.8-27B-TEE` | 262K | | | | | | $0.40 | $3 |
49
+ | `chutes/Qwen/Qwen3.8-27B-TEE` | 262K | | | | | | $0.45 | $3 |
50
50
  | `chutes/unsloth/Mistral-Nemo-Instruct-2407-TEE` | 131K | | | | | | $0.02 | $0.10 |
51
51
  | `chutes/zai-org/GLM-5.1-TEE` | 203K | | | | | | $0.98 | $3 |
52
52
  | `chutes/zai-org/GLM-5.2-TEE` | 1.0M | | | | | | $1 | $4 |
@@ -100,8 +100,8 @@ for await (const chunk of stream) {
100
100
  | `edenai/deepinfra/zai-org/GLM-4.7-Flash` | 203K | | | | | | $0.06 | $0.40 |
101
101
  | `edenai/deepseek/deepseek-chat` | 131K | | | | | | $0.28 | $0.42 |
102
102
  | `edenai/deepseek/deepseek-reasoner` | 131K | | | | | | $0.28 | $0.42 |
103
- | `edenai/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.22 | $0.66 |
104
- | `edenai/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.66 | $2 |
103
+ | `edenai/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
104
+ | `edenai/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
105
105
  | `edenai/fireworks_ai/accounts/fireworks/models/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
106
106
  | `edenai/fireworks_ai/accounts/fireworks/models/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
107
107
  | `edenai/fireworks_ai/accounts/fireworks/models/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
@@ -158,7 +158,7 @@ for await (const chunk of stream) {
158
158
  | `edenai/moonshot/kimi-k3` | 1.0M | | | | | | $3 | $15 |
159
159
  | `edenai/nebius/meta-llama/Llama-3.3-70B-Instruct` | 131K | | | | | | $0.13 | $0.40 |
160
160
  | `edenai/nebius/nvidia/nemotron-3-super-120b-a12b` | 8K | | | | | | $0.30 | $0.90 |
161
- | `edenai/nebius/nvidia/Nemotron-3-Ultra-550b-a55b` | 8K | | | | | | $1 | $3 |
161
+ | `edenai/nebius/nvidia/Nemotron-3-Ultra-550b-a55b` | 1.0M | | | | | | $1 | $3 |
162
162
  | `edenai/nebius/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
163
163
  | `edenai/openai/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
164
164
  | `edenai/openai/gpt-4` | 8K | | | | | | $30 | $60 |
@@ -203,7 +203,7 @@ for await (const chunk of stream) {
203
203
  | `edenai/perplexityai/sonar-pro` | 200K | | | | | | $3 | $15 |
204
204
  | `edenai/perplexityai/sonar-reasoning-pro` | 128K | | | | | | $2 | $8 |
205
205
  | `edenai/qwen/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.20 | $0.40 |
206
- | `edenai/qwen/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
206
+ | `edenai/qwen/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.66 | $2 |
207
207
  | `edenai/qwen/qwen-max` | 33K | | | | | | $2 | $6 |
208
208
  | `edenai/qwen/qwen-vl-max` | 131K | | | | | | $0.80 | $3 |
209
209
  | `edenai/qwen/qwen-vl-plus` | 131K | | | | | | $0.21 | $0.63 |
@@ -222,7 +222,7 @@ for await (const chunk of stream) {
222
222
  | `edenai/qwen/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
223
223
  | `edenai/qwen/qwq-plus` | 131K | | | | | | $0.80 | $2 |
224
224
  | `edenai/scaleway/deepseek-v4-flash-0731` | 256K | | | | | | $0.46 | $0.93 |
225
- | `edenai/scaleway/gpt-oss-120b` | 128K | | | | | | $0.17 | $0.70 |
225
+ | `edenai/scaleway/gpt-oss-120b` | 128K | | | | | | $0.17 | $0.69 |
226
226
  | `edenai/scaleway/llama-3.3-70b-instruct` | 128K | | | | | | $1 | $1 |
227
227
  | `edenai/tensorx/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.25 | $0.30 |
228
228
  | `edenai/tensorx/moonshotai/kimi-k2.5` | 262K | | | | | | $0.50 | $3 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Hetzner logo](https://models.dev/logos/hetzner.svg)Hetzner
4
4
 
5
- Access 4 Hetzner models through Mastra's model router. Authentication is handled automatically using the `HETZNER_API_KEY` environment variable.
5
+ Access 2 Hetzner models through Mastra's model router. Authentication is handled automatically using the `HETZNER_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Hetzner documentation](https://experiments.hetzner.com).
8
8
 
@@ -17,7 +17,7 @@ const agent = new Agent({
17
17
  id: "my-agent",
18
18
  name: "My Agent",
19
19
  instructions: "You are a helpful assistant",
20
- model: "hetzner/DeepSeek-V4-Flash-0731"
20
+ model: "hetzner/Qwen/Qwen3.6-35B-A3B-FP8"
21
21
  });
22
22
 
23
23
  // Generate a response
@@ -36,10 +36,8 @@ for await (const chunk of stream) {
36
36
 
37
37
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
38
  | ---------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
- | `hetzner/DeepSeek-V4-Flash-0731` | 512K | | | | | | — | — |
40
- | `hetzner/GLM-5.2-NVFP4` | 512K | | | | | | — | — |
41
- | `hetzner/Kimi-K2.7-Code` | 262K | | | | | | — | — |
42
39
  | `hetzner/Qwen/Qwen3.6-35B-A3B-FP8` | 262K | | | | | | — | — |
40
+ | `hetzner/Qwen3.8-27B` | 262K | | | | | | — | — |
43
41
 
44
42
  ## Advanced configuration
45
43
 
@@ -51,7 +49,7 @@ const agent = new Agent({
51
49
  name: "custom-agent",
52
50
  model: {
53
51
  url: "https://inference.hetzner.com/api/v1",
54
- id: "hetzner/DeepSeek-V4-Flash-0731",
52
+ id: "hetzner/Qwen/Qwen3.6-35B-A3B-FP8",
55
53
  apiKey: process.env.HETZNER_API_KEY,
56
54
  headers: {
57
55
  "X-Custom-Header": "value"
@@ -69,8 +67,8 @@ const agent = new Agent({
69
67
  model: ({ requestContext }) => {
70
68
  const useAdvanced = requestContext.task === "complex";
71
69
  return useAdvanced
72
- ? "hetzner/Qwen/Qwen3.6-35B-A3B-FP8"
73
- : "hetzner/DeepSeek-V4-Flash-0731";
70
+ ? "hetzner/Qwen3.8-27B"
71
+ : "hetzner/Qwen/Qwen3.6-35B-A3B-FP8";
74
72
  }
75
73
  });
76
74
  ```
@@ -41,17 +41,17 @@ for await (const chunk of stream) {
41
41
  | `hyper/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
42
42
  | `hyper/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
43
43
  | `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.12 | $0.42 |
44
- | `hyper/glm-5` | 203K | | | | | | $0.80 | $3 |
45
- | `hyper/glm-5.1` | 203K | | | | | | $2 | $5 |
44
+ | `hyper/glm-5` | 203K | | | | | | $0.84 | $3 |
45
+ | `hyper/glm-5.1` | 203K | | | | | | $1 | $4 |
46
46
  | `hyper/glm-5.2` | 1.0M | | | | | | $1 | $4 |
47
47
  | `hyper/gpt-oss-120b` | 131K | | | | | | $0.16 | $0.65 |
48
- | `hyper/kimi-k2.5` | 262K | | | | | | $0.51 | $3 |
48
+ | `hyper/kimi-k2.5` | 262K | | | | | | $0.57 | $3 |
49
49
  | `hyper/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
50
50
  | `hyper/kimi-k2.7-code` | 256K | | | | | | $0.95 | $4 |
51
51
  | `hyper/kimi-k3` | 1.0M | | | | | | $3 | $15 |
52
- | `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.60 | $0.74 |
52
+ | `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.64 | $0.77 |
53
53
  | `hyper/llama-4-maverick-17b-128e-instruct-fp8` | 430K | | | | | | $0.27 | $0.90 |
54
- | `hyper/minimax-m2.7` | 262K | | | | | | $0.41 | $2 |
54
+ | `hyper/minimax-m2.7` | 262K | | | | | | $0.47 | $2 |
55
55
  | `hyper/minimax-m3` | 512K | | | | | | $0.33 | $1 |
56
56
  | `hyper/qwen3-coder-480b-a35b-instruct-int4-mixed-ar` | 106K | | | | | | $0.45 | $2 |
57
57
  | `hyper/qwen3-next-80b-a3b-instruct` | 262K | | | | | | $0.12 | $1 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Kilo Gateway logo](https://models.dev/logos/kilo.svg)Kilo Gateway
4
4
 
5
- Access 358 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
5
+ Access 360 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Kilo Gateway documentation](https://kilo.ai).
8
8
 
@@ -40,7 +40,7 @@ for await (const chunk of stream) {
40
40
  | `kilo/~anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
41
41
  | `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $5 | $25 |
42
42
  | `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
43
- | `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.08 | $0.16 |
43
+ | `kilo/~deepseek/deepseek-v4-flash-latest` | 262K | | | | | | $0.08 | $0.15 |
44
44
  | `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $0.38 | $2 |
45
45
  | `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
46
46
  | `kilo/~moonshotai/kimi-latest` | 975K | | | | | | $3 | $13 |
@@ -128,7 +128,7 @@ for await (const chunk of stream) {
128
128
  | `kilo/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
129
129
  | `kilo/google/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
130
130
  | `kilo/google/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
131
- | `kilo/google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
131
+ | `kilo/google/gemini-3.7-flash` | 1.0M | | | | | | $2 | $8 |
132
132
  | `kilo/google/gemma-2-27b-it` | 8K | | | | | | $0.65 | $0.65 |
133
133
  | `kilo/google/gemma-3-12b-it` | 131K | | | | | | $0.05 | $0.15 |
134
134
  | `kilo/google/gemma-3-27b-it` | 131K | | | | | | $0.08 | $0.16 |
@@ -154,6 +154,7 @@ for await (const chunk of stream) {
154
154
  | `kilo/kwaipilot/kat-coder-air-v2.5` | 256K | | | | | | $0.15 | $0.60 |
155
155
  | `kilo/kwaipilot/kat-coder-pro-v2` | 256K | | | | | | $0.30 | $1 |
156
156
  | `kilo/kwaipilot/kat-coder-pro-v2.5` | 256K | | | | | | $0.74 | $3 |
157
+ | `kilo/liquid/lfm-2.5-2.6b:free` | 128K | | | | | | — | — |
157
158
  | `kilo/mancer/weaver` | 8K | | | | | | $0.50 | $0.75 |
158
159
  | `kilo/meituan/longcat-2.0` | 1.0M | | | | | | $0.75 | $3 |
159
160
  | `kilo/meta-llama/llama-3.1-70b-instruct` | 131K | | | | | | $0.40 | $0.40 |
@@ -393,6 +394,7 @@ for await (const chunk of stream) {
393
394
  | `kilo/z-ai/glm-5-turbo` | 203K | | | | | | $1 | $4 |
394
395
  | `kilo/z-ai/glm-5.1` | 200K | | | | | | $1 | $4 |
395
396
  | `kilo/z-ai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
397
+ | `kilo/z-ai/glm-5.3` | 1.0M | | | | | | $1 | $4 |
396
398
  | `kilo/z-ai/glm-5v-turbo` | 203K | | | | | | $1 | $4 |
397
399
 
398
400
  ## Advanced configuration
@@ -55,7 +55,7 @@ for await (const chunk of stream) {
55
55
  | `llmgateway/cosmos3-super-reasoner` | 262K | | | | | | $0.10 | $0.30 |
56
56
  | `llmgateway/custom` | 128K | | | | | | — | — |
57
57
  | `llmgateway/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.38 |
58
- | `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.08 | $0.15 |
58
+ | `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.05 | $0.09 |
59
59
  | `llmgateway/deepseek-v4-pro` | 1.1M | | | | | | $0.43 | $0.87 |
60
60
  | `llmgateway/ernie-4.5-vl-424b-a47b` | 123K | | | | | | $0.42 | $1 |
61
61
  | `llmgateway/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
@@ -176,7 +176,7 @@ for await (const chunk of stream) {
176
176
  | `llmgateway/nemotron-3-nano-30b` | 262K | | | | | | $0.06 | $0.24 |
177
177
  | `llmgateway/nemotron-3-nano-omni` | 262K | | | | | | $0.06 | $0.24 |
178
178
  | `llmgateway/nemotron-3-super-120b` | 262K | | | | | | $0.30 | $0.90 |
179
- | `llmgateway/nemotron-3-ultra-550b` | 1.0M | | | | | | $0.50 | $3 |
179
+ | `llmgateway/nemotron-3-ultra-550b` | 1.0M | | | | | | $0.50 | $2 |
180
180
  | `llmgateway/o1` | 200K | | | | | | $15 | $60 |
181
181
  | `llmgateway/o3` | 200K | | | | | | $2 | $8 |
182
182
  | `llmgateway/o3-mini` | 200K | | | | | | $1 | $4 |
@@ -194,7 +194,7 @@ for await (const chunk of stream) {
194
194
  | `llmgateway/qwen3-30b-a3b-instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
195
195
  | `llmgateway/qwen3-32b` | 41K | | | | | | $0.10 | $0.30 |
196
196
  | `llmgateway/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.07 | $0.27 |
197
- | `llmgateway/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.30 | $1 |
197
+ | `llmgateway/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.38 | $2 |
198
198
  | `llmgateway/qwen3-coder-flash` | 1.0M | | | | | | $0.30 | $2 |
199
199
  | `llmgateway/qwen3-coder-next` | 262K | | | | | | $0.11 | $0.68 |
200
200
  | `llmgateway/qwen3-coder-plus` | 1.0M | | | | | | $6 | $60 |
@@ -0,0 +1,76 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![SCX.ai logo](https://models.dev/logos/scx-ai.svg)SCX.ai
4
+
5
+ Access 4 SCX.ai models through Mastra's model router. Authentication is handled automatically using the `SCX_API_KEY` environment variable.
6
+
7
+ Learn more in the [SCX.ai documentation](https://platform.scx.ai/docs).
8
+
9
+ ```bash
10
+ SCX_API_KEY=your-api-key
11
+ ```
12
+
13
+ ```typescript
14
+ import { Agent } from "@mastra/core/agent";
15
+
16
+ const agent = new Agent({
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "scx-ai/GLM-5.2"
21
+ });
22
+
23
+ // Generate a response
24
+ const response = await agent.generate("Hello!");
25
+
26
+ // Stream a response
27
+ const stream = await agent.stream("Tell me a story");
28
+ for await (const chunk of stream) {
29
+ console.log(chunk);
30
+ }
31
+ ```
32
+
33
+ > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [SCX.ai documentation](https://platform.scx.ai/docs) for details.
34
+
35
+ ## Models
36
+
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | --------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `scx-ai/GLM-5.2` | 1.0M | | | | | | $0.55 | $2 |
40
+ | `scx-ai/gpt-oss-120b` | 131K | | | | | | $0.17 | $0.55 |
41
+ | `scx-ai/MiniMax-M2.7` | 197K | | | | | | $0.48 | $2 |
42
+ | `scx-ai/Qwen3.8-Max` | 1.0M | | | | | | $2 | $5 |
43
+
44
+ ## Advanced configuration
45
+
46
+ ### Custom headers
47
+
48
+ ```typescript
49
+ const agent = new Agent({
50
+ id: "custom-agent",
51
+ name: "custom-agent",
52
+ model: {
53
+ url: "https://api.scx.ai/v1",
54
+ id: "scx-ai/GLM-5.2",
55
+ apiKey: process.env.SCX_API_KEY,
56
+ headers: {
57
+ "X-Custom-Header": "value"
58
+ }
59
+ }
60
+ });
61
+ ```
62
+
63
+ ### Dynamic model selection
64
+
65
+ ```typescript
66
+ const agent = new Agent({
67
+ id: "dynamic-agent",
68
+ name: "Dynamic Agent",
69
+ model: ({ requestContext }) => {
70
+ const useAdvanced = requestContext.task === "complex";
71
+ return useAdvanced
72
+ ? "scx-ai/gpt-oss-120b"
73
+ : "scx-ai/GLM-5.2";
74
+ }
75
+ });
76
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Weights & Biases logo](https://models.dev/logos/wandb.svg)Weights & Biases
4
4
 
5
- Access 28 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
5
+ Access 29 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
8
8
 
@@ -62,6 +62,7 @@ for await (const chunk of stream) {
62
62
  | `wandb/Qwen/Qwen3.5-35B-A3B` | 262K | | | | | | $0.25 | $1 |
63
63
  | `wandb/Qwen/Qwen3.6-27B` | 262K | | | | | | $0.60 | $4 |
64
64
  | `wandb/Qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.25 | $1 |
65
+ | `wandb/Qwen/Qwen3.8-27B` | 262K | | | | | | $0.40 | $3 |
65
66
  | `wandb/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
66
67
  | `wandb/zai-org/GLM-5.2` | 262K | | | | | | $0.76 | $2 |
67
68
 
@@ -91,7 +91,6 @@ Direct access to individual AI model providers. Each provider offers unique mode
91
91
  - [LucidQuery](https://mastra.ai/models/providers/lucidquery)
92
92
  - [Lynkr](https://mastra.ai/models/providers/lynkr)
93
93
  - [Meganova](https://mastra.ai/models/providers/meganova)
94
- - [Merge Gateway](https://mastra.ai/models/providers/merge-gateway)
95
94
  - [Meta](https://mastra.ai/models/providers/meta)
96
95
  - [MiniMax (minimax.io)](https://mastra.ai/models/providers/minimax)
97
96
  - [MiniMax (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn)
@@ -135,7 +134,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
135
134
  - [Sarvam AI](https://mastra.ai/models/providers/sarvam)
136
135
  - [Scaleway](https://mastra.ai/models/providers/scaleway)
137
136
  - [SCNet Token Plan](https://mastra.ai/models/providers/scnet-token-plan)
138
- - [SCX.ai](https://mastra.ai/models/providers/scx)
137
+ - [SCX.ai](https://mastra.ai/models/providers/scx-ai)
139
138
  - [SiliconFlow](https://mastra.ai/models/providers/siliconflow)
140
139
  - [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn)
141
140
  - [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex)
@@ -77,6 +77,8 @@ const editor = new MastraEditor({
77
77
 
78
78
  **defaultScope** (`'per-author' | 'caller-supplied'`): Connection identity scope. Defaults to per-author. (Default: `'per-author'`)
79
79
 
80
+ **userIdResolver** (`ComposioUserIdResolver`): Server-side resolver that derives the effective Composio userId from authenticated context fields. Used for invoker and caller-supplied execution. The exact connected account always comes from the stored connection pin.
81
+
80
82
  ### Tool slugs
81
83
 
82
84
  Composio tools use uppercase slug format: `GITHUB_CREATE_ISSUE`, `SLACK_SEND_MESSAGE`.
@@ -85,6 +87,111 @@ Composio tools use uppercase slug format: `GITHUB_CREATE_ISSUE`, `SLACK_SEND_MES
85
87
 
86
88
  Connections use per-author scope by default. Set `defaultScope: 'caller-supplied'` to bucket authorization by the caller identity resolved from `MASTRA_RESOURCE_ID_KEY` in request context. Ensure each authenticated request provides a stable, unique resource ID. When using `MastraAuthWorkos`, configure `mapUserToResourceId` to set this value from the authenticated user.
87
89
 
90
+ How the provider resolves the Composio user for a tool call depends on the connection:
91
+
92
+ - **Author-bound connections** (`kind: 'author'`) execute as the agent author's user against the pinned connected account.
93
+ - **Invoker-bound connections** (`kind: 'invoker'`) execute as the authenticated invoker against the exact pinned account, which may be an account another user shared with the invoker through Composio's access control list (ACL). The user ID comes from `userIdResolver` when configured, then the authenticated user, and never from the Memory `resourceId`. Invoker resolution fails when no authenticated user or resolver result exists.
94
+ - **Caller-supplied scope** (`scope: 'caller-supplied'`) uses `userIdResolver` when configured. Otherwise, it falls back to the legacy `resourceId` from request context for backward compatibility. When a specific connected account is pinned, execution routes to that exact account. Otherwise, Composio auto-resolves within the user's bucket.
95
+
96
+ ### Execute with a shared account
97
+
98
+ Bob needs to run a Salesforce tool with an account that Alice shared through Composio. Keep each identity separate:
99
+
100
+ | Identity | Value |
101
+ | ----------------- | --------------------- |
102
+ | Memory resource | `project_123` |
103
+ | Composio user ID | `bob` |
104
+ | Connected account | `ca_alice_salesforce` |
105
+
106
+ Register the provider normally. Mastra server authentication writes the authenticated user to request context, so most applications don't need a `userIdResolver`:
107
+
108
+ ```typescript
109
+ import { Mastra } from '@mastra/core/mastra'
110
+ import { MastraEditor } from '@mastra/editor'
111
+ import { ComposioToolProvider } from '@mastra/editor/composio'
112
+
113
+ const editor = new MastraEditor({
114
+ toolProviders: {
115
+ composio: new ComposioToolProvider({
116
+ apiKey: process.env.COMPOSIO_API_KEY!,
117
+ }),
118
+ },
119
+ })
120
+
121
+ export const mastra = new Mastra({ editor })
122
+ ```
123
+
124
+ Configure the agent with an invoker connection pinned to `ca_alice_salesforce`. When Bob invokes the agent, Mastra sends `bob` as the Composio user and the pinned account ID as the exact connected account. The Memory resource stays `project_123`. Composio then checks whether the account's ACL permits Bob to execute it.
125
+
126
+ ### Map application users to Composio users
127
+
128
+ Use `userIdResolver` when your Composio user IDs differ from the IDs returned by Mastra authentication, or when your application must authorize the stored account pin before execution.
129
+
130
+ ```typescript
131
+ type ComposioUserIdResolver = (
132
+ input: ComposioUserIdResolverInput,
133
+ ) => Promise<string | undefined> | string | undefined
134
+ ```
135
+
136
+ **requestContext** (`RequestContext`): Live per-request context. Client-provided non-reserved entries are untrusted. Derive identity and authorize connectedAccountId only from validated, server-populated fields such as MASTRA\_USER\_KEY, read with getRaw().
137
+
138
+ **toolkit** (`string`): Toolkit slug the identity is being resolved for, when known.
139
+
140
+ **connectedAccountId** (`string`): Stored connection pin being resolved, when one exists. Use it to validate that the invoker may use this exact account.
141
+
142
+ The resolver returns the Composio user ID, or `undefined` to use the provider's default resolution. Returning an empty string throws instead of silently falling back. The resolver can't replace the connected account.
143
+
144
+ This example namespaces the Composio user by organization and asks the application's authorization layer to approve the exact account pin:
145
+
146
+ ```typescript
147
+ import { MASTRA_USER_KEY } from '@mastra/server/auth'
148
+ import { ComposioToolProvider } from '@mastra/editor/composio'
149
+ import { canUseConnectedAccount } from './integration-authorization'
150
+
151
+ type AuthenticatedUser = {
152
+ id: string
153
+ organizationId: string
154
+ }
155
+
156
+ function isAuthenticatedUser(value: unknown): value is AuthenticatedUser {
157
+ return (
158
+ typeof value === 'object' &&
159
+ value !== null &&
160
+ 'id' in value &&
161
+ typeof value.id === 'string' &&
162
+ 'organizationId' in value &&
163
+ typeof value.organizationId === 'string'
164
+ )
165
+ }
166
+
167
+ const composio = new ComposioToolProvider({
168
+ apiKey: process.env.COMPOSIO_API_KEY!,
169
+ userIdResolver: async ({ requestContext, toolkit, connectedAccountId }) => {
170
+ const user = requestContext?.getRaw(MASTRA_USER_KEY)
171
+ if (!isAuthenticatedUser(user)) return undefined
172
+
173
+ if (connectedAccountId) {
174
+ const allowed = await canUseConnectedAccount({
175
+ actorId: user.id,
176
+ organizationId: user.organizationId,
177
+ provider: 'composio',
178
+ toolkit,
179
+ connectedAccountId,
180
+ })
181
+ if (!allowed) {
182
+ throw new Error('User cannot access this connected account')
183
+ }
184
+ }
185
+
186
+ return `${user.organizationId}:${user.id}`
187
+ },
188
+ })
189
+ ```
190
+
191
+ Use the same namespaced ID when creating Composio connections and shared-account ACL entries. For example, Bob's Composio user ID in this setup is `acme:bob`.
192
+
193
+ Throw from `userIdResolver` to deny the request. During stored-agent resolution, Mastra logs the failure and omits tools associated with that connection, so no tool call reaches Composio. Other connections continue to resolve. When calling `resolveToolsVNext()` directly, the error is returned to the caller instead.
194
+
88
195
  ### Connection management tools
89
196
 
90
197
  Composio provides tools for starting and monitoring authorization from an agent chat. When `allowedToolkits` is set, include `composio` to make these tools available:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.2.17-alpha.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`2ef2f23`](https://github.com/mastra-ai/mastra/commit/2ef2f230a7aed342e7dc3b2000cd42e4c43e08a7), [`5740ec6`](https://github.com/mastra-ai/mastra/commit/5740ec60c760ffdfbfaa59d603d03b847c864e05)]:
8
+ - @mastra/core@1.60.0-alpha.13
9
+
3
10
  ## 1.2.17-alpha.19
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.2.17-alpha.19",
3
+ "version": "1.2.17-alpha.20",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "jsdom": "^26.1.0",
29
29
  "local-pkg": "^1.1.2",
30
30
  "zod": "^4.4.3",
31
- "@mastra/core": "1.60.0-alpha.12",
31
+ "@mastra/core": "1.60.0-alpha.13",
32
32
  "@mastra/mcp": "^1.17.0-alpha.2"
33
33
  },
34
34
  "devDependencies": {
@@ -46,8 +46,8 @@
46
46
  "typescript": "^6.0.3",
47
47
  "vitest": "4.1.10",
48
48
  "@internal/lint": "0.0.123",
49
- "@mastra/core": "1.60.0-alpha.12",
50
- "@internal/types-builder": "0.0.98"
49
+ "@internal/types-builder": "0.0.98",
50
+ "@mastra/core": "1.60.0-alpha.13"
51
51
  },
52
52
  "homepage": "https://mastra.ai",
53
53
  "repository": {
@@ -1,268 +0,0 @@
1
- > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
-
3
- # ![Merge Gateway logo](https://models.dev/logos/merge-gateway.svg)Merge Gateway
4
-
5
- Access 172 Merge Gateway models through Mastra's model router. Authentication is handled automatically using the `MERGE_GATEWAY_API_KEY` environment variable.
6
-
7
- Learn more in the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway).
8
-
9
- ```bash
10
- MERGE_GATEWAY_API_KEY=your-api-key
11
- ```
12
-
13
- ```typescript
14
- import { Agent } from "@mastra/core/agent";
15
-
16
- const agent = new Agent({
17
- id: "my-agent",
18
- name: "My Agent",
19
- instructions: "You are a helpful assistant",
20
- model: "merge-gateway/anthropic/claude-3-7-sonnet-20250219"
21
- });
22
-
23
- // Generate a response
24
- const response = await agent.generate("Hello!");
25
-
26
- // Stream a response
27
- const stream = await agent.stream("Tell me a story");
28
- for await (const chunk of stream) {
29
- console.log(chunk);
30
- }
31
- ```
32
-
33
- > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway) for details.
34
-
35
- ## Models
36
-
37
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
- | -------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
- | `merge-gateway/anthropic/claude-3-7-sonnet-20250219` | 200K | | | | | | $3 | $15 |
40
- | `merge-gateway/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
41
- | `merge-gateway/anthropic/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
42
- | `merge-gateway/anthropic/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
43
- | `merge-gateway/anthropic/claude-opus-4-20250514` | 200K | | | | | | $15 | $75 |
44
- | `merge-gateway/anthropic/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
45
- | `merge-gateway/anthropic/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
46
- | `merge-gateway/anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
47
- | `merge-gateway/anthropic/claude-opus-4-8` | 1.0M | | | | | | $5 | $25 |
48
- | `merge-gateway/anthropic/claude-opus-5` | 1.0M | | | | | | $5 | $25 |
49
- | `merge-gateway/anthropic/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
50
- | `merge-gateway/anthropic/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
51
- | `merge-gateway/anthropic/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
52
- | `merge-gateway/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
53
- | `merge-gateway/bytedance/dola-seed-2.0-code` | 256K | | | | | | $0.40 | $2 |
54
- | `merge-gateway/bytedance/dola-seed-2.0-code-preview` | 131K | | | | | | $0.50 | $3 |
55
- | `merge-gateway/bytedance/dola-seed-2.0-lite` | 131K | | | | | | $0.25 | $2 |
56
- | `merge-gateway/bytedance/dola-seed-2.0-mini` | 131K | | | | | | $0.10 | $0.40 |
57
- | `merge-gateway/bytedance/dola-seed-2.0-pro` | 131K | | | | | | $0.50 | $3 |
58
- | `merge-gateway/cohere/command-a-03-2025` | 256K | | | | | | $3 | $10 |
59
- | `merge-gateway/cohere/command-r-08-2024` | 128K | | | | | | $0.15 | $0.60 |
60
- | `merge-gateway/cohere/command-r-plus-08-2024` | 128K | | | | | | $3 | $10 |
61
- | `merge-gateway/cohere/command-r7b-12-2024` | 128K | | | | | | $0.04 | $0.15 |
62
- | `merge-gateway/deepseek/deepseek-r1` | 164K | | | | | | $1 | $5 |
63
- | `merge-gateway/deepseek/deepseek-v3` | 164K | | | | | | $0.58 | $2 |
64
- | `merge-gateway/deepseek/deepseek-v3.1` | 164K | | | | | | $0.50 | $2 |
65
- | `merge-gateway/deepseek/deepseek-v3.2` | 164K | | | | | | $0.28 | $0.45 |
66
- | `merge-gateway/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
67
- | `merge-gateway/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
68
- | `merge-gateway/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
69
- | `merge-gateway/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.43 | $0.87 |
70
- | `merge-gateway/google/gemini-2.5-computer-use-preview-10-2025` | 128K | | | | | | $1 | $10 |
71
- | `merge-gateway/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
72
- | `merge-gateway/google/gemini-2.5-flash-image` | 33K | | | | | | $0.30 | $3 |
73
- | `merge-gateway/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
74
- | `merge-gateway/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
75
- | `merge-gateway/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
76
- | `merge-gateway/google/gemini-3-pro-image` | 66K | | | | | | $2 | $12 |
77
- | `merge-gateway/google/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
78
- | `merge-gateway/google/gemini-3.1-flash-image` | 33K | | | | | | $0.50 | $3 |
79
- | `merge-gateway/google/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
80
- | `merge-gateway/google/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
81
- | `merge-gateway/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
82
- | `merge-gateway/google/gemini-3.1-pro-preview-customtools` | 1.0M | | | | | | $2 | $12 |
83
- | `merge-gateway/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
84
- | `merge-gateway/google/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
85
- | `merge-gateway/google/gemini-3.6-flash` | 1.0M | | | | | | $2 | $8 |
86
- | `merge-gateway/google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
87
- | `merge-gateway/google/gemini-embedding-001` | 2K | | | | | | $0.15 | — |
88
- | `merge-gateway/google/gemini-flash-latest` | 1.0M | | | | | | $2 | $9 |
89
- | `merge-gateway/google/gemini-flash-lite-latest` | 1.0M | | | | | | $0.25 | $2 |
90
- | `merge-gateway/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.13 | $0.40 |
91
- | `merge-gateway/google/gemma-4-31b-it` | 262K | | | | | | $0.14 | $0.40 |
92
- | `merge-gateway/meta/llama-3.1-8b-instruct` | 128K | | | | | | $0.22 | $0.22 |
93
- | `merge-gateway/meta/llama-3.3-70b-instruct` | 131K | | | | | | $0.22 | $0.50 |
94
- | `merge-gateway/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
95
- | `merge-gateway/meta/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
96
- | `merge-gateway/minimax/minimax-m2` | 205K | | | | | | $0.30 | $1 |
97
- | `merge-gateway/minimax/minimax-m2.1` | 205K | | | | | | $0.30 | $1 |
98
- | `merge-gateway/minimax/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
99
- | `merge-gateway/minimax/minimax-m2.5-highspeed` | 205K | | | | | | $0.60 | $2 |
100
- | `merge-gateway/minimax/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
101
- | `merge-gateway/minimax/minimax-m2.7-highspeed` | 205K | | | | | | $0.60 | $2 |
102
- | `merge-gateway/minimax/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
103
- | `merge-gateway/mistral/codestral-latest` | 256K | | | | | | $0.30 | $0.90 |
104
- | `merge-gateway/mistral/devstral-2512` | 256K | | | | | | $0.40 | $2 |
105
- | `merge-gateway/mistral/magistral-medium-latest` | 128K | | | | | | $2 | $5 |
106
- | `merge-gateway/mistral/mistral-large-2411` | 131K | | | | | | $2 | $6 |
107
- | `merge-gateway/mistral/mistral-large-2512` | 256K | | | | | | $0.50 | $2 |
108
- | `merge-gateway/mistral/mistral-large-latest` | 262K | | | | | | $0.50 | $2 |
109
- | `merge-gateway/mistral/mistral-medium-2505` | 128K | | | | | | $0.40 | $2 |
110
- | `merge-gateway/mistral/mistral-medium-latest` | 262K | | | | | | $0.40 | $2 |
111
- | `merge-gateway/mistral/mistral-small-latest` | 256K | | | | | | $0.15 | $0.60 |
112
- | `merge-gateway/mistral/pixtral-large-latest` | 128K | | | | | | $2 | $6 |
113
- | `merge-gateway/moonshot/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
114
- | `merge-gateway/moonshot/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
115
- | `merge-gateway/moonshot/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
116
- | `merge-gateway/moonshot/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
117
- | `merge-gateway/moonshot/kimi-k3` | 1.0M | | | | | | $3 | $15 |
118
- | `merge-gateway/nvidia/nemotron-3.5-lightning-30b-a3b` | 1.0M | | | | | | — | — |
119
- | `merge-gateway/nvidia/nemotron-nano-9b-v2` | 128K | | | | | | $0.06 | $0.23 |
120
- | `merge-gateway/openai/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
121
- | `merge-gateway/openai/gpt-4` | 8K | | | | | | $30 | $60 |
122
- | `merge-gateway/openai/gpt-4-turbo` | 128K | | | | | | $10 | $30 |
123
- | `merge-gateway/openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
124
- | `merge-gateway/openai/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
125
- | `merge-gateway/openai/gpt-4.1-nano` | 1.0M | | | | | | $0.10 | $0.40 |
126
- | `merge-gateway/openai/gpt-4o` | 128K | | | | | | $3 | $10 |
127
- | `merge-gateway/openai/gpt-4o-2024-05-13` | 128K | | | | | | $5 | $15 |
128
- | `merge-gateway/openai/gpt-4o-2024-08-06` | 128K | | | | | | $3 | $10 |
129
- | `merge-gateway/openai/gpt-4o-2024-11-20` | 128K | | | | | | $3 | $10 |
130
- | `merge-gateway/openai/gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 |
131
- | `merge-gateway/openai/gpt-5` | 400K | | | | | | $1 | $10 |
132
- | `merge-gateway/openai/gpt-5-chat-latest` | 128K | | | | | | $1 | $10 |
133
- | `merge-gateway/openai/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
134
- | `merge-gateway/openai/gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 |
135
- | `merge-gateway/openai/gpt-5.1` | 400K | | | | | | $1 | $10 |
136
- | `merge-gateway/openai/gpt-5.1-chat-latest` | 128K | | | | | | $1 | $10 |
137
- | `merge-gateway/openai/gpt-5.2` | 400K | | | | | | $2 | $14 |
138
- | `merge-gateway/openai/gpt-5.2-chat-latest` | 128K | | | | | | $2 | $14 |
139
- | `merge-gateway/openai/gpt-5.3-chat-latest` | 128K | | | | | | $2 | $14 |
140
- | `merge-gateway/openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
141
- | `merge-gateway/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
142
- | `merge-gateway/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
143
- | `merge-gateway/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
144
- | `merge-gateway/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
145
- | `merge-gateway/openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
146
- | `merge-gateway/openai/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
147
- | `merge-gateway/openai/gpt-oss-120b` | 131K | | | | | | $0.09 | $0.36 |
148
- | `merge-gateway/openai/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.20 |
149
- | `merge-gateway/openai/gpt-oss-safeguard-120b` | 4K | | | | | | $0.15 | $0.60 |
150
- | `merge-gateway/openai/o1` | 200K | | | | | | $15 | $60 |
151
- | `merge-gateway/openai/o3` | 200K | | | | | | $2 | $8 |
152
- | `merge-gateway/openai/o3-mini` | 200K | | | | | | $1 | $4 |
153
- | `merge-gateway/openai/o4-mini` | 200K | | | | | | $1 | $4 |
154
- | `merge-gateway/qwen/qwen-flash` | 1.0M | | | | | | $0.02 | $0.22 |
155
- | `merge-gateway/qwen/qwen-plus` | 1.0M | | | | | | $0.12 | $0.29 |
156
- | `merge-gateway/qwen/qwen3-235b-a22b` | 131K | | | | | | $0.29 | $1 |
157
- | `merge-gateway/qwen/qwen3-235b-a22b-instruct-2507` | 131K | | | | | | $0.10 | $0.60 |
158
- | `merge-gateway/qwen/qwen3-30b-a3b` | 131K | | | | | | $0.11 | $1 |
159
- | `merge-gateway/qwen/qwen3-32b` | 131K | | | | | | $0.15 | $0.60 |
160
- | `merge-gateway/qwen/qwen3-coder-480b-a35b-instruct` | 131K | | | | | | $0.22 | $2 |
161
- | `merge-gateway/qwen/qwen3-coder-flash` | 1.0M | | | | | | $0.14 | $0.57 |
162
- | `merge-gateway/qwen/qwen3-coder-next` | 262K | | | | | | $0.15 | $0.80 |
163
- | `merge-gateway/qwen/qwen3-coder-plus` | 1.0M | | | | | | $0.57 | $2 |
164
- | `merge-gateway/qwen/qwen3-max` | 262K | | | | | | $0.36 | $1 |
165
- | `merge-gateway/qwen/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.14 | $0.57 |
166
- | `merge-gateway/qwen/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.15 | $1 |
167
- | `merge-gateway/qwen/qwen3-vl-235b-a22b-instruct` | 131K | | | | | | $0.29 | $1 |
168
- | `merge-gateway/qwen/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.29 | $3 |
169
- | `merge-gateway/qwen/qwen3-vl-plus` | 262K | | | | | | $0.14 | $1 |
170
- | `merge-gateway/qwen/qwen3.5-122b-a10b` | 256K | | | | | | $0.12 | $0.92 |
171
- | `merge-gateway/qwen/qwen3.5-27b` | 256K | | | | | | $0.09 | $0.69 |
172
- | `merge-gateway/qwen/qwen3.5-35b-a3b` | 256K | | | | | | $0.06 | $0.46 |
173
- | `merge-gateway/qwen/qwen3.5-397b-a17b` | 256K | | | | | | $0.17 | $1 |
174
- | `merge-gateway/qwen/qwen3.5-9b` | 262K | | | | | | $0.09 | $0.13 |
175
- | `merge-gateway/qwen/qwen3.5-flash` | 1.0M | | | | | | $0.03 | $0.29 |
176
- | `merge-gateway/qwen/qwen3.5-plus` | 1.0M | | | | | | $0.12 | $0.69 |
177
- | `merge-gateway/qwen/qwen3.6-27b` | 131K | | | | | | $0.29 | $2 |
178
- | `merge-gateway/qwen/qwen3.6-35b-a3b` | 262K | | | | | | $0.25 | $1 |
179
- | `merge-gateway/qwen/qwen3.6-flash` | 1.0M | | | | | | $0.17 | $0.99 |
180
- | `merge-gateway/qwen/qwen3.6-max-preview` | 256K | | | | | | $1 | $8 |
181
- | `merge-gateway/qwen/qwen3.6-plus` | 1.0M | | | | | | $0.28 | $2 |
182
- | `merge-gateway/qwen/qwen3.7-max` | 1.0M | | | | | | $0.82 | $2 |
183
- | `merge-gateway/qwen/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 |
184
- | `merge-gateway/qwen/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
185
- | `merge-gateway/sakana/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
186
- | `merge-gateway/sakana/sakana-namazu` | 262K | | | | | | $0.95 | $4 |
187
- | `merge-gateway/thinkingmachines/inkling` | 1.0M | | | | | | $1 | $4 |
188
- | `merge-gateway/writer/palmyra-x4` | 128K | | | | | | $3 | $10 |
189
- | `merge-gateway/writer/palmyra-x5` | 1.0M | | | | | | $0.60 | $6 |
190
- | `merge-gateway/xai/grok-4.20-0309-non-reasoning` | 1.0M | | | | | | $1 | $3 |
191
- | `merge-gateway/xai/grok-4.20-0309-reasoning` | 1.0M | | | | | | $1 | $3 |
192
- | `merge-gateway/xai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
193
- | `merge-gateway/xai/grok-4.5` | 500K | | | | | | $2 | $6 |
194
- | `merge-gateway/xai/grok-4.6` | 500K | | | | | | $2 | $5 |
195
- | `merge-gateway/xai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
196
- | `merge-gateway/zai/glm-4.5` | 128K | | | | | | $0.60 | $2 |
197
- | `merge-gateway/zai/glm-4.5-air` | 128K | | | | | | $0.20 | $1 |
198
- | `merge-gateway/zai/glm-4.5v` | 128K | | | | | | $0.60 | $2 |
199
- | `merge-gateway/zai/glm-4.6` | 200K | | | | | | $0.60 | $2 |
200
- | `merge-gateway/zai/glm-4.7` | 200K | | | | | | $0.60 | $2 |
201
- | `merge-gateway/zai/glm-4.7-flash` | 200K | | | | | | $0.07 | $0.40 |
202
- | `merge-gateway/zai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
203
- | `merge-gateway/zai/glm-5` | 200K | | | | | | $1 | $3 |
204
- | `merge-gateway/zai/glm-5-turbo` | 200K | | | | | | $1 | $4 |
205
- | `merge-gateway/zai/glm-5.1` | 200K | | | | | | $1 | $4 |
206
- | `merge-gateway/zai/glm-5.2` | 1.0M | | | | | | $1 | $3 |
207
-
208
- ## Advanced configuration
209
-
210
- ### Custom headers
211
-
212
- ```typescript
213
- const agent = new Agent({
214
- id: "custom-agent",
215
- name: "custom-agent",
216
- model: {
217
- url: "https://api-gateway.merge.dev/v1/ai-sdk",
218
- id: "merge-gateway/anthropic/claude-3-7-sonnet-20250219",
219
- apiKey: process.env.MERGE_GATEWAY_API_KEY,
220
- headers: {
221
- "X-Custom-Header": "value"
222
- }
223
- }
224
- });
225
- ```
226
-
227
- ### Dynamic model selection
228
-
229
- ```typescript
230
- const agent = new Agent({
231
- id: "dynamic-agent",
232
- name: "Dynamic Agent",
233
- model: ({ requestContext }) => {
234
- const useAdvanced = requestContext.task === "complex";
235
- return useAdvanced
236
- ? "merge-gateway/zai/glm-5.2"
237
- : "merge-gateway/anthropic/claude-3-7-sonnet-20250219";
238
- }
239
- });
240
- ```
241
-
242
- ## Direct provider installation
243
-
244
- This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/merge-gateway-ai-sdk-provider) for more details.
245
-
246
- **npm**:
247
-
248
- ```bash
249
- npm install merge-gateway-ai-sdk-provider
250
- ```
251
-
252
- **pnpm**:
253
-
254
- ```bash
255
- pnpm add merge-gateway-ai-sdk-provider
256
- ```
257
-
258
- **Yarn**:
259
-
260
- ```bash
261
- yarn add merge-gateway-ai-sdk-provider
262
- ```
263
-
264
- **Bun**:
265
-
266
- ```bash
267
- bun add merge-gateway-ai-sdk-provider
268
- ```