@mastra/mcp-docs-server 1.1.26-alpha.2 → 1.1.26-alpha.22
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.
- package/.docs/docs/agents/supervisor-agents.md +18 -0
- package/.docs/docs/editor/overview.md +69 -0
- package/.docs/docs/mastra-platform/overview.md +3 -1
- package/.docs/docs/memory/observational-memory.md +27 -7
- package/.docs/docs/observability/tracing/exporters/cloud.md +34 -41
- package/.docs/docs/observability/tracing/exporters/langfuse.md +31 -0
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +19 -6
- package/.docs/guides/deployment/netlify.md +16 -1
- package/.docs/guides/getting-started/next-js.md +0 -4
- package/.docs/guides/migrations/mastra-cloud.md +128 -3
- package/.docs/models/gateways/netlify.md +2 -2
- package/.docs/models/gateways/openrouter.md +3 -1
- package/.docs/models/gateways/vercel.md +4 -1
- package/.docs/models/index.md +36 -1
- package/.docs/models/providers/302ai.md +32 -1
- package/.docs/models/providers/alibaba-cn.md +2 -1
- package/.docs/models/providers/anthropic.md +2 -1
- package/.docs/models/providers/berget.md +9 -12
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/cortecs.md +4 -1
- package/.docs/models/providers/digitalocean.md +116 -0
- package/.docs/models/providers/firmware.md +2 -3
- package/.docs/models/providers/helicone.md +1 -2
- package/.docs/models/providers/hpc-ai.md +73 -0
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/kimi-for-coding.md +2 -1
- package/.docs/models/providers/llmgateway.md +59 -77
- package/.docs/models/providers/moonshotai.md +3 -2
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/openai.md +1 -2
- package/.docs/models/providers/opencode-go.md +2 -1
- package/.docs/models/providers/opencode.md +4 -1
- package/.docs/models/providers/ovhcloud.md +4 -7
- package/.docs/models/providers/poe.md +2 -1
- package/.docs/models/providers/tencent-token-plan.md +71 -0
- package/.docs/models/providers/tencent-tokenhub.md +71 -0
- package/.docs/models/providers/wafer.ai.md +72 -0
- package/.docs/models/providers/zenmux.md +2 -1
- package/.docs/models/providers.md +5 -0
- package/.docs/reference/agents/generate.md +8 -0
- package/.docs/reference/client-js/mastra-client.md +23 -0
- package/.docs/reference/client-js/workflows.md +12 -0
- package/.docs/reference/core/mastra-class.md +9 -1
- package/.docs/reference/deployer/cloudflare.md +14 -1
- package/.docs/reference/deployer/netlify.md +50 -2
- package/.docs/reference/harness/harness-class.md +72 -49
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/memory/observational-memory.md +2 -0
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +4 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +2 -0
- package/.docs/reference/processors/prefill-error-handler.md +5 -5
- package/.docs/reference/storage/cloudflare-d1.md +42 -42
- package/.docs/reference/streaming/agents/stream.md +8 -0
- package/.docs/reference/streaming/workflows/resumeStream.md +2 -0
- package/.docs/reference/workflows/run-methods/resume.md +24 -0
- package/.docs/reference/workflows/workflow-methods/foreach.md +14 -1
- package/.docs/reference/workspace/docker-sandbox.md +196 -0
- package/CHANGELOG.md +72 -0
- package/package.json +9 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vercel
|
|
2
2
|
|
|
3
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
3
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 234 models through Mastra's model router.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
6
6
|
|
|
@@ -72,6 +72,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
72
72
|
| `anthropic/claude-opus-4.1` |
|
|
73
73
|
| `anthropic/claude-opus-4.5` |
|
|
74
74
|
| `anthropic/claude-opus-4.6` |
|
|
75
|
+
| `anthropic/claude-opus-4.7` |
|
|
75
76
|
| `anthropic/claude-sonnet-4` |
|
|
76
77
|
| `anthropic/claude-sonnet-4.5` |
|
|
77
78
|
| `anthropic/claude-sonnet-4.6` |
|
|
@@ -119,6 +120,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
119
120
|
| `google/text-embedding-005` |
|
|
120
121
|
| `google/text-multilingual-embedding-002` |
|
|
121
122
|
| `inception/mercury-2` |
|
|
123
|
+
| `inception/mercury-coder-small` |
|
|
122
124
|
| `inception/mercury-edit-2` |
|
|
123
125
|
| `kwaipilot/kat-coder-pro-v1` |
|
|
124
126
|
| `kwaipilot/kat-coder-pro-v2` |
|
|
@@ -264,4 +266,5 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
264
266
|
| `zai/glm-4.7-flashx` |
|
|
265
267
|
| `zai/glm-5` |
|
|
266
268
|
| `zai/glm-5-turbo` |
|
|
269
|
+
| `zai/glm-5.1` |
|
|
267
270
|
| `zai/glm-5v-turbo` |
|
package/.docs/models/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Model Providers
|
|
2
2
|
|
|
3
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
3
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 3675 models from 104 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -228,6 +228,41 @@ Mastra tries your primary model first. If it encounters a 500 error, rate limit,
|
|
|
228
228
|
|
|
229
229
|
Your users never experience the disruption - the response comes back with the same format, just from a different model. The error context is preserved as the system moves through your fallback chain, ensuring clean error propagation while maintaining streaming compatibility.
|
|
230
230
|
|
|
231
|
+
### Per-model settings
|
|
232
|
+
|
|
233
|
+
Each fallback entry can carry its own `modelSettings`, `providerOptions`, and `headers` — useful when models in the chain need different temperatures or provider-specific knobs to produce comparable output.
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
import { Agent } from '@mastra/core/agent';
|
|
237
|
+
|
|
238
|
+
const agent = new Agent({
|
|
239
|
+
id: 'tuned-resilient',
|
|
240
|
+
name: 'Tuned Resilient Agent',
|
|
241
|
+
instructions: 'You are a helpful assistant.',
|
|
242
|
+
model: [
|
|
243
|
+
{
|
|
244
|
+
model: 'google/gemini-2.5-flash',
|
|
245
|
+
maxRetries: 2,
|
|
246
|
+
modelSettings: { temperature: 0.3 },
|
|
247
|
+
providerOptions: { google: { thinkingConfig: { thinkingBudget: 0 } } },
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
model: 'openai/gpt-5-mini',
|
|
251
|
+
maxRetries: 2,
|
|
252
|
+
modelSettings: { temperature: 0.7 },
|
|
253
|
+
providerOptions: { openai: { reasoningEffort: 'low' } },
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Precedence:**
|
|
260
|
+
|
|
261
|
+
- `modelSettings` and `providerOptions`: per-fallback entry overrides call-time options, which override agent `defaultOptions`. `modelSettings` shallow-merges by key. `providerOptions` deep-merges recursively, so nested provider config (e.g. `google.thinkingConfig`) preserves sibling keys across layers.
|
|
262
|
+
- `headers`: call-time `modelSettings.headers` overrides per-fallback `headers`, which overrides headers extracted from model-router models. Runtime headers (tracing, auth, tenancy) intentionally take precedence over model-level headers.
|
|
263
|
+
|
|
264
|
+
Each field also accepts a function of `requestContext`, matching how dynamic models are resolved.
|
|
265
|
+
|
|
231
266
|
## Use local models with Mastra
|
|
232
267
|
|
|
233
268
|
Mastra also supports local models like `gpt-oss`, `Qwen3`, `DeepSeek` and many more that you run on your own hardware. The application running your local model needs to provide an OpenAI-compatible API server for Mastra to connect to. We recommend using [LMStudio](https://lmstudio.ai/) (see [Running the LMStudio server](https://lmstudio.ai/docs/developer/core/server)).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 302.AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 95 302.AI models through Mastra's model router. Authentication is handled automatically using the `302AI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [302.AI documentation](https://doc.302.ai).
|
|
6
6
|
|
|
@@ -35,13 +35,25 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `302ai/chatgpt-4o-latest` | 128K | | | | | | $5 | $15 |
|
|
38
|
+
| `302ai/claude-3-5-haiku-20241022` | 200K | | | | | | $0.80 | $4 |
|
|
39
|
+
| `302ai/claude-3-5-haiku-latest` | 200K | | | | | | $0.80 | $4 |
|
|
40
|
+
| `302ai/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
38
41
|
| `302ai/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
|
|
39
42
|
| `302ai/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
|
|
40
43
|
| `302ai/claude-opus-4-1-20250805-thinking` | 200K | | | | | | $15 | $75 |
|
|
44
|
+
| `302ai/claude-opus-4-20250514` | 200K | | | | | | $15 | $75 |
|
|
45
|
+
| `302ai/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
41
46
|
| `302ai/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
|
|
42
47
|
| `302ai/claude-opus-4-5-20251101-thinking` | 200K | | | | | | $5 | $25 |
|
|
48
|
+
| `302ai/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
49
|
+
| `302ai/claude-opus-4-6-thinking` | 1.0M | | | | | | $5 | $25 |
|
|
50
|
+
| `302ai/claude-opus-4-7` | 200K | | | | | | $5 | $25 |
|
|
51
|
+
| `302ai/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
|
|
52
|
+
| `302ai/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
|
|
43
53
|
| `302ai/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
|
|
44
54
|
| `302ai/claude-sonnet-4-5-20250929-thinking` | 200K | | | | | | $3 | $15 |
|
|
55
|
+
| `302ai/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
56
|
+
| `302ai/claude-sonnet-4-6-thinking` | 1.0M | | | | | | $3 | $15 |
|
|
45
57
|
| `302ai/deepseek-chat` | 128K | | | | | | $0.29 | $0.43 |
|
|
46
58
|
| `302ai/deepseek-reasoner` | 128K | | | | | | $0.29 | $0.43 |
|
|
47
59
|
| `302ai/deepseek-v3.2` | 128K | | | | | | $0.29 | $0.43 |
|
|
@@ -60,11 +72,21 @@ for await (const chunk of stream) {
|
|
|
60
72
|
| `302ai/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
61
73
|
| `302ai/gemini-3-pro-image-preview` | 33K | | | | | | $2 | $120 |
|
|
62
74
|
| `302ai/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
75
|
+
| `302ai/gemini-3.1-flash-image-preview` | 131K | | | | | | $0.50 | $60 |
|
|
63
76
|
| `302ai/glm-4.5` | 128K | | | | | | $0.29 | $1 |
|
|
77
|
+
| `302ai/glm-4.5-air` | 128K | | | | | | $0.11 | $0.29 |
|
|
78
|
+
| `302ai/glm-4.5-airx` | 128K | | | | | | $0.57 | $2 |
|
|
79
|
+
| `302ai/glm-4.5-x` | 128K | | | | | | $1 | $2 |
|
|
64
80
|
| `302ai/glm-4.5v` | 64K | | | | | | $0.29 | $0.86 |
|
|
65
81
|
| `302ai/glm-4.6` | 200K | | | | | | $0.29 | $1 |
|
|
66
82
|
| `302ai/glm-4.6v` | 128K | | | | | | $0.14 | $0.43 |
|
|
67
83
|
| `302ai/glm-4.7` | 200K | | | | | | $0.29 | $1 |
|
|
84
|
+
| `302ai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.43 |
|
|
85
|
+
| `302ai/glm-5` | 200K | | | | | | $0.60 | $3 |
|
|
86
|
+
| `302ai/glm-5-turbo` | 200K | | | | | | $0.72 | $3 |
|
|
87
|
+
| `302ai/glm-5.1` | 200K | | | | | | $0.86 | $4 |
|
|
88
|
+
| `302ai/glm-5v-turbo` | 200K | | | | | | $0.72 | $3 |
|
|
89
|
+
| `302ai/glm-for-coding` | 200K | | | | | | $0.09 | $0.34 |
|
|
68
90
|
| `302ai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
69
91
|
| `302ai/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
|
|
70
92
|
| `302ai/gpt-4.1-nano` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
@@ -77,17 +99,26 @@ for await (const chunk of stream) {
|
|
|
77
99
|
| `302ai/gpt-5.1-chat-latest` | 128K | | | | | | $1 | $10 |
|
|
78
100
|
| `302ai/gpt-5.2` | 400K | | | | | | $2 | $14 |
|
|
79
101
|
| `302ai/gpt-5.2-chat-latest` | 128K | | | | | | $2 | $14 |
|
|
102
|
+
| `302ai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
103
|
+
| `302ai/gpt-5.4-mini-2026-03-17` | 400K | | | | | | $0.75 | $5 |
|
|
104
|
+
| `302ai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
105
|
+
| `302ai/gpt-5.4-nano-2026-03-17` | 400K | | | | | | $0.20 | $1 |
|
|
80
106
|
| `302ai/grok-4-1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
81
107
|
| `302ai/grok-4-1-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
82
108
|
| `302ai/grok-4-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
83
109
|
| `302ai/grok-4-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
84
110
|
| `302ai/grok-4.1` | 200K | | | | | | $2 | $10 |
|
|
111
|
+
| `302ai/grok-4.20-beta-0309-non-reasoning` | 2.0M | | | | | | $2 | $6 |
|
|
112
|
+
| `302ai/grok-4.20-beta-0309-reasoning` | 2.0M | | | | | | $2 | $6 |
|
|
113
|
+
| `302ai/grok-4.20-multi-agent-beta-0309` | 2.0M | | | | | | $2 | $6 |
|
|
85
114
|
| `302ai/kimi-k2-0905-preview` | 262K | | | | | | $0.63 | $3 |
|
|
86
115
|
| `302ai/kimi-k2-thinking` | 262K | | | | | | $0.57 | $2 |
|
|
87
116
|
| `302ai/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $9 |
|
|
88
117
|
| `302ai/MiniMax-M1` | 1.0M | | | | | | $0.13 | $1 |
|
|
89
118
|
| `302ai/MiniMax-M2` | 1.0M | | | | | | $0.33 | $1 |
|
|
90
119
|
| `302ai/MiniMax-M2.1` | 1.0M | | | | | | $0.30 | $1 |
|
|
120
|
+
| `302ai/MiniMax-M2.7` | 205K | | | | | | $0.30 | $1 |
|
|
121
|
+
| `302ai/MiniMax-M2.7-highspeed` | 205K | | | | | | $0.60 | $5 |
|
|
91
122
|
| `302ai/ministral-14b-2512` | 128K | | | | | | $0.33 | $0.33 |
|
|
92
123
|
| `302ai/mistral-large-2512` | 128K | | | | | | $1 | $3 |
|
|
93
124
|
| `302ai/qwen-flash` | 1.0M | | | | | | $0.02 | $0.22 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Alibaba (China)
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 76 Alibaba (China) models through Mastra's model router. Authentication is handled automatically using the `DASHSCOPE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Alibaba (China) documentation](https://www.alibabacloud.com/help/en/model-studio/models).
|
|
6
6
|
|
|
@@ -46,6 +46,7 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `alibaba-cn/deepseek-v3-1` | 131K | | | | | | $0.57 | $2 |
|
|
47
47
|
| `alibaba-cn/deepseek-v3-2-exp` | 131K | | | | | | $0.29 | $0.43 |
|
|
48
48
|
| `alibaba-cn/glm-5` | 203K | | | | | | $0.86 | $3 |
|
|
49
|
+
| `alibaba-cn/glm-5.1` | 203K | | | | | | $0.87 | $3 |
|
|
49
50
|
| `alibaba-cn/kimi-k2-thinking` | 262K | | | | | | $0.57 | $2 |
|
|
50
51
|
| `alibaba-cn/kimi-k2.5` | 262K | | | | | | $0.57 | $2 |
|
|
51
52
|
| `alibaba-cn/kimi/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Anthropic
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 23 Anthropic models through Mastra's model router. Authentication is handled automatically using the `ANTHROPIC_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Anthropic documentation](https://docs.anthropic.com/en/docs/about-claude/models).
|
|
6
6
|
|
|
@@ -49,6 +49,7 @@ for await (const chunk of stream) {
|
|
|
49
49
|
| `anthropic/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
50
50
|
| `anthropic/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
|
|
51
51
|
| `anthropic/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
52
|
+
| `anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
|
|
52
53
|
| `anthropic/claude-sonnet-4-0` | 200K | | | | | | $3 | $15 |
|
|
53
54
|
| `anthropic/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
|
|
54
55
|
| `anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Berget.AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 5 Berget.AI models through Mastra's model router. Authentication is handled automatically using the `BERGET_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Berget.AI documentation](https://api.berget.ai).
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ const agent = new Agent({
|
|
|
15
15
|
id: "my-agent",
|
|
16
16
|
name: "My Agent",
|
|
17
17
|
instructions: "You are a helpful assistant",
|
|
18
|
-
model: "berget/
|
|
18
|
+
model: "berget/google/gemma-4-31B-it"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -34,14 +34,11 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| ------------------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
-
| `berget/
|
|
38
|
-
| `berget/
|
|
39
|
-
| `berget/
|
|
40
|
-
| `berget/
|
|
41
|
-
| `berget/
|
|
42
|
-
| `berget/mistralai/Mistral-Small-3.2-24B-Instruct-2506` | 32K | | | | | | $0.30 | $0.30 |
|
|
43
|
-
| `berget/openai/gpt-oss-120b` | 128K | | | | | | $0.30 | $0.90 |
|
|
44
|
-
| `berget/zai-org/GLM-4.7` | 128K | | | | | | $0.70 | $2 |
|
|
37
|
+
| `berget/google/gemma-4-31B-it` | 128K | | | | | | $0.28 | $0.55 |
|
|
38
|
+
| `berget/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.99 | $0.99 |
|
|
39
|
+
| `berget/mistralai/Mistral-Small-3.2-24B-Instruct-2506` | 32K | | | | | | $0.33 | $0.33 |
|
|
40
|
+
| `berget/openai/gpt-oss-120b` | 128K | | | | | | $0.44 | $0.99 |
|
|
41
|
+
| `berget/zai-org/GLM-4.7` | 128K | | | | | | $0.77 | $3 |
|
|
45
42
|
|
|
46
43
|
## Advanced configuration
|
|
47
44
|
|
|
@@ -53,7 +50,7 @@ const agent = new Agent({
|
|
|
53
50
|
name: "custom-agent",
|
|
54
51
|
model: {
|
|
55
52
|
url: "https://api.berget.ai/v1",
|
|
56
|
-
id: "berget/
|
|
53
|
+
id: "berget/google/gemma-4-31B-it",
|
|
57
54
|
apiKey: process.env.BERGET_API_KEY,
|
|
58
55
|
headers: {
|
|
59
56
|
"X-Custom-Header": "value"
|
|
@@ -72,7 +69,7 @@ const agent = new Agent({
|
|
|
72
69
|
const useAdvanced = requestContext.task === "complex";
|
|
73
70
|
return useAdvanced
|
|
74
71
|
? "berget/zai-org/GLM-4.7"
|
|
75
|
-
: "berget/
|
|
72
|
+
: "berget/google/gemma-4-31B-it";
|
|
76
73
|
}
|
|
77
74
|
});
|
|
78
75
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cloudflare Workers AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 8 Cloudflare Workers AI models through Mastra's model router. Authentication is handled automatically using the `CLOUDFLARE_API_KEY` environment variable. Configure `CLOUDFLARE_ACCOUNT_ID` as well.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Cloudflare Workers AI documentation](https://developers.cloudflare.com/workers-ai/models/).
|
|
6
6
|
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| `cloudflare-workers-ai/@cf/google/gemma-4-26b-a4b-it` | 256K | | | | | | $0.10 | $0.30 |
|
|
39
39
|
| `cloudflare-workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct` | 128K | | | | | | $0.27 | $0.85 |
|
|
40
40
|
| `cloudflare-workers-ai/@cf/moonshotai/kimi-k2.5` | 256K | | | | | | $0.60 | $3 |
|
|
41
|
+
| `cloudflare-workers-ai/@cf/moonshotai/kimi-k2.6` | 256K | | | | | | $0.95 | $4 |
|
|
41
42
|
| `cloudflare-workers-ai/@cf/nvidia/nemotron-3-120b-a12b` | 256K | | | | | | $0.50 | $2 |
|
|
42
43
|
| `cloudflare-workers-ai/@cf/openai/gpt-oss-120b` | 128K | | | | | | $0.35 | $0.75 |
|
|
43
44
|
| `cloudflare-workers-ai/@cf/openai/gpt-oss-20b` | 128K | | | | | | $0.20 | $0.30 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cortecs
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 33 Cortecs models through Mastra's model router. Authentication is handled automatically using the `CORTECS_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Cortecs documentation](https://cortecs.ai).
|
|
6
6
|
|
|
@@ -39,6 +39,7 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `cortecs/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
40
40
|
| `cortecs/claude-opus4-5` | 200K | | | | | | $6 | $30 |
|
|
41
41
|
| `cortecs/claude-opus4-6` | 1.0M | | | | | | $6 | $30 |
|
|
42
|
+
| `cortecs/claude-opus4-7` | 1.0M | | | | | | $6 | $28 |
|
|
42
43
|
| `cortecs/claude-sonnet-4` | 200K | | | | | | $3 | $17 |
|
|
43
44
|
| `cortecs/deepseek-v3-0324` | 128K | | | | | | $0.55 | $2 |
|
|
44
45
|
| `cortecs/devstral-2512` | 262K | | | | | | — | — |
|
|
@@ -49,6 +50,7 @@ for await (const chunk of stream) {
|
|
|
49
50
|
| `cortecs/glm-4.7` | 198K | | | | | | $0.45 | $2 |
|
|
50
51
|
| `cortecs/glm-4.7-flash` | 203K | | | | | | $0.09 | $0.53 |
|
|
51
52
|
| `cortecs/glm-5` | 203K | | | | | | $1 | $3 |
|
|
53
|
+
| `cortecs/glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
52
54
|
| `cortecs/gpt-4.1` | 1.0M | | | | | | $2 | $9 |
|
|
53
55
|
| `cortecs/gpt-oss-120b` | 128K | | | | | | — | — |
|
|
54
56
|
| `cortecs/intellect-3` | 128K | | | | | | $0.22 | $1 |
|
|
@@ -59,6 +61,7 @@ for await (const chunk of stream) {
|
|
|
59
61
|
| `cortecs/minimax-m2` | 400K | | | | | | $0.39 | $2 |
|
|
60
62
|
| `cortecs/minimax-m2.1` | 196K | | | | | | $0.34 | $1 |
|
|
61
63
|
| `cortecs/minimax-m2.5` | 197K | | | | | | $0.32 | $1 |
|
|
64
|
+
| `cortecs/minimax-M2.7` | 203K | | | | | | $0.47 | $1 |
|
|
62
65
|
| `cortecs/nova-pro-v1` | 300K | | | | | | $1 | $4 |
|
|
63
66
|
| `cortecs/qwen3-32b` | 16K | | | | | | $0.10 | $0.33 |
|
|
64
67
|
| `cortecs/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.44 | $2 |
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# DigitalOcean
|
|
2
|
+
|
|
3
|
+
Access 46 DigitalOcean models through Mastra's model router. Authentication is handled automatically using the `DIGITALOCEAN_ACCESS_TOKEN` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [DigitalOcean documentation](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
DIGITALOCEAN_ACCESS_TOKEN=your-api-token
|
|
9
|
+
```
|
|
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: "digitalocean/alibaba-qwen3-32b"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [DigitalOcean documentation](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `digitalocean/alibaba-qwen3-32b` | 131K | | | | | | $0.25 | $0.55 |
|
|
38
|
+
| `digitalocean/all-mini-lm-l6-v2` | 256 | | | | | | $0.01 | — |
|
|
39
|
+
| `digitalocean/anthropic-claude-4.1-opus` | 200K | | | | | | $15 | $75 |
|
|
40
|
+
| `digitalocean/anthropic-claude-4.5-sonnet` | 1.0M | | | | | | $3 | $15 |
|
|
41
|
+
| `digitalocean/anthropic-claude-4.6-sonnet` | 1.0M | | | | | | $3 | $15 |
|
|
42
|
+
| `digitalocean/anthropic-claude-haiku-4.5` | 200K | | | | | | $1 | $5 |
|
|
43
|
+
| `digitalocean/anthropic-claude-opus-4` | 200K | | | | | | $15 | $75 |
|
|
44
|
+
| `digitalocean/anthropic-claude-opus-4.5` | 200K | | | | | | $5 | $25 |
|
|
45
|
+
| `digitalocean/anthropic-claude-opus-4.6` | 1.0M | | | | | | $5 | $25 |
|
|
46
|
+
| `digitalocean/anthropic-claude-opus-4.7` | 1.0M | | | | | | $5 | $25 |
|
|
47
|
+
| `digitalocean/anthropic-claude-sonnet-4` | 1.0M | | | | | | $3 | $15 |
|
|
48
|
+
| `digitalocean/arcee-trinity-large-thinking` | 256K | | | | | | $0.25 | $0.90 |
|
|
49
|
+
| `digitalocean/deepseek-r1-distill-llama-70b` | 131K | | | | | | $0.99 | $0.99 |
|
|
50
|
+
| `digitalocean/fal-ai/elevenlabs/tts/multilingual-v2` | — | | | | | | — | — |
|
|
51
|
+
| `digitalocean/fal-ai/fast-sdxl` | — | | | | | | — | — |
|
|
52
|
+
| `digitalocean/fal-ai/flux/schnell` | — | | | | | | — | — |
|
|
53
|
+
| `digitalocean/fal-ai/stable-audio-25/text-to-audio` | — | | | | | | — | — |
|
|
54
|
+
| `digitalocean/glm-5` | 203K | | | | | | $1 | $3 |
|
|
55
|
+
| `digitalocean/gte-large-en-v1.5` | 8K | | | | | | $0.09 | — |
|
|
56
|
+
| `digitalocean/kimi-k2.5` | 262K | | | | | | $0.50 | $3 |
|
|
57
|
+
| `digitalocean/llama3.3-70b-instruct` | 128K | | | | | | $0.65 | $0.65 |
|
|
58
|
+
| `digitalocean/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
59
|
+
| `digitalocean/multi-qa-mpnet-base-dot-v1` | 512 | | | | | | $0.01 | — |
|
|
60
|
+
| `digitalocean/nvidia-nemotron-3-super-120b` | 256K | | | | | | $0.30 | $0.65 |
|
|
61
|
+
| `digitalocean/openai-gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
62
|
+
| `digitalocean/openai-gpt-4o` | 128K | | | | | | $3 | $10 |
|
|
63
|
+
| `digitalocean/openai-gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 |
|
|
64
|
+
| `digitalocean/openai-gpt-5` | 400K | | | | | | $1 | $10 |
|
|
65
|
+
| `digitalocean/openai-gpt-5-2-pro` | 400K | | | | | | $21 | $168 |
|
|
66
|
+
| `digitalocean/openai-gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
|
|
67
|
+
| `digitalocean/openai-gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 |
|
|
68
|
+
| `digitalocean/openai-gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 |
|
|
69
|
+
| `digitalocean/openai-gpt-5.2` | 400K | | | | | | $2 | $14 |
|
|
70
|
+
| `digitalocean/openai-gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
71
|
+
| `digitalocean/openai-gpt-5.4` | 1.0M | | | | | | $3 | $15 |
|
|
72
|
+
| `digitalocean/openai-gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
73
|
+
| `digitalocean/openai-gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
74
|
+
| `digitalocean/openai-gpt-5.4-pro` | 400K | | | | | | $30 | $180 |
|
|
75
|
+
| `digitalocean/openai-gpt-image-1` | — | | | | | | $5 | $40 |
|
|
76
|
+
| `digitalocean/openai-gpt-image-1.5` | — | | | | | | $5 | $10 |
|
|
77
|
+
| `digitalocean/openai-gpt-oss-120b` | 131K | | | | | | $0.10 | $0.70 |
|
|
78
|
+
| `digitalocean/openai-gpt-oss-20b` | 131K | | | | | | $0.05 | $0.45 |
|
|
79
|
+
| `digitalocean/openai-o1` | 200K | | | | | | $15 | $60 |
|
|
80
|
+
| `digitalocean/openai-o3` | 200K | | | | | | $2 | $8 |
|
|
81
|
+
| `digitalocean/openai-o3-mini` | 200K | | | | | | $1 | $4 |
|
|
82
|
+
| `digitalocean/qwen3-embedding-0.6b` | 8K | | | | | | $0.04 | — |
|
|
83
|
+
|
|
84
|
+
## Advanced configuration
|
|
85
|
+
|
|
86
|
+
### Custom headers
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
const agent = new Agent({
|
|
90
|
+
id: "custom-agent",
|
|
91
|
+
name: "custom-agent",
|
|
92
|
+
model: {
|
|
93
|
+
url: "https://inference.do-ai.run/v1",
|
|
94
|
+
id: "digitalocean/alibaba-qwen3-32b",
|
|
95
|
+
apiKey: process.env.DIGITALOCEAN_ACCESS_TOKEN,
|
|
96
|
+
headers: {
|
|
97
|
+
"X-Custom-Header": "value"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Dynamic model selection
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
const agent = new Agent({
|
|
107
|
+
id: "dynamic-agent",
|
|
108
|
+
name: "Dynamic Agent",
|
|
109
|
+
model: ({ requestContext }) => {
|
|
110
|
+
const useAdvanced = requestContext.task === "complex";
|
|
111
|
+
return useAdvanced
|
|
112
|
+
? "digitalocean/qwen3-embedding-0.6b"
|
|
113
|
+
: "digitalocean/alibaba-qwen3-32b";
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Firmware
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 24 Firmware models through Mastra's model router. Authentication is handled automatically using the `FIRMWARE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Firmware documentation](https://docs.frogbot.ai).
|
|
6
6
|
|
|
@@ -35,9 +35,8 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `firmware/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
38
|
-
| `firmware/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
39
38
|
| `firmware/claude-opus-4-6` | 200K | | | | | | $5 | $25 |
|
|
40
|
-
| `firmware/claude-
|
|
39
|
+
| `firmware/claude-opus-4-7` | 200K | | | | | | $5 | $25 |
|
|
41
40
|
| `firmware/claude-sonnet-4-6` | 200K | | | | | | $3 | $15 |
|
|
42
41
|
| `firmware/deepseek-v3-2` | 128K | | | | | | $0.58 | $2 |
|
|
43
42
|
| `firmware/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Helicone
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 90 Helicone models through Mastra's model router. Authentication is handled automatically using the `HELICONE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Helicone documentation](https://helicone.ai/models).
|
|
6
6
|
|
|
@@ -48,7 +48,6 @@ for await (const chunk of stream) {
|
|
|
48
48
|
| `helicone/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
|
|
49
49
|
| `helicone/claude-sonnet-4` | 200K | | | | | | $3 | $15 |
|
|
50
50
|
| `helicone/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
|
|
51
|
-
| `helicone/codex-mini-latest` | 200K | | | | | | $2 | $6 |
|
|
52
51
|
| `helicone/deepseek-r1-distill-llama-70b` | 128K | | | | | | $0.03 | $0.13 |
|
|
53
52
|
| `helicone/deepseek-reasoner` | 128K | | | | | | $0.56 | $2 |
|
|
54
53
|
| `helicone/deepseek-tng-r1t2-chimera` | 130K | | | | | | $0.30 | $1 |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# HPC-AI
|
|
2
|
+
|
|
3
|
+
Access 3 HPC-AI models through Mastra's model router. Authentication is handled automatically using the `HPC_AI_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [HPC-AI documentation](https://www.hpc-ai.com/doc/docs/quickstart/).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
HPC_AI_API_KEY=your-api-key
|
|
9
|
+
```
|
|
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: "hpc-ai/minimax/minimax-m2.5"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [HPC-AI documentation](https://www.hpc-ai.com/doc/docs/quickstart/) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ----------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `hpc-ai/minimax/minimax-m2.5` | 1.0M | | | | | | $0.14 | $0.56 |
|
|
38
|
+
| `hpc-ai/moonshotai/kimi-k2.5` | 262K | | | | | | $0.21 | $1 |
|
|
39
|
+
| `hpc-ai/zai-org/glm-5.1` | 202K | | | | | | $0.66 | $2 |
|
|
40
|
+
|
|
41
|
+
## Advanced configuration
|
|
42
|
+
|
|
43
|
+
### Custom headers
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const agent = new Agent({
|
|
47
|
+
id: "custom-agent",
|
|
48
|
+
name: "custom-agent",
|
|
49
|
+
model: {
|
|
50
|
+
url: "https://api.hpc-ai.com/inference/v1",
|
|
51
|
+
id: "hpc-ai/minimax/minimax-m2.5",
|
|
52
|
+
apiKey: process.env.HPC_AI_API_KEY,
|
|
53
|
+
headers: {
|
|
54
|
+
"X-Custom-Header": "value"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Dynamic model selection
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
const agent = new Agent({
|
|
64
|
+
id: "dynamic-agent",
|
|
65
|
+
name: "Dynamic Agent",
|
|
66
|
+
model: ({ requestContext }) => {
|
|
67
|
+
const useAdvanced = requestContext.task === "complex";
|
|
68
|
+
return useAdvanced
|
|
69
|
+
? "hpc-ai/zai-org/glm-5.1"
|
|
70
|
+
: "hpc-ai/minimax/minimax-m2.5";
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Hugging Face
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 23 Hugging Face models through Mastra's model router. Authentication is handled automatically using the `HF_TOKEN` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Hugging Face documentation](https://huggingface.co).
|
|
6
6
|
|
|
@@ -43,6 +43,7 @@ for await (const chunk of stream) {
|
|
|
43
43
|
| `huggingface/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $1 | $3 |
|
|
44
44
|
| `huggingface/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.60 | $3 |
|
|
45
45
|
| `huggingface/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
46
|
+
| `huggingface/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
|
|
46
47
|
| `huggingface/Qwen/Qwen3-235B-A22B-Thinking-2507` | 262K | | | | | | $0.30 | $3 |
|
|
47
48
|
| `huggingface/Qwen/Qwen3-Coder-480B-A35B-Instruct` | 262K | | | | | | $2 | $2 |
|
|
48
49
|
| `huggingface/Qwen/Qwen3-Coder-Next` | 262K | | | | | | $0.20 | $2 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Kimi For Coding
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 3 Kimi For Coding models through Mastra's model router. Authentication is handled automatically using the `KIMI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Kimi For Coding documentation](https://www.kimi.com/coding/docs/en/third-party-agents.html).
|
|
6
6
|
|
|
@@ -35,6 +35,7 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| ---------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `kimi-for-coding/k2p5` | 262K | | | | | | — | — |
|
|
38
|
+
| `kimi-for-coding/k2p6` | 262K | | | | | | — | — |
|
|
38
39
|
| `kimi-for-coding/kimi-k2-thinking` | 262K | | | | | | — | — |
|
|
39
40
|
|
|
40
41
|
## Advanced configuration
|