@mastra/mcp-docs-server 1.1.6 → 1.1.7
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/course/02-agent-tools-mcp/07-what-is-zapier-mcp.md +10 -1
- package/.docs/course/02-agent-tools-mcp/08-getting-zapier-mcp-url.md +14 -9
- package/.docs/course/02-agent-tools-mcp/09-updating-mcp-config-zapier.md +13 -1
- package/.docs/course/02-agent-tools-mcp/12-troubleshooting-zapier.md +10 -8
- package/.docs/course/02-agent-tools-mcp/13-what-is-github-mcp.md +1 -1
- package/.docs/course/02-agent-tools-mcp/14-getting-github-mcp-url.md +28 -20
- package/.docs/course/02-agent-tools-mcp/15-updating-mcp-config-github.md +18 -2
- package/.docs/course/02-agent-tools-mcp/18-troubleshooting-github.md +5 -5
- package/.docs/course/02-agent-tools-mcp/20-updating-mcp-config-hackernews.md +11 -1
- package/.docs/course/02-agent-tools-mcp/26-updating-mcp-config-filesystem.md +11 -1
- package/.docs/course/02-agent-tools-mcp/32-conclusion.md +1 -1
- package/.docs/docs/agents/using-tools.md +34 -0
- package/.docs/docs/deployment/studio.md +8 -0
- package/.docs/docs/memory/observational-memory.md +3 -5
- package/.docs/docs/server/auth/better-auth.md +23 -6
- package/.docs/docs/workspace/sandbox.md +2 -0
- package/.docs/guides/deployment/vercel.md +19 -0
- package/.docs/guides/index.md +20 -1
- package/.docs/models/gateways/netlify.md +11 -6
- package/.docs/models/gateways/openrouter.md +4 -1
- package/.docs/models/gateways/vercel.md +13 -3
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aihubmix.md +7 -1
- package/.docs/models/providers/anthropic.md +3 -2
- package/.docs/models/providers/baseten.md +7 -5
- package/.docs/models/providers/chutes.md +2 -1
- package/.docs/models/providers/cloudferro-sherlock.md +74 -0
- package/.docs/models/providers/evroc.md +83 -0
- package/.docs/models/providers/fireworks-ai.md +20 -26
- package/.docs/models/providers/firmware.md +2 -1
- package/.docs/models/providers/friendli.md +5 -6
- package/.docs/models/providers/google.md +3 -1
- package/.docs/models/providers/meganova.md +89 -0
- package/.docs/models/providers/opencode-go.md +73 -0
- package/.docs/models/providers/opencode.md +33 -33
- package/.docs/models/providers/perplexity-agent.md +113 -0
- package/.docs/models/providers/perplexity.md +2 -1
- package/.docs/models/providers/poe.md +2 -1
- package/.docs/models/providers/qihang-ai.md +79 -0
- package/.docs/models/providers/qiniu-ai.md +146 -0
- package/.docs/models/providers/siliconflow-cn.md +5 -1
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/zenmux.md +5 -1
- package/.docs/models/providers.md +7 -0
- package/.docs/reference/agents/network.md +38 -1
- package/.docs/reference/ai-sdk/with-mastra.md +5 -1
- package/.docs/reference/deployer/vercel.md +28 -3
- package/.docs/reference/harness/harness-class.md +58 -6
- package/.docs/reference/index.md +1 -1
- package/.docs/reference/memory/cloneThread.md +13 -1
- package/.docs/reference/memory/observational-memory.md +4 -2
- package/.docs/reference/streaming/agents/stream.md +34 -0
- package/.docs/reference/tools/create-tool.md +48 -0
- package/.docs/reference/workspace/daytona-sandbox.md +580 -0
- package/.docs/reference/workspace/s3-filesystem.md +2 -0
- package/CHANGELOG.md +16 -0
- package/LICENSE.md +15 -0
- package/package.json +6 -6
- package/.docs/docs/mastra-code/configuration.md +0 -299
- package/.docs/docs/mastra-code/customization.md +0 -228
- package/.docs/docs/mastra-code/modes.md +0 -104
- package/.docs/docs/mastra-code/overview.md +0 -135
- package/.docs/docs/mastra-code/tools.md +0 -229
- package/.docs/reference/mastra-code/createMastraCode.md +0 -108
|
@@ -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 199 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
|
|
|
@@ -23,7 +23,7 @@ const agent = new Agent({
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
# Use gateway API key
|
|
26
|
-
|
|
26
|
+
AI_GATEWAY_API_KEY=your-gateway-key
|
|
27
27
|
|
|
28
28
|
# Or use provider API keys directly
|
|
29
29
|
OPENAI_API_KEY=sk-...
|
|
@@ -41,6 +41,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
41
41
|
| `alibaba/qwen3-235b-a22b-thinking` |
|
|
42
42
|
| `alibaba/qwen3-coder` |
|
|
43
43
|
| `alibaba/qwen3-coder-30b-a3b` |
|
|
44
|
+
| `alibaba/qwen3-coder-next` |
|
|
44
45
|
| `alibaba/qwen3-coder-plus` |
|
|
45
46
|
| `alibaba/qwen3-embedding-0.6b` |
|
|
46
47
|
| `alibaba/qwen3-embedding-4b` |
|
|
@@ -52,6 +53,8 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
52
53
|
| `alibaba/qwen3-next-80b-a3b-thinking` |
|
|
53
54
|
| `alibaba/qwen3-vl-instruct` |
|
|
54
55
|
| `alibaba/qwen3-vl-thinking` |
|
|
56
|
+
| `alibaba/qwen3.5-flash` |
|
|
57
|
+
| `alibaba/qwen3.5-plus` |
|
|
55
58
|
| `amazon/nova-2-lite` |
|
|
56
59
|
| `amazon/nova-lite` |
|
|
57
60
|
| `amazon/nova-micro` |
|
|
@@ -70,6 +73,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
70
73
|
| `anthropic/claude-opus-4.6` |
|
|
71
74
|
| `anthropic/claude-sonnet-4` |
|
|
72
75
|
| `anthropic/claude-sonnet-4.5` |
|
|
76
|
+
| `anthropic/claude-sonnet-4.6` |
|
|
73
77
|
| `arcee-ai/trinity-large-preview` |
|
|
74
78
|
| `arcee-ai/trinity-mini` |
|
|
75
79
|
| `bfl/flux-kontext-max` |
|
|
@@ -100,6 +104,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
100
104
|
| `google/gemini-3-flash` |
|
|
101
105
|
| `google/gemini-3-pro-image` |
|
|
102
106
|
| `google/gemini-3-pro-preview` |
|
|
107
|
+
| `google/gemini-3.1-pro-preview` |
|
|
103
108
|
| `google/gemini-embedding-001` |
|
|
104
109
|
| `google/imagen-4.0-fast-generate-001` |
|
|
105
110
|
| `google/imagen-4.0-generate-001` |
|
|
@@ -122,6 +127,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
122
127
|
| `minimax/minimax-m2` |
|
|
123
128
|
| `minimax/minimax-m2.1` |
|
|
124
129
|
| `minimax/minimax-m2.1-lightning` |
|
|
130
|
+
| `minimax/minimax-m2.5` |
|
|
125
131
|
| `mistral/codestral` |
|
|
126
132
|
| `mistral/codestral-embed` |
|
|
127
133
|
| `mistral/devstral-2` |
|
|
@@ -175,6 +181,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
175
181
|
| `openai/gpt-5.2-chat` |
|
|
176
182
|
| `openai/gpt-5.2-codex` |
|
|
177
183
|
| `openai/gpt-5.2-pro` |
|
|
184
|
+
| `openai/gpt-5.3-codex` |
|
|
178
185
|
| `openai/gpt-oss-120b` |
|
|
179
186
|
| `openai/gpt-oss-20b` |
|
|
180
187
|
| `openai/gpt-oss-safeguard-20b` |
|
|
@@ -214,6 +221,8 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
214
221
|
| `xai/grok-4.1-fast-non-reasoning` |
|
|
215
222
|
| `xai/grok-4.1-fast-reasoning` |
|
|
216
223
|
| `xai/grok-code-fast-1` |
|
|
224
|
+
| `xai/grok-imagine-image` |
|
|
225
|
+
| `xai/grok-imagine-image-pro` |
|
|
217
226
|
| `xiaomi/mimo-v2-flash` |
|
|
218
227
|
| `zai/glm-4.5` |
|
|
219
228
|
| `zai/glm-4.5-air` |
|
|
@@ -222,4 +231,5 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
222
231
|
| `zai/glm-4.6v` |
|
|
223
232
|
| `zai/glm-4.6v-flash` |
|
|
224
233
|
| `zai/glm-4.7` |
|
|
225
|
-
| `zai/glm-4.7-flashx` |
|
|
234
|
+
| `zai/glm-4.7-flashx` |
|
|
235
|
+
| `zai/glm-5` |
|
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 2609 models from 88 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AIHubMix
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 43 AIHubMix models through Mastra's model router. Authentication is handled automatically using the `AIHUBMIX_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [AIHubMix documentation](https://docs.aihubmix.com).
|
|
6
6
|
|
|
@@ -37,7 +37,11 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| `aihubmix/claude-haiku-4-5` | 200K | | | | | | $1 | $6 |
|
|
38
38
|
| `aihubmix/claude-opus-4-1` | 200K | | | | | | $17 | $83 |
|
|
39
39
|
| `aihubmix/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
40
|
+
| `aihubmix/claude-opus-4-6` | 200K | | | | | | $5 | $25 |
|
|
41
|
+
| `aihubmix/claude-opus-4-6-think` | 200K | | | | | | $5 | $25 |
|
|
40
42
|
| `aihubmix/claude-sonnet-4-5` | 200K | | | | | | $3 | $17 |
|
|
43
|
+
| `aihubmix/claude-sonnet-4-6` | 200K | | | | | | $3 | $15 |
|
|
44
|
+
| `aihubmix/claude-sonnet-4-6-think` | 200K | | | | | | $3 | $15 |
|
|
41
45
|
| `aihubmix/coding-glm-4.7` | 205K | | | | | | $0.27 | $1 |
|
|
42
46
|
| `aihubmix/coding-glm-4.7-free` | 205K | | | | | | — | — |
|
|
43
47
|
| `aihubmix/coding-minimax-m2.1-free` | 205K | | | | | | — | — |
|
|
@@ -47,6 +51,7 @@ for await (const chunk of stream) {
|
|
|
47
51
|
| `aihubmix/gemini-2.5-flash` | 1.0M | | | | | | $0.07 | $0.30 |
|
|
48
52
|
| `aihubmix/gemini-2.5-pro` | 2.0M | | | | | | $1 | $5 |
|
|
49
53
|
| `aihubmix/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
54
|
+
| `aihubmix/gemini-3-pro-preview-search` | 1.0M | | | | | | $2 | $12 |
|
|
50
55
|
| `aihubmix/glm-4.6v` | 128K | | | | | | $0.14 | $0.41 |
|
|
51
56
|
| `aihubmix/glm-4.7` | 205K | | | | | | $0.27 | $1 |
|
|
52
57
|
| `aihubmix/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
@@ -63,6 +68,7 @@ for await (const chunk of stream) {
|
|
|
63
68
|
| `aihubmix/gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 |
|
|
64
69
|
| `aihubmix/gpt-5.1-codex-mini` | 400K | | | | | | $0.25 | $2 |
|
|
65
70
|
| `aihubmix/gpt-5.2` | 400K | | | | | | $2 | $14 |
|
|
71
|
+
| `aihubmix/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
|
|
66
72
|
| `aihubmix/Kimi-K2-0905` | 262K | | | | | | $0.55 | $2 |
|
|
67
73
|
| `aihubmix/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
68
74
|
| `aihubmix/minimax-m2.1` | 205K | | | | | | $0.29 | $1 |
|
|
@@ -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
|
|
|
@@ -54,6 +54,7 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `anthropic/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
|
|
55
55
|
| `anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
|
|
56
56
|
| `anthropic/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
|
|
57
|
+
| `anthropic/claude-sonnet-4-6` | 200K | | | | | | $3 | $15 |
|
|
57
58
|
|
|
58
59
|
## Advanced Configuration
|
|
59
60
|
|
|
@@ -82,7 +83,7 @@ const agent = new Agent({
|
|
|
82
83
|
model: ({ requestContext }) => {
|
|
83
84
|
const useAdvanced = requestContext.task === "complex";
|
|
84
85
|
return useAdvanced
|
|
85
|
-
? "anthropic/claude-sonnet-4-
|
|
86
|
+
? "anthropic/claude-sonnet-4-6"
|
|
86
87
|
: "anthropic/claude-3-5-haiku-20241022";
|
|
87
88
|
}
|
|
88
89
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Baseten
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 9 Baseten models through Mastra's model router. Authentication is handled automatically using the `BASETEN_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Baseten documentation](https://docs.baseten.co/development/model-apis/overview).
|
|
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: "baseten/
|
|
18
|
+
model: "baseten/MiniMaxAI/MiniMax-M2.5"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -35,12 +35,14 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `baseten/deepseek-ai/DeepSeek-V3.2` | 164K | | | | | | $0.30 | $0.45 |
|
|
38
|
+
| `baseten/MiniMaxAI/MiniMax-M2.5` | 204K | | | | | | $0.30 | $1 |
|
|
38
39
|
| `baseten/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.60 | $3 |
|
|
39
40
|
| `baseten/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.60 | $3 |
|
|
40
41
|
| `baseten/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
41
42
|
| `baseten/Qwen/Qwen3-Coder-480B-A35B-Instruct` | 262K | | | | | | $0.38 | $2 |
|
|
42
43
|
| `baseten/zai-org/GLM-4.6` | 200K | | | | | | $0.60 | $2 |
|
|
43
44
|
| `baseten/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
|
|
45
|
+
| `baseten/zai-org/GLM-5` | 203K | | | | | | $0.95 | $3 |
|
|
44
46
|
|
|
45
47
|
## Advanced Configuration
|
|
46
48
|
|
|
@@ -52,7 +54,7 @@ const agent = new Agent({
|
|
|
52
54
|
name: "custom-agent",
|
|
53
55
|
model: {
|
|
54
56
|
url: "https://inference.baseten.co/v1",
|
|
55
|
-
id: "baseten/
|
|
57
|
+
id: "baseten/MiniMaxAI/MiniMax-M2.5",
|
|
56
58
|
apiKey: process.env.BASETEN_API_KEY,
|
|
57
59
|
headers: {
|
|
58
60
|
"X-Custom-Header": "value"
|
|
@@ -70,8 +72,8 @@ const agent = new Agent({
|
|
|
70
72
|
model: ({ requestContext }) => {
|
|
71
73
|
const useAdvanced = requestContext.task === "complex";
|
|
72
74
|
return useAdvanced
|
|
73
|
-
? "baseten/zai-org/GLM-
|
|
74
|
-
: "baseten/
|
|
75
|
+
? "baseten/zai-org/GLM-5"
|
|
76
|
+
: "baseten/MiniMaxAI/MiniMax-M2.5";
|
|
75
77
|
}
|
|
76
78
|
});
|
|
77
79
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Chutes
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 67 Chutes models through Mastra's model router. Authentication is handled automatically using the `CHUTES_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Chutes documentation](https://llm.chutes.ai).
|
|
6
6
|
|
|
@@ -76,6 +76,7 @@ for await (const chunk of stream) {
|
|
|
76
76
|
| `chutes/Qwen/Qwen3-Coder-Next` | 262K | | | | | | $0.07 | $0.30 |
|
|
77
77
|
| `chutes/Qwen/Qwen3-Next-80B-A3B-Instruct` | 262K | | | | | | $0.10 | $0.80 |
|
|
78
78
|
| `chutes/Qwen/Qwen3-VL-235B-A22B-Instruct` | 262K | | | | | | $0.30 | $1 |
|
|
79
|
+
| `chutes/Qwen/Qwen3.5-397B-A17B-TEE` | 262K | | | | | | $0.30 | $1 |
|
|
79
80
|
| `chutes/Qwen/Qwen3Guard-Gen-0.6B` | 33K | | | | | | $0.01 | $0.01 |
|
|
80
81
|
| `chutes/rednote-hilab/dots.ocr` | 131K | | | | | | $0.01 | $0.01 |
|
|
81
82
|
| `chutes/tngtech/DeepSeek-R1T-Chimera` | 164K | | | | | | $0.30 | $1 |
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# CloudFerro Sherlock
|
|
2
|
+
|
|
3
|
+
Access 4 CloudFerro Sherlock models through Mastra's model router. Authentication is handled automatically using the `CLOUDFERRO_SHERLOCK_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [CloudFerro Sherlock documentation](https://docs.sherlock.cloudferro.com/).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
CLOUDFERRO_SHERLOCK_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: "cloudferro-sherlock/meta-llama/Llama-3.3-70B-Instruct"
|
|
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 [CloudFerro Sherlock documentation](https://docs.sherlock.cloudferro.com/) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| --------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `cloudferro-sherlock/meta-llama/Llama-3.3-70B-Instruct` | 70K | | | | | | $3 | $3 |
|
|
38
|
+
| `cloudferro-sherlock/openai/gpt-oss-120b` | 131K | | | | | | $3 | $3 |
|
|
39
|
+
| `cloudferro-sherlock/speakleash/Bielik-11B-v2.6-Instruct` | 32K | | | | | | $0.67 | $0.67 |
|
|
40
|
+
| `cloudferro-sherlock/speakleash/Bielik-11B-v3.0-Instruct` | 32K | | | | | | $0.67 | $0.67 |
|
|
41
|
+
|
|
42
|
+
## Advanced Configuration
|
|
43
|
+
|
|
44
|
+
### Custom Headers
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
const agent = new Agent({
|
|
48
|
+
id: "custom-agent",
|
|
49
|
+
name: "custom-agent",
|
|
50
|
+
model: {
|
|
51
|
+
url: "https://api-sherlock.cloudferro.com/openai/v1/",
|
|
52
|
+
id: "cloudferro-sherlock/meta-llama/Llama-3.3-70B-Instruct",
|
|
53
|
+
apiKey: process.env.CLOUDFERRO_SHERLOCK_API_KEY,
|
|
54
|
+
headers: {
|
|
55
|
+
"X-Custom-Header": "value"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Dynamic Model Selection
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const agent = new Agent({
|
|
65
|
+
id: "dynamic-agent",
|
|
66
|
+
name: "Dynamic Agent",
|
|
67
|
+
model: ({ requestContext }) => {
|
|
68
|
+
const useAdvanced = requestContext.task === "complex";
|
|
69
|
+
return useAdvanced
|
|
70
|
+
? "cloudferro-sherlock/speakleash/Bielik-11B-v3.0-Instruct"
|
|
71
|
+
: "cloudferro-sherlock/meta-llama/Llama-3.3-70B-Instruct";
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# evroc
|
|
2
|
+
|
|
3
|
+
Access 13 evroc models through Mastra's model router. Authentication is handled automatically using the `EVROC_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [evroc documentation](https://docs.evroc.com/products/think/overview.html).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
EVROC_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: "evroc/KBLab/kb-whisper-large"
|
|
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 [evroc documentation](https://docs.evroc.com/products/think/overview.html) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `evroc/intfloat/multilingual-e5-large-instruct` | 512 | | | | | | $0.12 | $0.12 |
|
|
38
|
+
| `evroc/KBLab/kb-whisper-large` | 448 | | | | | | $0.00 | $0.00 |
|
|
39
|
+
| `evroc/microsoft/Phi-4-multimodal-instruct` | 32K | | | | | | $0.24 | $0.47 |
|
|
40
|
+
| `evroc/mistralai/devstral-small-2-24b-instruct-2512` | 33K | | | | | | $0.12 | $0.47 |
|
|
41
|
+
| `evroc/mistralai/Magistral-Small-2509` | 131K | | | | | | $0.59 | $2 |
|
|
42
|
+
| `evroc/mistralai/Voxtral-Small-24B-2507` | 32K | | | | | | $0.00 | $0.00 |
|
|
43
|
+
| `evroc/moonshotai/Kimi-K2.5` | 262K | | | | | | $1 | $6 |
|
|
44
|
+
| `evroc/nvidia/Llama-3.3-70B-Instruct-FP8` | 131K | | | | | | $1 | $1 |
|
|
45
|
+
| `evroc/openai/gpt-oss-120b` | 66K | | | | | | $0.24 | $0.94 |
|
|
46
|
+
| `evroc/openai/whisper-large-v3` | 448 | | | | | | $0.00 | $0.00 |
|
|
47
|
+
| `evroc/Qwen/Qwen3-30B-A3B-Instruct-2507-FP8` | 64K | | | | | | $0.35 | $1 |
|
|
48
|
+
| `evroc/Qwen/Qwen3-Embedding-8B` | 41K | | | | | | $0.12 | $0.12 |
|
|
49
|
+
| `evroc/Qwen/Qwen3-VL-30B-A3B-Instruct` | 100K | | | | | | $0.24 | $0.94 |
|
|
50
|
+
|
|
51
|
+
## Advanced Configuration
|
|
52
|
+
|
|
53
|
+
### Custom Headers
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const agent = new Agent({
|
|
57
|
+
id: "custom-agent",
|
|
58
|
+
name: "custom-agent",
|
|
59
|
+
model: {
|
|
60
|
+
url: "https://models.think.evroc.com/v1",
|
|
61
|
+
id: "evroc/KBLab/kb-whisper-large",
|
|
62
|
+
apiKey: process.env.EVROC_API_KEY,
|
|
63
|
+
headers: {
|
|
64
|
+
"X-Custom-Header": "value"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Dynamic Model Selection
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
const agent = new Agent({
|
|
74
|
+
id: "dynamic-agent",
|
|
75
|
+
name: "Dynamic Agent",
|
|
76
|
+
model: ({ requestContext }) => {
|
|
77
|
+
const useAdvanced = requestContext.task === "complex";
|
|
78
|
+
return useAdvanced
|
|
79
|
+
? "evroc/openai/whisper-large-v3"
|
|
80
|
+
: "evroc/KBLab/kb-whisper-large";
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fireworks AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 13 Fireworks AI models through Mastra's model router. Authentication is handled automatically using the `FIREWORKS_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Fireworks AI documentation](https://fireworks.ai/docs/).
|
|
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: "fireworks-ai/accounts/fireworks/models/deepseek-
|
|
18
|
+
model: "fireworks-ai/accounts/fireworks/models/deepseek-v3p1"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -32,27 +32,21 @@ for await (const chunk of stream) {
|
|
|
32
32
|
|
|
33
33
|
## Models
|
|
34
34
|
|
|
35
|
-
| Model
|
|
36
|
-
|
|
|
37
|
-
| `fireworks-ai/accounts/fireworks/models/deepseek-
|
|
38
|
-
| `fireworks-ai/accounts/fireworks/models/deepseek-
|
|
39
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
40
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
41
|
-
| `fireworks-ai/accounts/fireworks/models/glm-
|
|
42
|
-
| `fireworks-ai/accounts/fireworks/models/glm-
|
|
43
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
44
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
45
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
46
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
47
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
48
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
49
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
50
|
-
| `fireworks-ai/accounts/fireworks/models/kimi-k2p5` | 256K | | | | | | $0.60 | $3 |
|
|
51
|
-
| `fireworks-ai/accounts/fireworks/models/minimax-m2` | 192K | | | | | | $0.30 | $1 |
|
|
52
|
-
| `fireworks-ai/accounts/fireworks/models/minimax-m2p1` | 200K | | | | | | $0.30 | $1 |
|
|
53
|
-
| `fireworks-ai/accounts/fireworks/models/minimax-m2p5` | 197K | | | | | | $0.30 | $1 |
|
|
54
|
-
| `fireworks-ai/accounts/fireworks/models/qwen3-235b-a22b` | 128K | | | | | | $0.22 | $0.88 |
|
|
55
|
-
| `fireworks-ai/accounts/fireworks/models/qwen3-coder-480b-a35b-instruct` | 256K | | | | | | $0.45 | $2 |
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| --------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `fireworks-ai/accounts/fireworks/models/deepseek-v3p1` | 164K | | | | | | $0.56 | $2 |
|
|
38
|
+
| `fireworks-ai/accounts/fireworks/models/deepseek-v3p2` | 160K | | | | | | $0.56 | $2 |
|
|
39
|
+
| `fireworks-ai/accounts/fireworks/models/glm-4p5` | 131K | | | | | | $0.55 | $2 |
|
|
40
|
+
| `fireworks-ai/accounts/fireworks/models/glm-4p5-air` | 131K | | | | | | $0.22 | $0.88 |
|
|
41
|
+
| `fireworks-ai/accounts/fireworks/models/glm-4p7` | 198K | | | | | | $0.60 | $2 |
|
|
42
|
+
| `fireworks-ai/accounts/fireworks/models/glm-5` | 203K | | | | | | $1 | $3 |
|
|
43
|
+
| `fireworks-ai/accounts/fireworks/models/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
44
|
+
| `fireworks-ai/accounts/fireworks/models/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.20 |
|
|
45
|
+
| `fireworks-ai/accounts/fireworks/models/kimi-k2-instruct` | 128K | | | | | | $1 | $3 |
|
|
46
|
+
| `fireworks-ai/accounts/fireworks/models/kimi-k2-thinking` | 256K | | | | | | $0.60 | $3 |
|
|
47
|
+
| `fireworks-ai/accounts/fireworks/models/kimi-k2p5` | 256K | | | | | | $0.60 | $3 |
|
|
48
|
+
| `fireworks-ai/accounts/fireworks/models/minimax-m2p1` | 200K | | | | | | $0.30 | $1 |
|
|
49
|
+
| `fireworks-ai/accounts/fireworks/models/minimax-m2p5` | 197K | | | | | | $0.30 | $1 |
|
|
56
50
|
|
|
57
51
|
## Advanced Configuration
|
|
58
52
|
|
|
@@ -64,7 +58,7 @@ const agent = new Agent({
|
|
|
64
58
|
name: "custom-agent",
|
|
65
59
|
model: {
|
|
66
60
|
url: "https://api.fireworks.ai/inference/v1/",
|
|
67
|
-
id: "fireworks-ai/accounts/fireworks/models/deepseek-
|
|
61
|
+
id: "fireworks-ai/accounts/fireworks/models/deepseek-v3p1",
|
|
68
62
|
apiKey: process.env.FIREWORKS_API_KEY,
|
|
69
63
|
headers: {
|
|
70
64
|
"X-Custom-Header": "value"
|
|
@@ -82,8 +76,8 @@ const agent = new Agent({
|
|
|
82
76
|
model: ({ requestContext }) => {
|
|
83
77
|
const useAdvanced = requestContext.task === "complex";
|
|
84
78
|
return useAdvanced
|
|
85
|
-
? "fireworks-ai/accounts/fireworks/models/
|
|
86
|
-
: "fireworks-ai/accounts/fireworks/models/deepseek-
|
|
79
|
+
? "fireworks-ai/accounts/fireworks/models/minimax-m2p5"
|
|
80
|
+
: "fireworks-ai/accounts/fireworks/models/deepseek-v3p1";
|
|
87
81
|
}
|
|
88
82
|
});
|
|
89
83
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Firmware
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 16 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.firmware.ai).
|
|
6
6
|
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| `firmware/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
39
39
|
| `firmware/claude-opus-4-6` | 200K | | | | | | $5 | $25 |
|
|
40
40
|
| `firmware/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
|
|
41
|
+
| `firmware/claude-sonnet-4-6` | 200K | | | | | | $3 | $15 |
|
|
41
42
|
| `firmware/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
42
43
|
| `firmware/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
43
44
|
| `firmware/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Friendli
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 7 Friendli models through Mastra's model router. Authentication is handled automatically using the `FRIENDLI_TOKEN` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Friendli documentation](https://friendli.ai/docs/guides/serverless_endpoints/introduction).
|
|
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: "friendli/
|
|
18
|
+
model: "friendli/MiniMaxAI/MiniMax-M2.1"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -34,11 +34,10 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
-
| `friendli/LGAI-EXAONE/EXAONE-4.0.1-32B` | 131K | | | | | | $0.60 | $1 |
|
|
38
|
-
| `friendli/LGAI-EXAONE/K-EXAONE-236B-A23B` | 262K | | | | | | — | — |
|
|
39
37
|
| `friendli/meta-llama/Llama-3.1-8B-Instruct` | 131K | | | | | | $0.10 | $0.10 |
|
|
40
38
|
| `friendli/meta-llama/Llama-3.3-70B-Instruct` | 131K | | | | | | $0.60 | $0.60 |
|
|
41
39
|
| `friendli/MiniMaxAI/MiniMax-M2.1` | 197K | | | | | | $0.30 | $1 |
|
|
40
|
+
| `friendli/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
42
41
|
| `friendli/Qwen/Qwen3-235B-A22B-Instruct-2507` | 262K | | | | | | $0.20 | $0.80 |
|
|
43
42
|
| `friendli/zai-org/GLM-4.7` | 203K | | | | | | — | — |
|
|
44
43
|
| `friendli/zai-org/GLM-5` | 203K | | | | | | $1 | $3 |
|
|
@@ -53,7 +52,7 @@ const agent = new Agent({
|
|
|
53
52
|
name: "custom-agent",
|
|
54
53
|
model: {
|
|
55
54
|
url: "https://api.friendli.ai/serverless/v1",
|
|
56
|
-
id: "friendli/
|
|
55
|
+
id: "friendli/MiniMaxAI/MiniMax-M2.1",
|
|
57
56
|
apiKey: process.env.FRIENDLI_TOKEN,
|
|
58
57
|
headers: {
|
|
59
58
|
"X-Custom-Header": "value"
|
|
@@ -72,7 +71,7 @@ const agent = new Agent({
|
|
|
72
71
|
const useAdvanced = requestContext.task === "complex";
|
|
73
72
|
return useAdvanced
|
|
74
73
|
? "friendli/zai-org/GLM-5"
|
|
75
|
-
: "friendli/
|
|
74
|
+
: "friendli/MiniMaxAI/MiniMax-M2.1";
|
|
76
75
|
}
|
|
77
76
|
});
|
|
78
77
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Google
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 28 Google models through Mastra's model router. Authentication is handled automatically using the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Google documentation](https://ai.google.dev/gemini-api/docs/pricing).
|
|
6
6
|
|
|
@@ -53,6 +53,8 @@ for await (const chunk of stream) {
|
|
|
53
53
|
| `google/gemini-2.5-pro-preview-tts` | 8K | | | | | | $1 | $20 |
|
|
54
54
|
| `google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
55
55
|
| `google/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
56
|
+
| `google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
57
|
+
| `google/gemini-3.1-pro-preview-customtools` | 1.0M | | | | | | $2 | $12 |
|
|
56
58
|
| `google/gemini-embedding-001` | 2K | | | | | | $0.15 | — |
|
|
57
59
|
| `google/gemini-flash-latest` | 1.0M | | | | | | $0.30 | $3 |
|
|
58
60
|
| `google/gemini-flash-lite-latest` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Meganova
|
|
2
|
+
|
|
3
|
+
Access 19 Meganova models through Mastra's model router. Authentication is handled automatically using the `MEGANOVA_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Meganova documentation](https://docs.meganova.ai).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MEGANOVA_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: "meganova/MiniMaxAI/MiniMax-M2.1"
|
|
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 [Meganova documentation](https://docs.meganova.ai) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| -------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `meganova/deepseek-ai/DeepSeek-R1-0528` | 164K | | | | | | $0.50 | $2 |
|
|
38
|
+
| `meganova/deepseek-ai/DeepSeek-V3-0324` | 164K | | | | | | $0.25 | $0.88 |
|
|
39
|
+
| `meganova/deepseek-ai/DeepSeek-V3.1` | 164K | | | | | | $0.27 | $1 |
|
|
40
|
+
| `meganova/deepseek-ai/DeepSeek-V3.2` | 164K | | | | | | $0.26 | $0.38 |
|
|
41
|
+
| `meganova/deepseek-ai/DeepSeek-V3.2-Exp` | 164K | | | | | | $0.27 | $0.40 |
|
|
42
|
+
| `meganova/meta-llama/Llama-3.3-70B-Instruct` | 131K | | | | | | $0.10 | $0.30 |
|
|
43
|
+
| `meganova/MiniMaxAI/MiniMax-M2.1` | 197K | | | | | | $0.28 | $1 |
|
|
44
|
+
| `meganova/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
|
|
45
|
+
| `meganova/mistralai/Mistral-Nemo-Instruct-2407` | 131K | | | | | | $0.02 | $0.04 |
|
|
46
|
+
| `meganova/mistralai/Mistral-Small-3.2-24B-Instruct-2506` | 33K | | | | | | — | — |
|
|
47
|
+
| `meganova/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.60 | $3 |
|
|
48
|
+
| `meganova/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $3 |
|
|
49
|
+
| `meganova/Qwen/Qwen2.5-VL-32B-Instruct` | 16K | | | | | | $0.20 | $0.60 |
|
|
50
|
+
| `meganova/Qwen/Qwen3-235B-A22B-Instruct-2507` | 262K | | | | | | $0.09 | $0.60 |
|
|
51
|
+
| `meganova/Qwen/Qwen3.5-Plus` | 1.0M | | | | | | $0.40 | $2 |
|
|
52
|
+
| `meganova/XiaomiMiMo/MiMo-V2-Flash` | 262K | | | | | | $0.10 | $0.30 |
|
|
53
|
+
| `meganova/zai-org/GLM-4.6` | 203K | | | | | | $0.45 | $2 |
|
|
54
|
+
| `meganova/zai-org/GLM-4.7` | 203K | | | | | | $0.20 | $0.80 |
|
|
55
|
+
| `meganova/zai-org/GLM-5` | 203K | | | | | | $0.80 | $3 |
|
|
56
|
+
|
|
57
|
+
## Advanced Configuration
|
|
58
|
+
|
|
59
|
+
### Custom Headers
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const agent = new Agent({
|
|
63
|
+
id: "custom-agent",
|
|
64
|
+
name: "custom-agent",
|
|
65
|
+
model: {
|
|
66
|
+
url: "https://api.meganova.ai/v1",
|
|
67
|
+
id: "meganova/MiniMaxAI/MiniMax-M2.1",
|
|
68
|
+
apiKey: process.env.MEGANOVA_API_KEY,
|
|
69
|
+
headers: {
|
|
70
|
+
"X-Custom-Header": "value"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Dynamic Model Selection
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const agent = new Agent({
|
|
80
|
+
id: "dynamic-agent",
|
|
81
|
+
name: "Dynamic Agent",
|
|
82
|
+
model: ({ requestContext }) => {
|
|
83
|
+
const useAdvanced = requestContext.task === "complex";
|
|
84
|
+
return useAdvanced
|
|
85
|
+
? "meganova/zai-org/GLM-5"
|
|
86
|
+
: "meganova/MiniMaxAI/MiniMax-M2.1";
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
```
|