@mastra/mcp-docs-server 1.2.0-alpha.0 → 1.2.1-alpha.0
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/goals.md +2 -2
- package/.docs/docs/harness/modes.md +2 -2
- package/.docs/docs/harness/overview.md +23 -25
- package/.docs/docs/harness/session.md +2 -2
- package/.docs/docs/harness/subagents.md +3 -3
- package/.docs/docs/harness/tool-approvals.md +2 -2
- package/.docs/guides/build-your-ui/openui.md +297 -0
- package/.docs/models/gateways/custom-gateways.md +12 -0
- package/.docs/models/gateways/netlify.md +4 -7
- package/.docs/models/gateways/openrouter.md +20 -40
- package/.docs/models/gateways/vercel.md +281 -246
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +5 -2
- package/.docs/models/providers/alibaba-coding-plan-cn.md +5 -2
- package/.docs/models/providers/alibaba-coding-plan.md +5 -2
- package/.docs/models/providers/alibaba-token-plan-cn.md +88 -0
- package/.docs/models/providers/alibaba-token-plan.md +88 -0
- package/.docs/models/providers/alibaba.md +3 -1
- package/.docs/models/providers/ambient.md +6 -5
- package/.docs/models/providers/anthropic.md +8 -11
- package/.docs/models/providers/anyapi.md +99 -0
- package/.docs/models/providers/baseten.md +19 -19
- package/.docs/models/providers/cerebras.md +5 -7
- package/.docs/models/providers/claudinio.md +3 -2
- package/.docs/models/providers/cloudflare-workers-ai.md +4 -9
- package/.docs/models/providers/cortecs.md +9 -2
- package/.docs/models/providers/crof.md +12 -10
- package/.docs/models/providers/deepinfra.md +18 -31
- package/.docs/models/providers/deepseek.md +1 -1
- package/.docs/models/providers/digitalocean.md +5 -1
- package/.docs/models/providers/fastrouter.md +34 -2
- package/.docs/models/providers/fireworks-ai.md +22 -27
- package/.docs/models/providers/freemodel.md +108 -0
- package/.docs/models/providers/google.md +7 -9
- package/.docs/models/providers/groq.md +7 -9
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hpc-ai.md +3 -3
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/kilo.md +9 -8
- package/.docs/models/providers/kimi-for-coding.md +4 -3
- package/.docs/models/providers/llmgateway.md +38 -29
- package/.docs/models/providers/llmtr.md +76 -0
- package/.docs/models/providers/lucidquery.md +11 -9
- package/.docs/models/providers/minimax-cn-coding-plan.md +3 -2
- package/.docs/models/providers/minimax-cn.md +3 -2
- package/.docs/models/providers/minimax-coding-plan.md +3 -2
- package/.docs/models/providers/minimax.md +3 -2
- package/.docs/models/providers/mistral.md +25 -31
- package/.docs/models/providers/moonshotai-cn.md +13 -11
- package/.docs/models/providers/moonshotai.md +13 -11
- package/.docs/models/providers/nano-gpt.md +621 -529
- package/.docs/models/providers/nearai.md +5 -1
- package/.docs/models/providers/nebius.md +2 -15
- package/.docs/models/providers/neon.md +96 -0
- package/.docs/models/providers/neuralwatt.md +19 -20
- package/.docs/models/providers/novita-ai.md +7 -2
- package/.docs/models/providers/nvidia.md +5 -14
- package/.docs/models/providers/ollama-cloud.md +8 -12
- package/.docs/models/providers/openai.md +2 -3
- package/.docs/models/providers/opencode-go.md +10 -9
- package/.docs/models/providers/opencode.md +7 -2
- package/.docs/models/providers/ovhcloud.md +7 -3
- package/.docs/models/providers/poe.md +2 -1
- package/.docs/models/providers/poolside.md +72 -0
- package/.docs/models/providers/routing-run.md +5 -3
- package/.docs/models/providers/scaleway.md +3 -5
- package/.docs/models/providers/siliconflow-cn.md +4 -11
- package/.docs/models/providers/siliconflow.md +7 -13
- package/.docs/models/providers/snowflake-cortex.md +89 -0
- package/.docs/models/providers/stepfun-ai.md +5 -5
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/synthetic.md +2 -1
- package/.docs/models/providers/togetherai.md +30 -24
- package/.docs/models/providers/umans-ai-coding-plan.md +3 -2
- package/.docs/models/providers/umans-ai.md +75 -0
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +14 -12
- package/.docs/models/providers/wafer.ai.md +9 -4
- package/.docs/models/providers/xai.md +3 -3
- package/.docs/models/providers/xiaomi-token-plan-ams.md +15 -13
- package/.docs/models/providers/xiaomi-token-plan-cn.md +15 -13
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +15 -13
- package/.docs/models/providers/xiaomi.md +10 -9
- package/.docs/models/providers/xpersona.md +4 -3
- package/.docs/models/providers/zai-coding-plan.md +2 -1
- package/.docs/models/providers/zai.md +2 -1
- package/.docs/models/providers/zeldoc.md +71 -0
- package/.docs/models/providers/zenmux.md +19 -3
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -1
- package/.docs/models/providers/zhipuai.md +2 -1
- package/.docs/models/providers.md +12 -3
- package/.docs/reference/agents/agent.md +18 -5
- package/.docs/reference/harness/harness-class.md +3 -137
- package/.docs/reference/harness/session.md +128 -2
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/tools/mcp-client.md +11 -0
- package/.docs/reference/voice/google-gemini-live.md +22 -0
- package/.docs/reference/workspace/archil-filesystem.md +203 -0
- package/.docs/reference/workspace/gcs-filesystem.md +1 -0
- package/.docs/reference/workspace/s3-filesystem.md +1 -0
- package/CHANGELOG.md +20 -0
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cortecs
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 56 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
|
|
|
@@ -40,6 +40,7 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `cortecs/claude-opus4-5` | 200K | | | | | | $6 | $30 |
|
|
41
41
|
| `cortecs/claude-opus4-6` | 1.0M | | | | | | $6 | $30 |
|
|
42
42
|
| `cortecs/claude-opus4-7` | 1.0M | | | | | | $6 | $28 |
|
|
43
|
+
| `cortecs/claude-opus4-8` | 1.0M | | | | | | $6 | $28 |
|
|
43
44
|
| `cortecs/claude-sonnet-4` | 200K | | | | | | $3 | $17 |
|
|
44
45
|
| `cortecs/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
|
|
45
46
|
| `cortecs/deepseek-r1-0528` | 164K | | | | | | $0.58 | $2 |
|
|
@@ -48,15 +49,18 @@ for await (const chunk of stream) {
|
|
|
48
49
|
| `cortecs/deepseek-v4-flash` | 1.0M | | | | | | $0.13 | $0.27 |
|
|
49
50
|
| `cortecs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
50
51
|
| `cortecs/devstral-2512` | 262K | | | | | | — | — |
|
|
51
|
-
| `cortecs/devstral-small-2512` | 262K | | | | | | — | — |
|
|
52
52
|
| `cortecs/gemini-2.5-pro` | 1.0M | | | | | | $2 | $11 |
|
|
53
53
|
| `cortecs/glm-4.5` | 131K | | | | | | $0.67 | $2 |
|
|
54
54
|
| `cortecs/glm-4.5-air` | 131K | | | | | | $0.22 | $1 |
|
|
55
55
|
| `cortecs/glm-4.7` | 198K | | | | | | $0.45 | $2 |
|
|
56
56
|
| `cortecs/glm-4.7-flash` | 203K | | | | | | $0.09 | $0.53 |
|
|
57
57
|
| `cortecs/glm-5` | 203K | | | | | | $1 | $3 |
|
|
58
|
+
| `cortecs/glm-5-turbo` | 200K | | | | | | $1 | $4 |
|
|
58
59
|
| `cortecs/glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
60
|
+
| `cortecs/glm-5.2` | 1.0M | | | | | | $1 | $5 |
|
|
61
|
+
| `cortecs/glm-5v-turbo` | 200K | | | | | | $1 | $4 |
|
|
59
62
|
| `cortecs/gpt-4.1` | 1.0M | | | | | | $2 | $9 |
|
|
63
|
+
| `cortecs/gpt-5.4` | 1.1M | | | | | | $3 | $16 |
|
|
60
64
|
| `cortecs/gpt-oss-120b` | 128K | | | | | | — | — |
|
|
61
65
|
| `cortecs/hermes-4-70b` | 128K | | | | | | $0.12 | $0.36 |
|
|
62
66
|
| `cortecs/intellect-3` | 128K | | | | | | $0.22 | $1 |
|
|
@@ -64,12 +68,15 @@ for await (const chunk of stream) {
|
|
|
64
68
|
| `cortecs/kimi-k2-thinking` | 262K | | | | | | $0.66 | $3 |
|
|
65
69
|
| `cortecs/kimi-k2.5` | 256K | | | | | | $0.55 | $3 |
|
|
66
70
|
| `cortecs/kimi-k2.6` | 256K | | | | | | $0.81 | $4 |
|
|
71
|
+
| `cortecs/kimi-k2.7-code` | 262K | | | | | | $1 | $5 |
|
|
67
72
|
| `cortecs/llama-3.1-405b-instruct` | 128K | | | | | | — | — |
|
|
68
73
|
| `cortecs/llama-3.3-70b-instruct` | 131K | | | | | | $0.09 | $0.28 |
|
|
74
|
+
| `cortecs/llama-4-maverick` | 1.0M | | | | | | $0.12 | $0.60 |
|
|
69
75
|
| `cortecs/minimax-m2` | 400K | | | | | | $0.39 | $2 |
|
|
70
76
|
| `cortecs/minimax-m2.1` | 196K | | | | | | $0.34 | $1 |
|
|
71
77
|
| `cortecs/minimax-m2.5` | 197K | | | | | | $0.32 | $1 |
|
|
72
78
|
| `cortecs/minimax-m2.7` | 203K | | | | | | $0.47 | $1 |
|
|
79
|
+
| `cortecs/minimax-m3` | 512K | | | | | | $0.35 | $2 |
|
|
73
80
|
| `cortecs/mistral-large-2512` | 256K | | | | | | $0.50 | $2 |
|
|
74
81
|
| `cortecs/mixtral-8x7B-instruct-v0.1` | 32K | | | | | | $0.44 | $0.68 |
|
|
75
82
|
| `cortecs/nemotron-3-super-120b-a12b` | 262K | | | | | | $0.27 | $0.80 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CrofAI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 23 CrofAI models through Mastra's model router. Authentication is handled automatically using the `CROF_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [CrofAI documentation](https://crof.ai/docs).
|
|
6
6
|
|
|
@@ -34,23 +34,25 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
-
| `crof/deepseek-v3.2` | 164K | | | | | | $0.
|
|
37
|
+
| `crof/deepseek-v3.2` | 164K | | | | | | $0.18 | $0.35 |
|
|
38
38
|
| `crof/deepseek-v4-flash` | 1.0M | | | | | | $0.12 | $0.21 |
|
|
39
|
-
| `crof/deepseek-v4-pro` | 1.0M | | | | | | $0.
|
|
40
|
-
| `crof/deepseek-v4-pro-
|
|
39
|
+
| `crof/deepseek-v4-pro` | 1.0M | | | | | | $0.35 | $0.80 |
|
|
40
|
+
| `crof/deepseek-v4-pro-lightning` | 1.0M | | | | | | $0.80 | $2 |
|
|
41
41
|
| `crof/gemma-4-31b-it` | 262K | | | | | | $0.10 | $0.30 |
|
|
42
42
|
| `crof/glm-4.7` | 203K | | | | | | $0.25 | $1 |
|
|
43
|
-
| `crof/glm-4.7-flash` |
|
|
43
|
+
| `crof/glm-4.7-flash` | 203K | | | | | | $0.04 | $0.30 |
|
|
44
44
|
| `crof/glm-5` | 203K | | | | | | $0.48 | $2 |
|
|
45
45
|
| `crof/glm-5.1` | 203K | | | | | | $0.45 | $2 |
|
|
46
|
-
| `crof/glm-5.
|
|
47
|
-
| `crof/greg`
|
|
46
|
+
| `crof/glm-5.2` | 1.0M | | | | | | $0.50 | $2 |
|
|
47
|
+
| `crof/greg-1-mini` | 229K | | | | | | $0.07 | $0.15 |
|
|
48
|
+
| `crof/greg-2-super` | 229K | | | | | | $2 | $5 |
|
|
49
|
+
| `crof/greg-2-ultra` | 229K | | | | | | $3 | $10 |
|
|
50
|
+
| `crof/greg-rp` | 229K | | | | | | $0.10 | $0.30 |
|
|
48
51
|
| `crof/kimi-k2.5` | 262K | | | | | | $0.35 | $2 |
|
|
49
52
|
| `crof/kimi-k2.5-lightning` | 131K | | | | | | $1 | $3 |
|
|
50
53
|
| `crof/kimi-k2.6` | 262K | | | | | | $0.50 | $2 |
|
|
51
|
-
| `crof/kimi-k2.
|
|
52
|
-
| `crof/mimo-v2.5-pro` | 1.0M | | | | | | $0.
|
|
53
|
-
| `crof/mimo-v2.5-pro-precision` | 1.0M | | | | | | $0.80 | $3 |
|
|
54
|
+
| `crof/kimi-k2.7-code` | 262K | | | | | | $0.55 | $2 |
|
|
55
|
+
| `crof/mimo-v2.5-pro` | 1.0M | | | | | | $0.40 | $0.80 |
|
|
54
56
|
| `crof/minimax-m2.5` | 205K | | | | | | $0.11 | $0.95 |
|
|
55
57
|
| `crof/qwen3.5-397b-a17b` | 262K | | | | | | $0.35 | $2 |
|
|
56
58
|
| `crof/qwen3.5-9b` | 262K | | | | | | $0.04 | $0.15 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deep Infra
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 25 Deep Infra models through Mastra's model router. Authentication is handled automatically using the `DEEPINFRA_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Deep Infra documentation](https://deepinfra.com/models).
|
|
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: "deepinfra/MiniMaxAI/MiniMax-M2"
|
|
18
|
+
model: "deepinfra/MiniMaxAI/MiniMax-M2.5"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -32,43 +32,30 @@ for await (const chunk of stream) {
|
|
|
32
32
|
|
|
33
33
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
34
34
|
| ------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
35
|
-
| `deepinfra/anthropic/claude-3-7-sonnet-latest` | 200K | | | | | | $3 | $17 |
|
|
36
|
-
| `deepinfra/anthropic/claude-4-opus` | 200K | | | | | | $17 | $83 |
|
|
37
35
|
| `deepinfra/deepseek-ai/DeepSeek-R1-0528` | 164K | | | | | | $0.50 | $2 |
|
|
38
36
|
| `deepinfra/deepseek-ai/DeepSeek-V3.2` | 164K | | | | | | $0.26 | $0.38 |
|
|
39
|
-
| `deepinfra/deepseek-ai/DeepSeek-V4-Flash` | 1.0M | | | | | | $0.
|
|
40
|
-
| `deepinfra/deepseek-ai/DeepSeek-V4-Pro` |
|
|
37
|
+
| `deepinfra/deepseek-ai/DeepSeek-V4-Flash` | 1.0M | | | | | | $0.10 | $0.20 |
|
|
38
|
+
| `deepinfra/deepseek-ai/DeepSeek-V4-Pro` | 1.0M | | | | | | $1 | $3 |
|
|
41
39
|
| `deepinfra/google/gemma-4-26B-A4B-it` | 262K | | | | | | $0.07 | $0.34 |
|
|
42
40
|
| `deepinfra/google/gemma-4-31B-it` | 262K | | | | | | $0.13 | $0.38 |
|
|
43
|
-
| `deepinfra/meta-llama/Llama-3.1-70B-Instruct` | 131K | | | | | | $0.40 | $0.40 |
|
|
44
|
-
| `deepinfra/meta-llama/Llama-3.1-70B-Instruct-Turbo` | 131K | | | | | | $0.40 | $0.40 |
|
|
45
|
-
| `deepinfra/meta-llama/Llama-3.1-8B-Instruct` | 131K | | | | | | $0.02 | $0.05 |
|
|
46
|
-
| `deepinfra/meta-llama/Llama-3.1-8B-Instruct-Turbo` | 131K | | | | | | $0.02 | $0.03 |
|
|
47
41
|
| `deepinfra/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $0.10 | $0.32 |
|
|
48
42
|
| `deepinfra/meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
49
|
-
| `deepinfra/meta-llama/Llama-4-Scout-17B-16E-Instruct` |
|
|
50
|
-
| `deepinfra/MiniMaxAI/MiniMax-M2`
|
|
51
|
-
| `deepinfra/
|
|
52
|
-
| `deepinfra/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.27 | $0.95 |
|
|
53
|
-
| `deepinfra/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $0.50 | $2 |
|
|
54
|
-
| `deepinfra/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
|
|
55
|
-
| `deepinfra/moonshotai/Kimi-K2-Thinking` | 131K | | | | | | $0.47 | $2 |
|
|
56
|
-
| `deepinfra/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
|
|
43
|
+
| `deepinfra/meta-llama/Llama-4-Scout-17B-16E-Instruct` | 328K | | | | | | $0.10 | $0.30 |
|
|
44
|
+
| `deepinfra/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.15 | $1 |
|
|
45
|
+
| `deepinfra/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $2 |
|
|
57
46
|
| `deepinfra/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.75 | $4 |
|
|
58
|
-
| `deepinfra/openai/gpt-oss-120b` | 131K | | | | | | $0.
|
|
47
|
+
| `deepinfra/openai/gpt-oss-120b` | 131K | | | | | | $0.04 | $0.19 |
|
|
59
48
|
| `deepinfra/openai/gpt-oss-20b` | 131K | | | | | | $0.03 | $0.14 |
|
|
60
|
-
| `deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct` | 262K | | | | | | $0.40 | $2 |
|
|
61
49
|
| `deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo` | 262K | | | | | | $0.30 | $1 |
|
|
62
|
-
| `deepinfra/Qwen/Qwen3.5-35B-A3B` | 262K | | | | | | $0.
|
|
63
|
-
| `deepinfra/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.
|
|
64
|
-
| `deepinfra/Qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.
|
|
65
|
-
| `deepinfra/
|
|
66
|
-
| `deepinfra/
|
|
67
|
-
| `deepinfra/zai-org/GLM-4.6` |
|
|
68
|
-
| `deepinfra/zai-org/GLM-4.
|
|
69
|
-
| `deepinfra/zai-org/GLM-4.7` | 203K | | | | | | $0.43 | $2 |
|
|
50
|
+
| `deepinfra/Qwen/Qwen3.5-35B-A3B` | 262K | | | | | | $0.14 | $1 |
|
|
51
|
+
| `deepinfra/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.45 | $3 |
|
|
52
|
+
| `deepinfra/Qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.15 | $0.95 |
|
|
53
|
+
| `deepinfra/XiaomiMiMo/MiMo-V2.5` | 262K | | | | | | $0.40 | $2 |
|
|
54
|
+
| `deepinfra/XiaomiMiMo/MiMo-V2.5-Pro` | 1.0M | | | | | | $1 | $3 |
|
|
55
|
+
| `deepinfra/zai-org/GLM-4.6` | 203K | | | | | | $0.43 | $2 |
|
|
56
|
+
| `deepinfra/zai-org/GLM-4.7` | 203K | | | | | | $0.40 | $2 |
|
|
70
57
|
| `deepinfra/zai-org/GLM-4.7-Flash` | 203K | | | | | | $0.06 | $0.40 |
|
|
71
|
-
| `deepinfra/zai-org/GLM-5` | 203K | | | | | | $0.
|
|
58
|
+
| `deepinfra/zai-org/GLM-5` | 203K | | | | | | $0.60 | $2 |
|
|
72
59
|
| `deepinfra/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
|
|
73
60
|
|
|
74
61
|
## Advanced configuration
|
|
@@ -80,7 +67,7 @@ const agent = new Agent({
|
|
|
80
67
|
id: "custom-agent",
|
|
81
68
|
name: "custom-agent",
|
|
82
69
|
model: {
|
|
83
|
-
id: "deepinfra/MiniMaxAI/MiniMax-M2",
|
|
70
|
+
id: "deepinfra/MiniMaxAI/MiniMax-M2.5",
|
|
84
71
|
apiKey: process.env.DEEPINFRA_API_KEY,
|
|
85
72
|
headers: {
|
|
86
73
|
"X-Custom-Header": "value"
|
|
@@ -99,7 +86,7 @@ const agent = new Agent({
|
|
|
99
86
|
const useAdvanced = requestContext.task === "complex";
|
|
100
87
|
return useAdvanced
|
|
101
88
|
? "deepinfra/zai-org/GLM-5.1"
|
|
102
|
-
: "deepinfra/MiniMaxAI/MiniMax-M2";
|
|
89
|
+
: "deepinfra/MiniMaxAI/MiniMax-M2.5";
|
|
103
90
|
}
|
|
104
91
|
});
|
|
105
92
|
```
|
|
@@ -35,7 +35,7 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| `deepseek/deepseek-chat` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
36
36
|
| `deepseek/deepseek-reasoner` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
37
37
|
| `deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
38
|
-
| `deepseek/deepseek-v4-pro` | 1.0M | | | | | | $
|
|
38
|
+
| `deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
39
39
|
|
|
40
40
|
## Advanced configuration
|
|
41
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DigitalOcean
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 75 DigitalOcean models through Mastra's model router. Authentication is handled automatically using the `DIGITALOCEAN_ACCESS_TOKEN` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [DigitalOcean documentation](https://docs.digitalocean.com/products/gradient-ai-platform/details/models/).
|
|
6
6
|
|
|
@@ -40,16 +40,19 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `digitalocean/anthropic-claude-4.5-haiku` | 200K | | | | | | $1 | $5 |
|
|
41
41
|
| `digitalocean/anthropic-claude-4.5-sonnet` | 1.0M | | | | | | $3 | $15 |
|
|
42
42
|
| `digitalocean/anthropic-claude-4.6-sonnet` | 1.0M | | | | | | $3 | $15 |
|
|
43
|
+
| `digitalocean/anthropic-claude-fable-5` | 1.0M | | | | | | — | — |
|
|
43
44
|
| `digitalocean/anthropic-claude-haiku-4.5` | 200K | | | | | | $1 | $5 |
|
|
44
45
|
| `digitalocean/anthropic-claude-opus-4` | 200K | | | | | | $15 | $75 |
|
|
45
46
|
| `digitalocean/anthropic-claude-opus-4.5` | 200K | | | | | | $5 | $25 |
|
|
46
47
|
| `digitalocean/anthropic-claude-opus-4.6` | 1.0M | | | | | | $5 | $25 |
|
|
47
48
|
| `digitalocean/anthropic-claude-opus-4.7` | 1.0M | | | | | | $5 | $25 |
|
|
49
|
+
| `digitalocean/anthropic-claude-opus-4.8` | 1.0M | | | | | | $5 | $25 |
|
|
48
50
|
| `digitalocean/anthropic-claude-sonnet-4` | 1.0M | | | | | | $3 | $15 |
|
|
49
51
|
| `digitalocean/arcee-trinity-large-thinking` | 256K | | | | | | $0.25 | $0.90 |
|
|
50
52
|
| `digitalocean/bge-m3` | 8K | | | | | | $0.02 | — |
|
|
51
53
|
| `digitalocean/bge-reranker-v2-m3` | 8K | | | | | | $0.01 | — |
|
|
52
54
|
| `digitalocean/deepseek-3.2` | 128K | | | | | | $0.50 | $2 |
|
|
55
|
+
| `digitalocean/deepseek-4-flash` | 262K | | | | | | — | — |
|
|
53
56
|
| `digitalocean/deepseek-r1-distill-llama-70b` | 131K | | | | | | $0.99 | $0.99 |
|
|
54
57
|
| `digitalocean/deepseek-v3` | 164K | | | | | | — | — |
|
|
55
58
|
| `digitalocean/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
@@ -73,6 +76,7 @@ for await (const chunk of stream) {
|
|
|
73
76
|
| `digitalocean/multi-qa-mpnet-base-dot-v1` | 512 | | | | | | $0.01 | — |
|
|
74
77
|
| `digitalocean/nemotron-3-nano-30b` | 262K | | | | | | — | — |
|
|
75
78
|
| `digitalocean/nemotron-3-nano-omni` | 66K | | | | | | $0.50 | $0.90 |
|
|
79
|
+
| `digitalocean/nemotron-3-ultra-550b` | 131K | | | | | | — | — |
|
|
76
80
|
| `digitalocean/nemotron-nano-12b-v2-vl` | 128K | | | | | | $0.20 | $0.60 |
|
|
77
81
|
| `digitalocean/nvidia-nemotron-3-super-120b` | 256K | | | | | | $0.30 | $0.65 |
|
|
78
82
|
| `digitalocean/openai-gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FastRouter
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 47 FastRouter models through Mastra's model router. Authentication is handled automatically using the `FASTROUTER_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [FastRouter documentation](https://fastrouter.ai/models).
|
|
6
6
|
|
|
@@ -35,20 +35,52 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| ------------------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `fastrouter/anthropic/claude-opus-4.1` | 200K | | | | | | $15 | $75 |
|
|
38
|
+
| `fastrouter/anthropic/claude-opus-4.8` | 1.0M | | | | | | $5 | $25 |
|
|
38
39
|
| `fastrouter/anthropic/claude-sonnet-4` | 200K | | | | | | $3 | $15 |
|
|
40
|
+
| `fastrouter/anthropic/claude-sonnet-4.6` | 1.0M | | | | | | $3 | $15 |
|
|
41
|
+
| `fastrouter/bytedance/seedance-2` | 4K | | | | | | — | — |
|
|
39
42
|
| `fastrouter/deepseek-ai/deepseek-r1-distill-llama-70b` | 131K | | | | | | $0.03 | $0.14 |
|
|
43
|
+
| `fastrouter/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
40
44
|
| `fastrouter/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
41
45
|
| `fastrouter/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
46
|
+
| `fastrouter/google/gemini-3-pro-image-preview` | 66K | | | | | | $2 | $12 |
|
|
47
|
+
| `fastrouter/google/gemini-3.1-flash-image-preview` | 66K | | | | | | $0.50 | $3 |
|
|
48
|
+
| `fastrouter/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
49
|
+
| `fastrouter/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
|
|
50
|
+
| `fastrouter/google/gemma-4-31b-it` | 262K | | | | | | $0.13 | $0.38 |
|
|
51
|
+
| `fastrouter/google/imagen-4.0-fast` | 480 | | | | | | — | — |
|
|
52
|
+
| `fastrouter/google/imagen-4.0-ultra` | 480 | | | | | | — | — |
|
|
53
|
+
| `fastrouter/google/veo3.1` | 400K | | | | | | — | — |
|
|
54
|
+
| `fastrouter/google/veo3.1-fast` | 400K | | | | | | — | — |
|
|
55
|
+
| `fastrouter/google/veo3.1-lite` | 400K | | | | | | — | — |
|
|
56
|
+
| `fastrouter/leonardo-ai/lucid-origin` | 4K | | | | | | — | — |
|
|
57
|
+
| `fastrouter/leonardo-ai/lucid-realism` | 4K | | | | | | — | — |
|
|
58
|
+
| `fastrouter/minimax/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
59
|
+
| `fastrouter/minimax/minimax-m2.7-highspeed` | 205K | | | | | | $0.60 | $2 |
|
|
42
60
|
| `fastrouter/moonshotai/kimi-k2` | 131K | | | | | | $0.55 | $2 |
|
|
61
|
+
| `fastrouter/moonshotai/kimi-k2.6` | 262K | | | | | | $0.75 | $4 |
|
|
43
62
|
| `fastrouter/openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
44
63
|
| `fastrouter/openai/gpt-5` | 400K | | | | | | $1 | $10 |
|
|
45
64
|
| `fastrouter/openai/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
|
|
46
65
|
| `fastrouter/openai/gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 |
|
|
66
|
+
| `fastrouter/openai/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
67
|
+
| `fastrouter/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
68
|
+
| `fastrouter/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
69
|
+
| `fastrouter/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
70
|
+
| `fastrouter/openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
|
|
71
|
+
| `fastrouter/openai/gpt-image-2` | 128K | | | | | | — | — |
|
|
47
72
|
| `fastrouter/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
48
73
|
| `fastrouter/openai/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.20 |
|
|
74
|
+
| `fastrouter/openai/gpt-realtime-1.5` | 32K | | | | | | $4 | $16 |
|
|
49
75
|
| `fastrouter/qwen/qwen3-coder` | 262K | | | | | | $0.30 | $1 |
|
|
76
|
+
| `fastrouter/sarvam/sarvam-105b` | 131K | | | | | | $0.04 | $0.16 |
|
|
77
|
+
| `fastrouter/sarvam/sarvam-30b` | 128K | | | | | | $0.02 | $0.10 |
|
|
78
|
+
| `fastrouter/wanx/wan-v2-6` | 400K | | | | | | — | — |
|
|
50
79
|
| `fastrouter/x-ai/grok-4` | 256K | | | | | | $3 | $15 |
|
|
80
|
+
| `fastrouter/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
81
|
+
| `fastrouter/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
51
82
|
| `fastrouter/z-ai/glm-5` | 205K | | | | | | $0.95 | $3 |
|
|
83
|
+
| `fastrouter/z-ai/glm-5.1` | 200K | | | | | | $1 | $4 |
|
|
52
84
|
|
|
53
85
|
## Advanced configuration
|
|
54
86
|
|
|
@@ -78,7 +110,7 @@ const agent = new Agent({
|
|
|
78
110
|
model: ({ requestContext }) => {
|
|
79
111
|
const useAdvanced = requestContext.task === "complex";
|
|
80
112
|
return useAdvanced
|
|
81
|
-
? "fastrouter/z-ai/glm-5"
|
|
113
|
+
? "fastrouter/z-ai/glm-5.1"
|
|
82
114
|
: "fastrouter/anthropic/claude-opus-4.1";
|
|
83
115
|
}
|
|
84
116
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fireworks AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 15 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-v4-flash"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -32,28 +32,23 @@ 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/
|
|
42
|
-
| `fireworks-ai/accounts/fireworks/models/
|
|
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/
|
|
49
|
-
| `fireworks-ai/accounts/fireworks/
|
|
50
|
-
| `fireworks-ai/accounts/fireworks/
|
|
51
|
-
| `fireworks-ai/accounts/fireworks/
|
|
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/minimax-m2p7` | 197K | | | | | | $0.30 | $1 |
|
|
55
|
-
| `fireworks-ai/accounts/fireworks/models/qwen3p6-plus` | 128K | | | | | | $0.50 | $3 |
|
|
56
|
-
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo` | 256K | | | | | | — | — |
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `fireworks-ai/accounts/fireworks/models/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
38
|
+
| `fireworks-ai/accounts/fireworks/models/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
39
|
+
| `fireworks-ai/accounts/fireworks/models/glm-5p1` | 203K | | | | | | $1 | $4 |
|
|
40
|
+
| `fireworks-ai/accounts/fireworks/models/glm-5p2` | 1.0M | | | | | | $1 | $4 |
|
|
41
|
+
| `fireworks-ai/accounts/fireworks/models/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
42
|
+
| `fireworks-ai/accounts/fireworks/models/gpt-oss-20b` | 131K | | | | | | $0.07 | $0.30 |
|
|
43
|
+
| `fireworks-ai/accounts/fireworks/models/kimi-k2p6` | 262K | | | | | | $0.95 | $4 |
|
|
44
|
+
| `fireworks-ai/accounts/fireworks/models/kimi-k2p7-code` | 262K | | | | | | $0.95 | $4 |
|
|
45
|
+
| `fireworks-ai/accounts/fireworks/models/minimax-m2p7` | 197K | | | | | | $0.30 | $1 |
|
|
46
|
+
| `fireworks-ai/accounts/fireworks/models/minimax-m3` | 512K | | | | | | $0.30 | $1 |
|
|
47
|
+
| `fireworks-ai/accounts/fireworks/models/qwen3p7-plus` | 262K | | | | | | $0.40 | $2 |
|
|
48
|
+
| `fireworks-ai/accounts/fireworks/routers/glm-5p1-fast` | 203K | | | | | | $3 | $9 |
|
|
49
|
+
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p6-fast` | 262K | | | | | | $2 | $8 |
|
|
50
|
+
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p6-turbo` | 262K | | | | | | $2 | $8 |
|
|
51
|
+
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p7-code-fast` | 262K | | | | | | $2 | $8 |
|
|
57
52
|
|
|
58
53
|
## Advanced configuration
|
|
59
54
|
|
|
@@ -65,7 +60,7 @@ const agent = new Agent({
|
|
|
65
60
|
name: "custom-agent",
|
|
66
61
|
model: {
|
|
67
62
|
url: "https://api.fireworks.ai/inference/v1/",
|
|
68
|
-
id: "fireworks-ai/accounts/fireworks/models/deepseek-
|
|
63
|
+
id: "fireworks-ai/accounts/fireworks/models/deepseek-v4-flash",
|
|
69
64
|
apiKey: process.env.FIREWORKS_API_KEY,
|
|
70
65
|
headers: {
|
|
71
66
|
"X-Custom-Header": "value"
|
|
@@ -83,8 +78,8 @@ const agent = new Agent({
|
|
|
83
78
|
model: ({ requestContext }) => {
|
|
84
79
|
const useAdvanced = requestContext.task === "complex";
|
|
85
80
|
return useAdvanced
|
|
86
|
-
? "fireworks-ai/accounts/fireworks/routers/kimi-
|
|
87
|
-
: "fireworks-ai/accounts/fireworks/models/deepseek-
|
|
81
|
+
? "fireworks-ai/accounts/fireworks/routers/kimi-k2p7-code-fast"
|
|
82
|
+
: "fireworks-ai/accounts/fireworks/models/deepseek-v4-flash";
|
|
88
83
|
}
|
|
89
84
|
});
|
|
90
85
|
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# FreeModel
|
|
2
|
+
|
|
3
|
+
Access 10 FreeModel models through Mastra's model router. Authentication is handled automatically using the `FREEMODEL_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [FreeModel documentation](https://freemodel.dev).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
FREEMODEL_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: "freemodel/claude-fable-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 [FreeModel documentation](https://freemodel.dev) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `freemodel/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
38
|
+
| `freemodel/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
|
|
39
|
+
| `freemodel/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
40
|
+
| `freemodel/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
|
|
41
|
+
| `freemodel/claude-opus-4-8` | 1.0M | | | | | | $5 | $25 |
|
|
42
|
+
| `freemodel/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
43
|
+
| `freemodel/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
44
|
+
| `freemodel/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
|
|
45
|
+
| `freemodel/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
46
|
+
| `freemodel/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
47
|
+
|
|
48
|
+
## Advanced configuration
|
|
49
|
+
|
|
50
|
+
### Custom headers
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const agent = new Agent({
|
|
54
|
+
id: "custom-agent",
|
|
55
|
+
name: "custom-agent",
|
|
56
|
+
model: {
|
|
57
|
+
url: "https://cc.freemodel.dev/v1",
|
|
58
|
+
id: "freemodel/claude-fable-5",
|
|
59
|
+
apiKey: process.env.FREEMODEL_API_KEY,
|
|
60
|
+
headers: {
|
|
61
|
+
"X-Custom-Header": "value"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Dynamic model selection
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
const agent = new Agent({
|
|
71
|
+
id: "dynamic-agent",
|
|
72
|
+
name: "Dynamic Agent",
|
|
73
|
+
model: ({ requestContext }) => {
|
|
74
|
+
const useAdvanced = requestContext.task === "complex";
|
|
75
|
+
return useAdvanced
|
|
76
|
+
? "freemodel/gpt-5.5"
|
|
77
|
+
: "freemodel/claude-fable-5";
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Direct provider installation
|
|
83
|
+
|
|
84
|
+
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/@ai-sdk/anthropic) for more details.
|
|
85
|
+
|
|
86
|
+
**npm**:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm install @ai-sdk/anthropic
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**pnpm**:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pnpm add @ai-sdk/anthropic
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Yarn**:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
yarn add @ai-sdk/anthropic
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Bun**:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
bun add @ai-sdk/anthropic
|
|
108
|
+
```
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Google
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 18 Google models through Mastra's model router. Authentication is handled automatically using one of the following environment variables: `GOOGLE_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Google documentation](https://ai.google.dev/gemini-api/docs/models).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
GOOGLE_API_KEY=your-api-key
|
|
9
|
+
GOOGLE_GENERATIVE_AI_API_KEY=your-api-key
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
```typescript
|
|
@@ -15,7 +16,7 @@ const agent = new Agent({
|
|
|
15
16
|
id: "my-agent",
|
|
16
17
|
name: "My Agent",
|
|
17
18
|
instructions: "You are a helpful assistant",
|
|
18
|
-
model: "google/gemini-2.
|
|
19
|
+
model: "google/gemini-2.5-flash"
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
// Generate a response
|
|
@@ -32,8 +33,6 @@ for await (const chunk of stream) {
|
|
|
32
33
|
|
|
33
34
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
34
35
|
| ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
35
|
-
| `google/gemini-2.0-flash` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
36
|
-
| `google/gemini-2.0-flash-lite` | 1.0M | | | | | | $0.07 | $0.30 |
|
|
37
36
|
| `google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
38
37
|
| `google/gemini-2.5-flash-image` | 33K | | | | | | $0.30 | $30 |
|
|
39
38
|
| `google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
@@ -41,10 +40,9 @@ for await (const chunk of stream) {
|
|
|
41
40
|
| `google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
42
41
|
| `google/gemini-2.5-pro-preview-tts` | 8K | | | | | | $1 | $20 |
|
|
43
42
|
| `google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
44
|
-
| `google/gemini-3-pro-preview`
|
|
43
|
+
| `google/gemini-3-pro-image-preview` | 131K | | | | | | $2 | $120 |
|
|
45
44
|
| `google/gemini-3.1-flash-image-preview` | 66K | | | | | | $0.50 | $60 |
|
|
46
45
|
| `google/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
|
|
47
|
-
| `google/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
|
|
48
46
|
| `google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
49
47
|
| `google/gemini-3.1-pro-preview-customtools` | 1.0M | | | | | | $2 | $12 |
|
|
50
48
|
| `google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
|
|
@@ -63,8 +61,8 @@ const agent = new Agent({
|
|
|
63
61
|
id: "custom-agent",
|
|
64
62
|
name: "custom-agent",
|
|
65
63
|
model: {
|
|
66
|
-
id: "google/gemini-2.
|
|
67
|
-
apiKey: process.env.GOOGLE_API_KEY,
|
|
64
|
+
id: "google/gemini-2.5-flash",
|
|
65
|
+
apiKey: process.env.GOOGLE_API_KEY,GOOGLE_GENERATIVE_AI_API_KEY,
|
|
68
66
|
headers: {
|
|
69
67
|
"X-Custom-Header": "value"
|
|
70
68
|
}
|
|
@@ -82,7 +80,7 @@ const agent = new Agent({
|
|
|
82
80
|
const useAdvanced = requestContext.task === "complex";
|
|
83
81
|
return useAdvanced
|
|
84
82
|
? "google/gemma-4-31b-it"
|
|
85
|
-
: "google/gemini-2.
|
|
83
|
+
: "google/gemini-2.5-flash";
|
|
86
84
|
}
|
|
87
85
|
});
|
|
88
86
|
```
|