@mastra/mcp-docs-server 1.1.2-alpha.0 → 1.1.3-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/processors.md +52 -0
- package/.docs/docs/observability/datasets/overview.md +188 -0
- package/.docs/docs/observability/datasets/running-experiments.md +266 -0
- package/.docs/docs/observability/tracing/exporters/cloud.md +7 -4
- package/.docs/docs/server/server-adapters.md +5 -4
- package/.docs/guides/deployment/amazon-ec2.md +47 -24
- package/.docs/guides/deployment/netlify.md +5 -5
- package/.docs/guides/deployment/vercel.md +3 -3
- package/.docs/guides/getting-started/next-js.md +4 -4
- package/.docs/models/gateways/openrouter.md +5 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +3 -1
- package/.docs/models/providers/alibaba.md +3 -1
- package/.docs/models/providers/cerebras.md +1 -1
- package/.docs/models/providers/chutes.md +7 -4
- package/.docs/models/providers/cloudflare-ai-gateway.md +17 -119
- package/.docs/models/providers/fireworks-ai.md +2 -1
- package/.docs/models/providers/firmware.md +2 -7
- package/.docs/models/providers/huggingface.md +4 -1
- package/.docs/models/providers/kilo.md +333 -0
- package/.docs/models/providers/kuae-cloud-coding-plan.md +71 -0
- package/.docs/models/providers/minimax-cn-coding-plan.md +8 -7
- package/.docs/models/providers/minimax-cn.md +8 -7
- package/.docs/models/providers/minimax-coding-plan.md +8 -7
- package/.docs/models/providers/minimax.md +8 -7
- package/.docs/models/providers/nano-gpt.md +5 -1
- package/.docs/models/providers/nebius.md +2 -2
- package/.docs/models/providers/novita-ai.md +2 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/opencode.md +4 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +3 -8
- package/.docs/models/providers/siliconflow.md +4 -9
- package/.docs/models/providers/stepfun.md +73 -0
- package/.docs/models/providers/togetherai.md +7 -5
- package/.docs/models/providers/vivgrid.md +7 -4
- package/.docs/models/providers/zai-coding-plan.md +13 -12
- package/.docs/models/providers/zenmux.md +5 -2
- package/.docs/models/providers.md +3 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/configuration.md +3 -4
- package/.docs/reference/datasets/addItem.md +35 -0
- package/.docs/reference/datasets/addItems.md +33 -0
- package/.docs/reference/datasets/compareExperiments.md +48 -0
- package/.docs/reference/datasets/create.md +49 -0
- package/.docs/reference/datasets/dataset.md +78 -0
- package/.docs/reference/datasets/datasets-manager.md +84 -0
- package/.docs/reference/datasets/delete.md +23 -0
- package/.docs/reference/datasets/deleteExperiment.md +25 -0
- package/.docs/reference/datasets/deleteItem.md +25 -0
- package/.docs/reference/datasets/deleteItems.md +27 -0
- package/.docs/reference/datasets/get.md +29 -0
- package/.docs/reference/datasets/getDetails.md +45 -0
- package/.docs/reference/datasets/getExperiment.md +28 -0
- package/.docs/reference/datasets/getItem.md +31 -0
- package/.docs/reference/datasets/getItemHistory.md +29 -0
- package/.docs/reference/datasets/list.md +29 -0
- package/.docs/reference/datasets/listExperimentResults.md +37 -0
- package/.docs/reference/datasets/listExperiments.md +31 -0
- package/.docs/reference/datasets/listItems.md +44 -0
- package/.docs/reference/datasets/listVersions.md +31 -0
- package/.docs/reference/datasets/startExperiment.md +60 -0
- package/.docs/reference/datasets/startExperimentAsync.md +41 -0
- package/.docs/reference/datasets/update.md +46 -0
- package/.docs/reference/datasets/updateItem.md +36 -0
- package/.docs/reference/index.md +24 -0
- package/.docs/reference/memory/observational-memory.md +36 -0
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +1 -1
- package/.docs/reference/processors/processor-interface.md +4 -0
- package/.docs/reference/server/koa-adapter.md +38 -0
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/tools/create-tool.md +1 -1
- package/.docs/reference/workspace/e2b-sandbox.md +0 -11
- package/CHANGELOG.md +14 -0
- package/package.json +6 -6
|
@@ -48,7 +48,7 @@ for await (const chunk of stream) {
|
|
|
48
48
|
| `nebius/google/gemma-3-27b-it` | 128K | | | | | | $0.10 | $0.30 |
|
|
49
49
|
| `nebius/google/gemma-3-27b-it-fast` | 128K | | | | | | $0.20 | $0.60 |
|
|
50
50
|
| `nebius/intfloat/e5-mistral-7b-instruct` | 33K | | | | | | $0.01 | — |
|
|
51
|
-
| `nebius/meta-llama/
|
|
51
|
+
| `nebius/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.13 | $0.40 |
|
|
52
52
|
| `nebius/meta-llama/llama-3.3-70b-instruct-fast` | 128K | | | | | | $0.25 | $0.75 |
|
|
53
53
|
| `nebius/meta-llama/llama-guard-3-8b` | 8K | | | | | | $0.02 | $0.06 |
|
|
54
54
|
| `nebius/meta-llama/meta-llama-3.1-8b-instruct` | 128K | | | | | | $0.02 | $0.06 |
|
|
@@ -56,6 +56,7 @@ for await (const chunk of stream) {
|
|
|
56
56
|
| `nebius/MiniMaxAI/minimax-m2.1` | 128K | | | | | | $0.30 | $1 |
|
|
57
57
|
| `nebius/moonshotai/kimi-k2-instruct` | 200K | | | | | | $0.50 | $2 |
|
|
58
58
|
| `nebius/moonshotai/kimi-k2-thinking` | 128K | | | | | | $0.60 | $3 |
|
|
59
|
+
| `nebius/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
|
|
59
60
|
| `nebius/NousResearch/hermes-4-405b` | 128K | | | | | | $1 | $3 |
|
|
60
61
|
| `nebius/NousResearch/hermes-4-70b` | 128K | | | | | | $0.13 | $0.40 |
|
|
61
62
|
| `nebius/nvidia/llama-3_1-nemotron-ultra-253b-v1` | 128K | | | | | | $0.60 | $2 |
|
|
@@ -78,7 +79,6 @@ for await (const chunk of stream) {
|
|
|
78
79
|
| `nebius/qwen/qwen3-next-80b-a3b-thinking` | 128K | | | | | | $0.15 | $1 |
|
|
79
80
|
| `nebius/zai-org/glm-4.5` | 128K | | | | | | $0.60 | $2 |
|
|
80
81
|
| `nebius/zai-org/glm-4.5-air` | 128K | | | | | | $0.20 | $1 |
|
|
81
|
-
| `nebius/zai-org/glm-4.7` | 131K | | | | | | $0.40 | $2 |
|
|
82
82
|
| `nebius/zai-org/glm-4.7-fp8` | 128K | | | | | | $0.40 | $2 |
|
|
83
83
|
|
|
84
84
|
## Advanced Configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NovitaAI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 84 NovitaAI models through Mastra's model router. Authentication is handled automatically using the `NOVITA_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [NovitaAI documentation](https://novita.ai/docs/guides/introduction).
|
|
6
6
|
|
|
@@ -102,6 +102,7 @@ for await (const chunk of stream) {
|
|
|
102
102
|
| `novita-ai/qwen/qwen3-vl-30b-a3b-instruct` | 131K | | | | | | $0.20 | $0.70 |
|
|
103
103
|
| `novita-ai/qwen/qwen3-vl-30b-a3b-thinking` | 131K | | | | | | $0.20 | $1 |
|
|
104
104
|
| `novita-ai/qwen/qwen3-vl-8b-instruct` | 131K | | | | | | $0.08 | $0.50 |
|
|
105
|
+
| `novita-ai/qwen/qwen3.5-397b-a17b` | 262K | | | | | | $0.60 | $4 |
|
|
105
106
|
| `novita-ai/sao10k/l3-70b-euryale-v2.1` | 8K | | | | | | $1 | $1 |
|
|
106
107
|
| `novita-ai/sao10k/l3-8b-lunaris` | 8K | | | | | | $0.05 | $0.05 |
|
|
107
108
|
| `novita-ai/sao10k/L3-8B-Stheno-v3.2` | 8K | | | | | | $0.05 | $0.05 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Nvidia
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 71 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Nvidia documentation](https://docs.api.nvidia.com/nim/).
|
|
6
6
|
|
|
@@ -104,6 +104,7 @@ for await (const chunk of stream) {
|
|
|
104
104
|
| `nvidia/qwen/qwen3-next-80b-a3b-thinking` | 262K | | | | | | — | — |
|
|
105
105
|
| `nvidia/qwen/qwq-32b` | 128K | | | | | | — | — |
|
|
106
106
|
| `nvidia/z-ai/glm4.7` | 205K | | | | | | — | — |
|
|
107
|
+
| `nvidia/z-ai/glm5` | 203K | | | | | | — | — |
|
|
107
108
|
|
|
108
109
|
## Advanced Configuration
|
|
109
110
|
|
|
@@ -133,7 +134,7 @@ const agent = new Agent({
|
|
|
133
134
|
model: ({ requestContext }) => {
|
|
134
135
|
const useAdvanced = requestContext.task === "complex";
|
|
135
136
|
return useAdvanced
|
|
136
|
-
? "nvidia/z-ai/
|
|
137
|
+
? "nvidia/z-ai/glm5"
|
|
137
138
|
: "nvidia/black-forest-labs/flux.1-dev";
|
|
138
139
|
}
|
|
139
140
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ollama Cloud
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 33 Ollama Cloud models through Mastra's model router. Authentication is handled automatically using the `OLLAMA_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Ollama Cloud documentation](https://docs.ollama.com/cloud).
|
|
6
6
|
|
|
@@ -65,6 +65,7 @@ for await (const chunk of stream) {
|
|
|
65
65
|
| `ollama-cloud/qwen3-next:80b` | 262K | | | | | | — | — |
|
|
66
66
|
| `ollama-cloud/qwen3-vl:235b` | 262K | | | | | | — | — |
|
|
67
67
|
| `ollama-cloud/qwen3-vl:235b-instruct` | 262K | | | | | | — | — |
|
|
68
|
+
| `ollama-cloud/qwen3.5:397b` | 262K | | | | | | — | — |
|
|
68
69
|
| `ollama-cloud/rnj-1:8b` | 33K | | | | | | — | — |
|
|
69
70
|
|
|
70
71
|
## Advanced Configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenCode Zen
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 30 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
6
6
|
|
|
@@ -46,6 +46,8 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `opencode/gemini-3-pro` | 1.0M | | | | | | $2 | $12 |
|
|
47
47
|
| `opencode/glm-4.6` | 205K | | | | | | $0.60 | $2 |
|
|
48
48
|
| `opencode/glm-4.7` | 205K | | | | | | $0.60 | $2 |
|
|
49
|
+
| `opencode/glm-5` | 205K | | | | | | $1 | $3 |
|
|
50
|
+
| `opencode/glm-5-free` | 205K | | | | | | — | — |
|
|
49
51
|
| `opencode/gpt-5` | 400K | | | | | | $1 | $9 |
|
|
50
52
|
| `opencode/gpt-5-codex` | 400K | | | | | | $1 | $9 |
|
|
51
53
|
| `opencode/gpt-5-nano` | 400K | | | | | | — | — |
|
|
@@ -60,6 +62,7 @@ for await (const chunk of stream) {
|
|
|
60
62
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
61
63
|
| `opencode/kimi-k2.5-free` | 262K | | | | | | — | — |
|
|
62
64
|
| `opencode/minimax-m2.1` | 205K | | | | | | $0.30 | $1 |
|
|
65
|
+
| `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
63
66
|
| `opencode/minimax-m2.5-free` | 205K | | | | | | — | — |
|
|
64
67
|
|
|
65
68
|
## Advanced Configuration
|
|
@@ -38,9 +38,9 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| `poe/anthropic/claude-haiku-3.5` | 189K | | | | | | $0.68 | $3 |
|
|
39
39
|
| `poe/anthropic/claude-haiku-4.5` | 192K | | | | | | $0.85 | $4 |
|
|
40
40
|
| `poe/anthropic/claude-opus-4` | 193K | | | | | | $13 | $64 |
|
|
41
|
-
| `poe/anthropic/claude-opus-4-6` | 983K | | | | | | $4 | $21 |
|
|
42
41
|
| `poe/anthropic/claude-opus-4.1` | 197K | | | | | | $13 | $64 |
|
|
43
42
|
| `poe/anthropic/claude-opus-4.5` | 197K | | | | | | $4 | $21 |
|
|
43
|
+
| `poe/anthropic/claude-opus-4.6` | 983K | | | | | | $4 | $21 |
|
|
44
44
|
| `poe/anthropic/claude-sonnet-3.5` | 189K | | | | | | $3 | $13 |
|
|
45
45
|
| `poe/anthropic/claude-sonnet-3.5-june` | 189K | | | | | | $3 | $13 |
|
|
46
46
|
| `poe/anthropic/claude-sonnet-3.7` | 197K | | | | | | $3 | $13 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SiliconFlow (China)
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 68 SiliconFlow (China) models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_CN_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [SiliconFlow (China) documentation](https://cloud.siliconflow.com/models).
|
|
6
6
|
|
|
@@ -40,7 +40,6 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `siliconflow-cn/deepseek-ai/DeepSeek-R1` | 164K | | | | | | $0.50 | $2 |
|
|
41
41
|
| `siliconflow-cn/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B` | 131K | | | | | | $0.10 | $0.10 |
|
|
42
42
|
| `siliconflow-cn/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B` | 131K | | | | | | $0.18 | $0.18 |
|
|
43
|
-
| `siliconflow-cn/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B` | 33K | | | | | | $0.05 | $0.05 |
|
|
44
43
|
| `siliconflow-cn/deepseek-ai/DeepSeek-V3` | 164K | | | | | | $0.25 | $1 |
|
|
45
44
|
| `siliconflow-cn/deepseek-ai/DeepSeek-V3.1-Terminus` | 164K | | | | | | $0.27 | $1 |
|
|
46
45
|
| `siliconflow-cn/deepseek-ai/DeepSeek-V3.2` | 164K | | | | | | $0.27 | $0.42 |
|
|
@@ -49,9 +48,6 @@ for await (const chunk of stream) {
|
|
|
49
48
|
| `siliconflow-cn/inclusionAI/Ling-mini-2.0` | 131K | | | | | | $0.07 | $0.28 |
|
|
50
49
|
| `siliconflow-cn/inclusionAI/Ring-flash-2.0` | 131K | | | | | | $0.14 | $0.57 |
|
|
51
50
|
| `siliconflow-cn/Kwaipilot/KAT-Dev` | 128K | | | | | | $0.20 | $0.60 |
|
|
52
|
-
| `siliconflow-cn/MiniMaxAI/MiniMax-M1-80k` | 131K | | | | | | $0.55 | $2 |
|
|
53
|
-
| `siliconflow-cn/MiniMaxAI/MiniMax-M2` | 197K | | | | | | $0.30 | $1 |
|
|
54
|
-
| `siliconflow-cn/moonshotai/Kimi-Dev-72B` | 131K | | | | | | $0.29 | $1 |
|
|
55
51
|
| `siliconflow-cn/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
|
|
56
52
|
| `siliconflow-cn/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
|
|
57
53
|
| `siliconflow-cn/Pro/deepseek-ai/DeepSeek-R1` | 164K | | | | | | $0.50 | $2 |
|
|
@@ -63,6 +59,7 @@ for await (const chunk of stream) {
|
|
|
63
59
|
| `siliconflow-cn/Pro/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
|
|
64
60
|
| `siliconflow-cn/Pro/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.55 | $3 |
|
|
65
61
|
| `siliconflow-cn/Pro/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
|
|
62
|
+
| `siliconflow-cn/Pro/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
|
|
66
63
|
| `siliconflow-cn/Qwen/Qwen2.5-14B-Instruct` | 33K | | | | | | $0.10 | $0.10 |
|
|
67
64
|
| `siliconflow-cn/Qwen/Qwen2.5-32B-Instruct` | 33K | | | | | | $0.18 | $0.18 |
|
|
68
65
|
| `siliconflow-cn/Qwen/Qwen2.5-72B-Instruct` | 33K | | | | | | $0.59 | $0.59 |
|
|
@@ -74,7 +71,6 @@ for await (const chunk of stream) {
|
|
|
74
71
|
| `siliconflow-cn/Qwen/Qwen3-14B` | 131K | | | | | | $0.07 | $0.28 |
|
|
75
72
|
| `siliconflow-cn/Qwen/Qwen3-235B-A22B-Instruct-2507` | 262K | | | | | | $0.09 | $0.60 |
|
|
76
73
|
| `siliconflow-cn/Qwen/Qwen3-235B-A22B-Thinking-2507` | 262K | | | | | | $0.13 | $0.60 |
|
|
77
|
-
| `siliconflow-cn/Qwen/Qwen3-30B-A3B` | 131K | | | | | | $0.09 | $0.45 |
|
|
78
74
|
| `siliconflow-cn/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.09 | $0.30 |
|
|
79
75
|
| `siliconflow-cn/Qwen/Qwen3-30B-A3B-Thinking-2507` | 262K | | | | | | $0.09 | $0.30 |
|
|
80
76
|
| `siliconflow-cn/Qwen/Qwen3-32B` | 131K | | | | | | $0.14 | $0.57 |
|
|
@@ -95,12 +91,11 @@ for await (const chunk of stream) {
|
|
|
95
91
|
| `siliconflow-cn/Qwen/Qwen3-VL-8B-Instruct` | 262K | | | | | | $0.18 | $0.68 |
|
|
96
92
|
| `siliconflow-cn/Qwen/Qwen3-VL-8B-Thinking` | 262K | | | | | | $0.18 | $2 |
|
|
97
93
|
| `siliconflow-cn/Qwen/QwQ-32B` | 131K | | | | | | $0.15 | $0.58 |
|
|
98
|
-
| `siliconflow-cn/stepfun-ai/
|
|
94
|
+
| `siliconflow-cn/stepfun-ai/Step-3.5-Flash` | 262K | | | | | | $0.10 | $0.30 |
|
|
99
95
|
| `siliconflow-cn/tencent/Hunyuan-A13B-Instruct` | 131K | | | | | | $0.14 | $0.57 |
|
|
100
96
|
| `siliconflow-cn/tencent/Hunyuan-MT-7B` | 33K | | | | | | — | — |
|
|
101
97
|
| `siliconflow-cn/THUDM/GLM-4-32B-0414` | 33K | | | | | | $0.27 | $0.27 |
|
|
102
98
|
| `siliconflow-cn/THUDM/GLM-4-9B-0414` | 33K | | | | | | $0.09 | $0.09 |
|
|
103
|
-
| `siliconflow-cn/THUDM/GLM-4.1V-9B-Thinking` | 66K | | | | | | $0.04 | $0.14 |
|
|
104
99
|
| `siliconflow-cn/THUDM/GLM-Z1-32B-0414` | 131K | | | | | | $0.14 | $0.57 |
|
|
105
100
|
| `siliconflow-cn/THUDM/GLM-Z1-9B-0414` | 131K | | | | | | $0.09 | $0.09 |
|
|
106
101
|
| `siliconflow-cn/zai-org/GLM-4.5-Air` | 131K | | | | | | $0.14 | $0.86 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SiliconFlow
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 70 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [SiliconFlow documentation](https://cloud.siliconflow.com/models).
|
|
6
6
|
|
|
@@ -39,7 +39,6 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `siliconflow/deepseek-ai/DeepSeek-R1` | 164K | | | | | | $0.50 | $2 |
|
|
40
40
|
| `siliconflow/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B` | 131K | | | | | | $0.10 | $0.10 |
|
|
41
41
|
| `siliconflow/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B` | 131K | | | | | | $0.18 | $0.18 |
|
|
42
|
-
| `siliconflow/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B` | 33K | | | | | | $0.05 | $0.05 |
|
|
43
42
|
| `siliconflow/deepseek-ai/DeepSeek-V3` | 164K | | | | | | $0.25 | $1 |
|
|
44
43
|
| `siliconflow/deepseek-ai/DeepSeek-V3.1` | 164K | | | | | | $0.27 | $1 |
|
|
45
44
|
| `siliconflow/deepseek-ai/DeepSeek-V3.1-Terminus` | 164K | | | | | | $0.27 | $1 |
|
|
@@ -50,10 +49,7 @@ for await (const chunk of stream) {
|
|
|
50
49
|
| `siliconflow/inclusionAI/Ling-mini-2.0` | 131K | | | | | | $0.07 | $0.28 |
|
|
51
50
|
| `siliconflow/inclusionAI/Ring-flash-2.0` | 131K | | | | | | $0.14 | $0.57 |
|
|
52
51
|
| `siliconflow/meta-llama/Meta-Llama-3.1-8B-Instruct` | 33K | | | | | | $0.06 | $0.06 |
|
|
53
|
-
| `siliconflow/MiniMaxAI/MiniMax-M1-80k` | 131K | | | | | | $0.55 | $2 |
|
|
54
|
-
| `siliconflow/MiniMaxAI/MiniMax-M2` | 197K | | | | | | $0.30 | $1 |
|
|
55
52
|
| `siliconflow/MiniMaxAI/MiniMax-M2.1` | 197K | | | | | | $0.30 | $1 |
|
|
56
|
-
| `siliconflow/moonshotai/Kimi-Dev-72B` | 131K | | | | | | $0.29 | $1 |
|
|
57
53
|
| `siliconflow/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $0.58 | $2 |
|
|
58
54
|
| `siliconflow/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
|
|
59
55
|
| `siliconflow/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
|
|
@@ -74,7 +70,6 @@ for await (const chunk of stream) {
|
|
|
74
70
|
| `siliconflow/Qwen/Qwen3-235B-A22B` | 131K | | | | | | $0.35 | $1 |
|
|
75
71
|
| `siliconflow/Qwen/Qwen3-235B-A22B-Instruct-2507` | 262K | | | | | | $0.09 | $0.60 |
|
|
76
72
|
| `siliconflow/Qwen/Qwen3-235B-A22B-Thinking-2507` | 262K | | | | | | $0.13 | $0.60 |
|
|
77
|
-
| `siliconflow/Qwen/Qwen3-30B-A3B` | 131K | | | | | | $0.09 | $0.45 |
|
|
78
73
|
| `siliconflow/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.09 | $0.30 |
|
|
79
74
|
| `siliconflow/Qwen/Qwen3-30B-A3B-Thinking-2507` | 262K | | | | | | $0.09 | $0.30 |
|
|
80
75
|
| `siliconflow/Qwen/Qwen3-32B` | 131K | | | | | | $0.14 | $0.57 |
|
|
@@ -95,12 +90,11 @@ for await (const chunk of stream) {
|
|
|
95
90
|
| `siliconflow/Qwen/Qwen3-VL-8B-Instruct` | 262K | | | | | | $0.18 | $0.68 |
|
|
96
91
|
| `siliconflow/Qwen/Qwen3-VL-8B-Thinking` | 262K | | | | | | $0.18 | $2 |
|
|
97
92
|
| `siliconflow/Qwen/QwQ-32B` | 131K | | | | | | $0.15 | $0.58 |
|
|
98
|
-
| `siliconflow/stepfun-ai/
|
|
93
|
+
| `siliconflow/stepfun-ai/Step-3.5-Flash` | 262K | | | | | | $0.10 | $0.30 |
|
|
99
94
|
| `siliconflow/tencent/Hunyuan-A13B-Instruct` | 131K | | | | | | $0.14 | $0.57 |
|
|
100
95
|
| `siliconflow/tencent/Hunyuan-MT-7B` | 33K | | | | | | — | — |
|
|
101
96
|
| `siliconflow/THUDM/GLM-4-32B-0414` | 33K | | | | | | $0.27 | $0.27 |
|
|
102
97
|
| `siliconflow/THUDM/GLM-4-9B-0414` | 33K | | | | | | $0.09 | $0.09 |
|
|
103
|
-
| `siliconflow/THUDM/GLM-4.1V-9B-Thinking` | 66K | | | | | | $0.04 | $0.14 |
|
|
104
98
|
| `siliconflow/THUDM/GLM-Z1-32B-0414` | 131K | | | | | | $0.14 | $0.57 |
|
|
105
99
|
| `siliconflow/THUDM/GLM-Z1-9B-0414` | 131K | | | | | | $0.09 | $0.09 |
|
|
106
100
|
| `siliconflow/zai-org/GLM-4.5` | 131K | | | | | | $0.40 | $2 |
|
|
@@ -109,6 +103,7 @@ for await (const chunk of stream) {
|
|
|
109
103
|
| `siliconflow/zai-org/GLM-4.6` | 205K | | | | | | $0.50 | $2 |
|
|
110
104
|
| `siliconflow/zai-org/GLM-4.6V` | 131K | | | | | | $0.30 | $0.90 |
|
|
111
105
|
| `siliconflow/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
|
|
106
|
+
| `siliconflow/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
|
|
112
107
|
|
|
113
108
|
## Advanced Configuration
|
|
114
109
|
|
|
@@ -138,7 +133,7 @@ const agent = new Agent({
|
|
|
138
133
|
model: ({ requestContext }) => {
|
|
139
134
|
const useAdvanced = requestContext.task === "complex";
|
|
140
135
|
return useAdvanced
|
|
141
|
-
? "siliconflow/zai-org/GLM-
|
|
136
|
+
? "siliconflow/zai-org/GLM-5"
|
|
142
137
|
: "siliconflow/ByteDance-Seed/Seed-OSS-36B-Instruct";
|
|
143
138
|
}
|
|
144
139
|
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# StepFun
|
|
2
|
+
|
|
3
|
+
Access 3 StepFun models through Mastra's model router. Authentication is handled automatically using the `STEPFUN_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [StepFun documentation](https://platform.stepfun.com/docs/zh/overview/concept).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
STEPFUN_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: "stepfun/step-1-32k"
|
|
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 [StepFun documentation](https://platform.stepfun.com/docs/zh/overview/concept) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `stepfun/step-1-32k` | 33K | | | | | | $2 | $10 |
|
|
38
|
+
| `stepfun/step-2-16k` | 16K | | | | | | $5 | $16 |
|
|
39
|
+
| `stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.29 |
|
|
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.stepfun.com/v1",
|
|
51
|
+
id: "stepfun/step-1-32k",
|
|
52
|
+
apiKey: process.env.STEPFUN_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
|
+
? "stepfun/step-3.5-flash"
|
|
70
|
+
: "stepfun/step-1-32k";
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Together AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 18 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-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: "togetherai/
|
|
18
|
+
model: "togetherai/MiniMaxAI/MiniMax-M2.5"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -37,6 +37,7 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| `togetherai/deepseek-ai/DeepSeek-V3-1` | 131K | | | | | | $0.60 | $2 |
|
|
38
38
|
| `togetherai/essentialai/Rnj-1-Instruct` | 33K | | | | | | $0.15 | $0.15 |
|
|
39
39
|
| `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $0.88 | $0.88 |
|
|
40
|
+
| `togetherai/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
|
|
40
41
|
| `togetherai/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $1 | $3 |
|
|
41
42
|
| `togetherai/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $1 | $3 |
|
|
42
43
|
| `togetherai/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $1 | $4 |
|
|
@@ -48,6 +49,7 @@ for await (const chunk of stream) {
|
|
|
48
49
|
| `togetherai/Qwen/Qwen3-Next-80B-A3B-Instruct` | 262K | | | | | | $0.15 | $2 |
|
|
49
50
|
| `togetherai/zai-org/GLM-4.6` | 200K | | | | | | $0.60 | $2 |
|
|
50
51
|
| `togetherai/zai-org/GLM-4.7` | 200K | | | | | | $0.45 | $2 |
|
|
52
|
+
| `togetherai/zai-org/GLM-5` | 203K | | | | | | $1 | $3 |
|
|
51
53
|
|
|
52
54
|
## Advanced Configuration
|
|
53
55
|
|
|
@@ -58,7 +60,7 @@ const agent = new Agent({
|
|
|
58
60
|
id: "custom-agent",
|
|
59
61
|
name: "custom-agent",
|
|
60
62
|
model: {
|
|
61
|
-
id: "togetherai/
|
|
63
|
+
id: "togetherai/MiniMaxAI/MiniMax-M2.5",
|
|
62
64
|
apiKey: process.env.TOGETHER_API_KEY,
|
|
63
65
|
headers: {
|
|
64
66
|
"X-Custom-Header": "value"
|
|
@@ -76,8 +78,8 @@ const agent = new Agent({
|
|
|
76
78
|
model: ({ requestContext }) => {
|
|
77
79
|
const useAdvanced = requestContext.task === "complex";
|
|
78
80
|
return useAdvanced
|
|
79
|
-
? "togetherai/zai-org/GLM-
|
|
80
|
-
: "togetherai/
|
|
81
|
+
? "togetherai/zai-org/GLM-5"
|
|
82
|
+
: "togetherai/MiniMaxAI/MiniMax-M2.5";
|
|
81
83
|
}
|
|
82
84
|
});
|
|
83
85
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vivgrid
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 8 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Vivgrid documentation](https://docs.vivgrid.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: "vivgrid/
|
|
18
|
+
model: "vivgrid/deepseek-v3.2"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -34,8 +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
|
+
| `vivgrid/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.42 |
|
|
37
38
|
| `vivgrid/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
38
39
|
| `vivgrid/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
40
|
+
| `vivgrid/glm-5` | 203K | | | | | | $1 | $3 |
|
|
41
|
+
| `vivgrid/gpt-5-mini` | 272K | | | | | | $0.25 | $2 |
|
|
39
42
|
| `vivgrid/gpt-5.1-codex` | 400K | | | | | | $1 | $10 |
|
|
40
43
|
| `vivgrid/gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 |
|
|
41
44
|
| `vivgrid/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
|
|
@@ -50,7 +53,7 @@ const agent = new Agent({
|
|
|
50
53
|
name: "custom-agent",
|
|
51
54
|
model: {
|
|
52
55
|
url: "https://api.vivgrid.com/v1",
|
|
53
|
-
id: "vivgrid/
|
|
56
|
+
id: "vivgrid/deepseek-v3.2",
|
|
54
57
|
apiKey: process.env.VIVGRID_API_KEY,
|
|
55
58
|
headers: {
|
|
56
59
|
"X-Custom-Header": "value"
|
|
@@ -69,7 +72,7 @@ const agent = new Agent({
|
|
|
69
72
|
const useAdvanced = requestContext.task === "complex";
|
|
70
73
|
return useAdvanced
|
|
71
74
|
? "vivgrid/gpt-5.2-codex"
|
|
72
|
-
: "vivgrid/
|
|
75
|
+
: "vivgrid/deepseek-v3.2";
|
|
73
76
|
}
|
|
74
77
|
});
|
|
75
78
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Z.AI Coding Plan
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 10 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview).
|
|
6
6
|
|
|
@@ -32,17 +32,18 @@ for await (const chunk of stream) {
|
|
|
32
32
|
|
|
33
33
|
## Models
|
|
34
34
|
|
|
35
|
-
| Model
|
|
36
|
-
|
|
|
37
|
-
| `zai-coding-plan/glm-4.5`
|
|
38
|
-
| `zai-coding-plan/glm-4.5-air`
|
|
39
|
-
| `zai-coding-plan/glm-4.5-flash`
|
|
40
|
-
| `zai-coding-plan/glm-4.5v`
|
|
41
|
-
| `zai-coding-plan/glm-4.6`
|
|
42
|
-
| `zai-coding-plan/glm-4.6v`
|
|
43
|
-
| `zai-coding-plan/glm-4.7`
|
|
44
|
-
| `zai-coding-plan/glm-4.7-flash`
|
|
45
|
-
| `zai-coding-plan/glm-
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `zai-coding-plan/glm-4.5` | 131K | | | | | | — | — |
|
|
38
|
+
| `zai-coding-plan/glm-4.5-air` | 131K | | | | | | — | — |
|
|
39
|
+
| `zai-coding-plan/glm-4.5-flash` | 131K | | | | | | — | — |
|
|
40
|
+
| `zai-coding-plan/glm-4.5v` | 64K | | | | | | — | — |
|
|
41
|
+
| `zai-coding-plan/glm-4.6` | 205K | | | | | | — | — |
|
|
42
|
+
| `zai-coding-plan/glm-4.6v` | 128K | | | | | | — | — |
|
|
43
|
+
| `zai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
|
|
44
|
+
| `zai-coding-plan/glm-4.7-flash` | 200K | | | | | | — | — |
|
|
45
|
+
| `zai-coding-plan/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
|
|
46
|
+
| `zai-coding-plan/glm-5` | 205K | | | | | | — | — |
|
|
46
47
|
|
|
47
48
|
## Advanced Configuration
|
|
48
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ZenMux
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 63 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [ZenMux documentation](https://docs.zenmux.ai).
|
|
6
6
|
|
|
@@ -59,6 +59,8 @@ for await (const chunk of stream) {
|
|
|
59
59
|
| `zenmux/kuaishou/kat-coder-pro-v1-free` | 256K | | | | | | — | — |
|
|
60
60
|
| `zenmux/minimax/minimax-m2` | 204K | | | | | | $0.30 | $1 |
|
|
61
61
|
| `zenmux/minimax/minimax-m2.1` | 204K | | | | | | $0.30 | $1 |
|
|
62
|
+
| `zenmux/minimax/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
63
|
+
| `zenmux/minimax/minimax-m2.5-lightning` | 205K | | | | | | $0.60 | $5 |
|
|
62
64
|
| `zenmux/moonshotai/kimi-k2-0905` | 262K | | | | | | $0.60 | $3 |
|
|
63
65
|
| `zenmux/moonshotai/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
|
|
64
66
|
| `zenmux/moonshotai/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 |
|
|
@@ -94,6 +96,7 @@ for await (const chunk of stream) {
|
|
|
94
96
|
| `zenmux/z-ai/glm-4.7` | 200K | | | | | | $0.28 | $1 |
|
|
95
97
|
| `zenmux/z-ai/glm-4.7-flash-free` | 200K | | | | | | — | — |
|
|
96
98
|
| `zenmux/z-ai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.42 |
|
|
99
|
+
| `zenmux/z-ai/glm-5` | 200K | | | | | | $0.58 | $3 |
|
|
97
100
|
|
|
98
101
|
## Advanced Configuration
|
|
99
102
|
|
|
@@ -123,7 +126,7 @@ const agent = new Agent({
|
|
|
123
126
|
model: ({ requestContext }) => {
|
|
124
127
|
const useAdvanced = requestContext.task === "complex";
|
|
125
128
|
return useAdvanced
|
|
126
|
-
? "zenmux/z-ai/glm-
|
|
129
|
+
? "zenmux/z-ai/glm-5"
|
|
127
130
|
: "zenmux/anthropic/claude-3.5-haiku";
|
|
128
131
|
}
|
|
129
132
|
});
|
|
@@ -19,7 +19,6 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
19
19
|
- [Berget.AI](https://mastra.ai/models/providers/berget)
|
|
20
20
|
- [Cerebras](https://mastra.ai/models/providers/cerebras)
|
|
21
21
|
- [Chutes](https://mastra.ai/models/providers/chutes)
|
|
22
|
-
- [Cloudflare AI Gateway](https://mastra.ai/models/providers/cloudflare-ai-gateway)
|
|
23
22
|
- [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai)
|
|
24
23
|
- [Cortecs](https://mastra.ai/models/providers/cortecs)
|
|
25
24
|
- [Deep Infra](https://mastra.ai/models/providers/deepinfra)
|
|
@@ -35,7 +34,9 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
35
34
|
- [Inference](https://mastra.ai/models/providers/inference)
|
|
36
35
|
- [IO.NET](https://mastra.ai/models/providers/io-net)
|
|
37
36
|
- [Jiekou.AI](https://mastra.ai/models/providers/jiekou)
|
|
37
|
+
- [Kilo Gateway](https://mastra.ai/models/providers/kilo)
|
|
38
38
|
- [Kimi For Coding](https://mastra.ai/models/providers/kimi-for-coding)
|
|
39
|
+
- [KUAE Cloud Coding Plan](https://mastra.ai/models/providers/kuae-cloud-coding-plan)
|
|
39
40
|
- [Llama](https://mastra.ai/models/providers/llama)
|
|
40
41
|
- [LMStudio](https://mastra.ai/models/providers/lmstudio)
|
|
41
42
|
- [LucidQuery AI](https://mastra.ai/models/providers/lucidquery)
|
|
@@ -64,6 +65,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
64
65
|
- [SiliconFlow](https://mastra.ai/models/providers/siliconflow)
|
|
65
66
|
- [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn)
|
|
66
67
|
- [STACKIT](https://mastra.ai/models/providers/stackit)
|
|
68
|
+
- [StepFun](https://mastra.ai/models/providers/stepfun)
|
|
67
69
|
- [submodel](https://mastra.ai/models/providers/submodel)
|
|
68
70
|
- [Synthetic](https://mastra.ai/models/providers/synthetic)
|
|
69
71
|
- [Together AI](https://mastra.ai/models/providers/togetherai)
|
|
@@ -55,7 +55,7 @@ console.log(`Remaining requests: ${remainingRequests}, Remaining tokens: ${remai
|
|
|
55
55
|
|
|
56
56
|
**stopWhen?:** (`LoopOptions['stopWhen']`): Conditions for stopping execution (e.g., step count, token limit).
|
|
57
57
|
|
|
58
|
-
**scorers?:** (`MastraScorers | Record<string, { scorer: MastraScorer['name']; sampling?: ScoringSamplingConfig }>`): scorer:stringName of the scorer to use.sampling?:ScoringSamplingConfigSampling configuration for the scorer.
|
|
58
|
+
**scorers?:** (`MastraScorers | Record<string, { scorer: MastraScorer['name']; sampling?: ScoringSamplingConfig }>`): scorer:stringName of the scorer to use.sampling?:ScoringSamplingConfigSampling configuration for the scorer.type:'none' | 'ratio'Type of sampling strategy. Use 'none' to disable sampling or 'ratio' for percentage-based sampling.rate?:numberSampling rate (0-1). Required when type is 'ratio'.
|
|
59
59
|
|
|
60
60
|
**returnScorerData?:** (`boolean`): Whether to return detailed scoring data in the response.
|
|
61
61
|
|
|
@@ -49,10 +49,7 @@ import { Mastra } from "@mastra/core";
|
|
|
49
49
|
import { NetlifyDeployer } from "@mastra/deployer-netlify";
|
|
50
50
|
|
|
51
51
|
export const mastra = new Mastra({
|
|
52
|
-
deployer: new NetlifyDeployer(
|
|
53
|
-
scope: "your-team",
|
|
54
|
-
siteId: "your-site-id",
|
|
55
|
-
}),
|
|
52
|
+
deployer: new NetlifyDeployer(),
|
|
56
53
|
});
|
|
57
54
|
```
|
|
58
55
|
|
|
@@ -673,6 +670,8 @@ export const mastra = new Mastra({
|
|
|
673
670
|
|
|
674
671
|
Custom error handler called when an unhandled error occurs. Use this to customize error responses, log errors to external services like Sentry, or implement custom error formatting.
|
|
675
672
|
|
|
673
|
+
This hook is supported by all server adapters. The `c` parameter provides a Hono-compatible context object — for non-Hono adapters (Koa, Express, Fastify), a shim is provided with commonly used methods like `c.json()` and `c.req.path`.
|
|
674
|
+
|
|
676
675
|
```typescript
|
|
677
676
|
import { Mastra } from "@mastra/core";
|
|
678
677
|
import * as Sentry from "@sentry/node";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# dataset.addItem()
|
|
2
|
+
|
|
3
|
+
**Added in:** `@mastra/core@1.4.0`
|
|
4
|
+
|
|
5
|
+
Adds a single item to the dataset. Each item has an input, optional ground truth, and optional metadata.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { Mastra } from "@mastra/core";
|
|
11
|
+
|
|
12
|
+
const mastra = new Mastra({ /* storage config */ });
|
|
13
|
+
|
|
14
|
+
const dataset = await mastra.datasets.get({ id: "dataset-id" });
|
|
15
|
+
|
|
16
|
+
const item = await dataset.addItem({
|
|
17
|
+
input: { question: "What is TypeScript?" },
|
|
18
|
+
groundTruth: { answer: "A typed superset of JavaScript" },
|
|
19
|
+
metadata: { source: "manual" },
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
console.log(item.id);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
**input:** (`unknown`): Input data for the item.
|
|
28
|
+
|
|
29
|
+
**groundTruth?:** (`unknown`): Expected output or ground truth for scoring.
|
|
30
|
+
|
|
31
|
+
**metadata?:** (`Record<string, unknown>`): Arbitrary metadata for the item.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
**result:** (`Promise<DatasetItem>`): DatasetItemid:stringUnique identifier of the item.datasetId:stringID of the parent dataset.datasetVersion:numberDataset version when the item was created.input:unknownInput data.groundTruth?:unknownGround truth data.metadata?:Record\<string, unknown>Item metadata.createdAt:DateWhen the item was created.updatedAt:DateWhen the item was last updated.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# dataset.addItems()
|
|
2
|
+
|
|
3
|
+
**Added in:** `@mastra/core@1.4.0`
|
|
4
|
+
|
|
5
|
+
Adds multiple items to the dataset in a single bulk operation.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { Mastra } from "@mastra/core";
|
|
11
|
+
|
|
12
|
+
const mastra = new Mastra({ /* storage config */ });
|
|
13
|
+
|
|
14
|
+
const dataset = await mastra.datasets.get({ id: "dataset-id" });
|
|
15
|
+
|
|
16
|
+
const items = await dataset.addItems({
|
|
17
|
+
items: [
|
|
18
|
+
{ input: { question: "What is AI?" }, groundTruth: { answer: "Artificial Intelligence" } },
|
|
19
|
+
{ input: { question: "What is ML?" }, groundTruth: { answer: "Machine Learning" } },
|
|
20
|
+
{ input: { question: "What is DL?" }, metadata: { category: "deep-learning" } },
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
console.log(`Added ${items.length} items`);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
**items:** (`Array<object>`): DatasetIteminput:unknownInput data for the item.groundTruth?:unknownExpected output or ground truth.metadata?:Record\<string, unknown>Arbitrary metadata.
|
|
30
|
+
|
|
31
|
+
## Returns
|
|
32
|
+
|
|
33
|
+
**result:** (`Promise<DatasetItem[]>`): Array of created dataset items. See dataset.addItem() for the item shape.
|