@mastra/mcp-docs-server 1.2.27-alpha.1 → 1.2.27-alpha.11
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/structured-output.md +17 -0
- package/.docs/docs/connections/a2a.md +4 -3
- package/.docs/docs/deployment/monorepo.md +2 -2
- package/.docs/docs/evals/datasets.md +53 -0
- package/.docs/docs/guides/build-an-eval-loop.md +395 -0
- package/.docs/docs/mastra-platform/alerts.md +83 -0
- package/.docs/docs/mastra-platform/observability.md +184 -0
- package/.docs/docs/mastra-platform/overview.md +2 -0
- package/.docs/docs/memory/message-history.md +21 -0
- package/.docs/docs/memory/observational-memory.md +33 -0
- package/.docs/docs/observability/feedback.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +2 -0
- package/.docs/docs/server/custom-adapters.md +43 -0
- package/.docs/docs/subagents.md +38 -7
- package/.docs/integrations/channels/github.md +6 -2
- package/.docs/integrations/databases/clickhouse.md +1 -1
- package/.docs/integrations/observability/confident-ai.md +67 -43
- package/.docs/integrations/observability/langfuse.md +4 -0
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +36 -4
- package/.docs/models/environment-variables.md +5 -1
- package/.docs/models/gateways/netlify.md +8 -4
- package/.docs/models/gateways/openrouter.md +5 -2
- package/.docs/models/gateways/vercel.md +378 -379
- package/.docs/models/index.md +22 -1
- package/.docs/models/providers/ai21.md +78 -0
- package/.docs/models/providers/ainetcafe.md +77 -0
- package/.docs/models/providers/alibaba-cn.md +8 -6
- package/.docs/models/providers/alibaba-token-plan-cn.md +2 -1
- package/.docs/models/providers/alibaba-token-plan.md +3 -1
- package/.docs/models/providers/alibaba.md +2 -1
- package/.docs/models/providers/chutes.md +2 -2
- package/.docs/models/providers/cortecs.md +6 -7
- package/.docs/models/providers/digitalocean.md +1 -1
- package/.docs/models/providers/edenai.md +4 -7
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/fireworks-ai.md +11 -10
- package/.docs/models/providers/hyper.md +26 -37
- package/.docs/models/providers/inception.md +3 -3
- package/.docs/models/providers/inco.md +83 -0
- package/.docs/models/providers/iteracompute.md +14 -7
- package/.docs/models/providers/kilo.md +12 -9
- package/.docs/models/providers/llmgateway-providers.md +4 -2
- package/.docs/models/providers/llmgateway.md +1 -1
- package/.docs/models/providers/mistral.md +3 -2
- package/.docs/models/providers/nano-gpt.md +10 -18
- package/.docs/models/providers/nvidia.md +2 -1
- package/.docs/models/providers/oci.md +85 -0
- package/.docs/models/providers/ofox.md +24 -23
- package/.docs/models/providers/opencode.md +2 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +3 -3
- package/.docs/models/providers/scnet-token-plan.md +2 -1
- package/.docs/models/providers/synthetic.md +2 -1
- package/.docs/models/providers/tensorx.md +2 -1
- package/.docs/models/providers/tinfoil.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +3 -4
- package/.docs/models/providers/umans-ai.md +3 -4
- package/.docs/models/providers/vancine.md +10 -10
- package/.docs/models/providers/volcengine.md +3 -2
- package/.docs/models/providers/wandb.md +4 -4
- package/.docs/models/providers/xai.md +1 -3
- package/.docs/models/providers/zhipuai-coding-plan.md +2 -8
- package/.docs/models/providers.md +5 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/auth/clerk.md +25 -1
- package/.docs/reference/cli/mastra.md +84 -0
- package/.docs/reference/client-js/agents.md +25 -0
- package/.docs/reference/client-js/mastra-client.md +1 -1
- package/.docs/reference/client-js/observability.md +101 -4
- package/.docs/reference/code-sdk/mount-agent-controller.md +23 -0
- package/.docs/reference/core/getMCPServer.md +47 -0
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/memory/memory-class.md +2 -0
- package/.docs/reference/memory/observational-memory.md +34 -4
- package/.docs/reference/observability/tracing/interfaces.md +3 -1
- package/.docs/reference/observability/tracing/trace-query.md +219 -46
- package/.docs/reference/pubsub/redis-streams.md +34 -0
- package/.docs/reference/rag/vector-databases.md +73 -0
- package/.docs/reference/storage/retention.md +56 -4
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/tools/mcp-server.md +0 -28
- package/.docs/reference/vectors/azure-ai-search.md +150 -0
- package/.docs/reference/vectors/weaviate.md +128 -0
- package/.docs/reference/workspace/workspace-class.md +10 -2
- package/package.json +9 -11
- package/.docs/docs/connections/connect-mcp-client.md +0 -211
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Ofox
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 144 Ofox models through Mastra's model router. Authentication is handled automatically using the `OFOX_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Ofox documentation](https://ofox.ai/docs).
|
|
10
10
|
|
|
@@ -71,17 +71,18 @@ for await (const chunk of stream) {
|
|
|
71
71
|
| `ofox/bailian/qwen3.7-max` | 1.0M | | | | | | $3 | $8 |
|
|
72
72
|
| `ofox/bailian/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 |
|
|
73
73
|
| `ofox/bailian/qwen3.8-27b` | 1.1M | | | | | | $0.45 | $3 |
|
|
74
|
+
| `ofox/bailian/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
|
|
74
75
|
| `ofox/bailian/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
|
|
75
76
|
| `ofox/bailian/qwen3.8-max-0902` | 1.0M | | | | | | $2 | $6 |
|
|
76
77
|
| `ofox/deepseek/deepseek-v3.2` | 128K | | | | | | $0.29 | $0.43 |
|
|
77
78
|
| `ofox/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
|
|
78
79
|
| `ofox/deepseek/deepseek-v4-flash-0423` | 1.0M | | | | | | $0.19 | $0.51 |
|
|
79
|
-
| `ofox/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.
|
|
80
|
+
| `ofox/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.31 | $0.92 |
|
|
80
81
|
| `ofox/deepseek/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.44 | $1 |
|
|
81
82
|
| `ofox/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
|
|
82
83
|
| `ofox/deepseek/deepseek-v4-pro-0423` | 1.0M | | | | | | $1 | $4 |
|
|
83
|
-
| `ofox/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $
|
|
84
|
-
| `ofox/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.
|
|
84
|
+
| `ofox/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.92 | $3 |
|
|
85
|
+
| `ofox/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.21 | $0.84 |
|
|
85
86
|
| `ofox/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
86
87
|
| `ofox/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
87
88
|
| `ofox/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
@@ -107,28 +108,28 @@ for await (const chunk of stream) {
|
|
|
107
108
|
| `ofox/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
108
109
|
| `ofox/moonshotai/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
109
110
|
| `ofox/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
110
|
-
| `ofox/openai/gpt-4.1` | 1.0M | | | | | | $2 | $
|
|
111
|
-
| `ofox/openai/gpt-4.1-mini` | 1.0M | | | | | | $0.
|
|
112
|
-
| `ofox/openai/gpt-4o` | 128K | | | | | | $
|
|
113
|
-
| `ofox/openai/gpt-4o-mini` | 128K | | | | | | $0.
|
|
114
|
-
| `ofox/openai/gpt-5` | 400K | | | | | | $1 | $
|
|
115
|
-
| `ofox/openai/gpt-5-mini` | 256K | | | | | | $0.
|
|
116
|
-
| `ofox/openai/gpt-5-nano` | 400K | | | | | | $0.
|
|
117
|
-
| `ofox/openai/gpt-5.1` | 400K | | | | | | $1 | $
|
|
118
|
-
| `ofox/openai/gpt-5.1-codex-max` | 256K | | | | | | $1 | $
|
|
119
|
-
| `ofox/openai/gpt-5.1-codex-mini` | 256K | | | | | | $0.
|
|
120
|
-
| `ofox/openai/gpt-5.2` | 400K | | | | | | $
|
|
121
|
-
| `ofox/openai/gpt-5.2-codex` | 400K | | | | | | $
|
|
122
|
-
| `ofox/openai/gpt-5.3-codex` | 400K | | | | | | $
|
|
123
|
-
| `ofox/openai/gpt-5.4` | 1.1M | | | | | | $
|
|
124
|
-
| `ofox/openai/gpt-5.4-mini` | 400K | | | | | | $0.
|
|
125
|
-
| `ofox/openai/gpt-5.4-nano` | 400K | | | | | | $0.
|
|
126
|
-
| `ofox/openai/gpt-5.4-pro` | 1.1M | | | | | | $
|
|
127
|
-
| `ofox/openai/gpt-5.5` | 1.1M | | | | | | $
|
|
111
|
+
| `ofox/openai/gpt-4.1` | 1.0M | | | | | | $2 | $6 |
|
|
112
|
+
| `ofox/openai/gpt-4.1-mini` | 1.0M | | | | | | $0.32 | $1 |
|
|
113
|
+
| `ofox/openai/gpt-4o` | 128K | | | | | | $2 | $8 |
|
|
114
|
+
| `ofox/openai/gpt-4o-mini` | 128K | | | | | | $0.12 | $0.48 |
|
|
115
|
+
| `ofox/openai/gpt-5` | 400K | | | | | | $1 | $8 |
|
|
116
|
+
| `ofox/openai/gpt-5-mini` | 256K | | | | | | $0.20 | $2 |
|
|
117
|
+
| `ofox/openai/gpt-5-nano` | 400K | | | | | | $0.04 | $0.32 |
|
|
118
|
+
| `ofox/openai/gpt-5.1` | 400K | | | | | | $1 | $8 |
|
|
119
|
+
| `ofox/openai/gpt-5.1-codex-max` | 256K | | | | | | $1 | $8 |
|
|
120
|
+
| `ofox/openai/gpt-5.1-codex-mini` | 256K | | | | | | $0.20 | $2 |
|
|
121
|
+
| `ofox/openai/gpt-5.2` | 400K | | | | | | $1 | $11 |
|
|
122
|
+
| `ofox/openai/gpt-5.2-codex` | 400K | | | | | | $1 | $11 |
|
|
123
|
+
| `ofox/openai/gpt-5.3-codex` | 400K | | | | | | $1 | $11 |
|
|
124
|
+
| `ofox/openai/gpt-5.4` | 1.1M | | | | | | $2 | $12 |
|
|
125
|
+
| `ofox/openai/gpt-5.4-mini` | 400K | | | | | | $0.60 | $4 |
|
|
126
|
+
| `ofox/openai/gpt-5.4-nano` | 400K | | | | | | $0.16 | $1 |
|
|
127
|
+
| `ofox/openai/gpt-5.4-pro` | 1.1M | | | | | | $24 | $144 |
|
|
128
|
+
| `ofox/openai/gpt-5.5` | 1.1M | | | | | | $4 | $24 |
|
|
128
129
|
| `ofox/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
|
|
129
130
|
| `ofox/openai/gpt-5.6-sol` | 1.1M | | | | | | $3 | $15 |
|
|
130
131
|
| `ofox/openai/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
|
|
131
|
-
| `ofox/openai/gpt-6-astra` | 1.1M | | | | | | $
|
|
132
|
+
| `ofox/openai/gpt-6-astra` | 1.1M | | | | | | $8 | $40 |
|
|
132
133
|
| `ofox/qwen/qwen-flash` | 1.0M | | | | | | $0.02 | $0.22 |
|
|
133
134
|
| `ofox/qwen/qwen-max` | 32K | | | | | | $0.35 | $1 |
|
|
134
135
|
| `ofox/qwen/qwen-plus` | 1.0M | | | | | | $0.12 | $0.29 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenCode Zen
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 103 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
10
10
|
|
|
@@ -90,6 +90,7 @@ for await (const chunk of stream) {
|
|
|
90
90
|
| `opencode/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
91
91
|
| `opencode/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
92
92
|
| `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
93
|
+
| `opencode/jev-latest` | 64K | | | | | | $0.04 | — |
|
|
93
94
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
94
95
|
| `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
95
96
|
| `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
@@ -50,7 +50,7 @@ for await (const chunk of stream) {
|
|
|
50
50
|
| `ovhcloud/qwen3.5-397b-a17b` | 262K | | | | | | $0.71 | $4 |
|
|
51
51
|
| `ovhcloud/qwen3.5-9b` | 262K | | | | | | $0.12 | $0.18 |
|
|
52
52
|
| `ovhcloud/qwen3.6-27b` | 262K | | | | | | $0.47 | $3 |
|
|
53
|
-
| `ovhcloud/qwen3.8-27b` | 262K | | | | | |
|
|
53
|
+
| `ovhcloud/qwen3.8-27b` | 262K | | | | | | $0.47 | $3 |
|
|
54
54
|
| `ovhcloud/qwen3guard-gen-0.6b` | 33K | | | | | | — | — |
|
|
55
55
|
| `ovhcloud/qwen3guard-gen-8b` | 33K | | | | | | — | — |
|
|
56
56
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Privatemode AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 11 Privatemode AI models through Mastra's model router. Authentication is handled automatically using the `PRIVATEMODE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Privatemode AI documentation](https://docs.privatemode.ai).
|
|
10
10
|
|
|
@@ -40,10 +40,10 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| ----------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
41
|
| `privatemode-ai/deepseek-ocr-2` | 8K | | | | | | $0.89 | $1 |
|
|
42
42
|
| `privatemode-ai/glm-5.3` | 256K | | | | | | $2 | $9 |
|
|
43
|
+
| `privatemode-ai/glm-5.3-flash` | 256K | | | | | | $0.89 | $4 |
|
|
44
|
+
| `privatemode-ai/glm-flash-latest` | 256K | | | | | | $0.89 | $4 |
|
|
43
45
|
| `privatemode-ai/glm-latest` | 256K | | | | | | $2 | $9 |
|
|
44
46
|
| `privatemode-ai/gpt-oss-120b` | 128K | | | | | | $0.50 | $2 |
|
|
45
|
-
| `privatemode-ai/kimi-k2.6` | 256K | | | | | | $2 | $9 |
|
|
46
|
-
| `privatemode-ai/kimi-latest` | 256K | | | | | | $2 | $9 |
|
|
47
47
|
| `privatemode-ai/qwen3-embedding-4b` | 32K | | | | | | $0.15 | — |
|
|
48
48
|
| `privatemode-ai/voxtral-mini-3b` | 32K | | | | | | $0.00 | — |
|
|
49
49
|
| `privatemode-ai/whisper-large-v3` | 448 | | | | | | $0.02 | — |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# SCNet Token Plan
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 19 SCNet Token Plan models through Mastra's model router. Authentication is handled automatically using the `SCNET_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [SCNet Token Plan documentation](https://www.scnet.cn/ac/openapi/doc/2.0/moduleapi/plans/token-plan.html).
|
|
10
10
|
|
|
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `scnet-token-plan/DeepSeek-V4-Flash-0731` | 1.0M | | | | | | — | — |
|
|
43
43
|
| `scnet-token-plan/DeepSeek-V4-Pro` | 1.0M | | | | | | — | — |
|
|
44
44
|
| `scnet-token-plan/DeepSeek-V4-Pro-0813` | 1.0M | | | | | | — | — |
|
|
45
|
+
| `scnet-token-plan/DeepSeek-V4.1-Flash` | 1.0M | | | | | | — | — |
|
|
45
46
|
| `scnet-token-plan/GLM-5` | 205K | | | | | | — | — |
|
|
46
47
|
| `scnet-token-plan/GLM-5.1` | 200K | | | | | | — | — |
|
|
47
48
|
| `scnet-token-plan/GLM-5.2` | 1.0M | | | | | | — | — |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Synthetic
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 10 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Synthetic documentation](https://synthetic.new/pricing).
|
|
10
10
|
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| ------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
+
| `synthetic/hf:deepseek-ai/DeepSeek-V4.1-Flash` | 524K | | | | | | $0.60 | $1 |
|
|
41
42
|
| `synthetic/hf:MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.60 | $1 |
|
|
42
43
|
| `synthetic/hf:moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
43
44
|
| `synthetic/hf:moonshotai/Kimi-K3` | 524K | | | | | | $3 | $15 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# TensorX
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 26 TensorX models through Mastra's model router. Authentication is handled automatically using the `TENSORX_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [TensorX documentation](https://docs.tensorx.ai/).
|
|
10
10
|
|
|
@@ -44,6 +44,7 @@ for await (const chunk of stream) {
|
|
|
44
44
|
| `tensorx/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.15 | $0.30 |
|
|
45
45
|
| `tensorx/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.25 | $0.30 |
|
|
46
46
|
| `tensorx/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
|
|
47
|
+
| `tensorx/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.50 | $2 |
|
|
47
48
|
| `tensorx/minimax/minimax-m2.5` | 197K | | | | | | $0.30 | $1 |
|
|
48
49
|
| `tensorx/minimax/minimax-m3` | 1.0M | | | | | | $0.40 | $2 |
|
|
49
50
|
| `tensorx/moonshotai/kimi-k2.5` | 262K | | | | | | $0.50 | $3 |
|
|
@@ -39,8 +39,8 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
41
|
| `tinfoil/deepseek-v4-1-flash` | 1.0M | | | | | | $0.65 | $1 |
|
|
42
|
-
| `tinfoil/deepseek-v4-flash` | 1.0M | | | | | | $0.30 | $0.70 |
|
|
43
42
|
| `tinfoil/gemma4-31b` | 262K | | | | | | $0.40 | $1 |
|
|
43
|
+
| `tinfoil/glm-5-3` | 1.0M | | | | | | $2 | $6 |
|
|
44
44
|
| `tinfoil/glm-5-3-flash` | 1.0M | | | | | | $0.40 | $1 |
|
|
45
45
|
| `tinfoil/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
46
46
|
| `tinfoil/gpt-oss-safeguard-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Umans AI Coding Plan
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 7 Umans AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_CODING_PLAN_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Umans AI Coding Plan documentation](https://app.umans.ai/offers/code/docs).
|
|
10
10
|
|
|
@@ -38,12 +38,11 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| --------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
-
| `umans-ai-coding-plan/umans-coder` |
|
|
41
|
+
| `umans-ai-coding-plan/umans-coder` | 1.0M | | | | | | — | — |
|
|
42
42
|
| `umans-ai-coding-plan/umans-deepseek-v4-flash-0731` | 1.0M | | | | | | — | — |
|
|
43
43
|
| `umans-ai-coding-plan/umans-deepseek-v4-pro-0813` | 1.0M | | | | | | — | — |
|
|
44
44
|
| `umans-ai-coding-plan/umans-flash` | 262K | | | | | | — | — |
|
|
45
|
-
| `umans-ai-coding-plan/umans-glm-5.
|
|
46
|
-
| `umans-ai-coding-plan/umans-kimi-k2.7` | 262K | | | | | | — | — |
|
|
45
|
+
| `umans-ai-coding-plan/umans-glm-5.3-flash` | 1.0M | | | | | | — | — |
|
|
47
46
|
| `umans-ai-coding-plan/umans-kimi-k3` | 1.0M | | | | | | — | — |
|
|
48
47
|
| `umans-ai-coding-plan/umans-qwen3.6-35b-a3b` | 262K | | | | | | — | — |
|
|
49
48
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Umans AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 6 Umans AI models through Mastra's model router. Authentication is handled automatically using the `UMANS_AI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Umans AI documentation](https://app.umans.ai/offers/code/docs/orgs).
|
|
10
10
|
|
|
@@ -38,12 +38,11 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
-
| `umans-ai/umans-coder` |
|
|
41
|
+
| `umans-ai/umans-coder` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
42
42
|
| `umans-ai/umans-deepseek-v4-flash-0731` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
43
43
|
| `umans-ai/umans-deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
|
|
44
44
|
| `umans-ai/umans-flash` | 262K | | | | | | $0.15 | $1 |
|
|
45
|
-
| `umans-ai/umans-glm-5.
|
|
46
|
-
| `umans-ai/umans-kimi-k2.7` | 262K | | | | | | $0.95 | $4 |
|
|
45
|
+
| `umans-ai/umans-glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
47
46
|
| `umans-ai/umans-kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
48
47
|
|
|
49
48
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
@@ -36,16 +36,16 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
## Models
|
|
38
38
|
|
|
39
|
-
| Model
|
|
40
|
-
|
|
|
41
|
-
| `vancine/deepseek-flash` | 1.0M | | | | | | $0.24 | $0.96 |
|
|
42
|
-
| `vancine/glm-5.3`
|
|
43
|
-
| `vancine/glm-5.3-flash`
|
|
44
|
-
| `vancine/hy4-preview`
|
|
45
|
-
| `vancine/kimi-k3`
|
|
46
|
-
| `vancine/MiniMax-M3`
|
|
47
|
-
| `vancine/qwen3.8-flash`
|
|
48
|
-
| `vancine/qwen3.8-max`
|
|
39
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
|
+
| ----------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
+
| `vancine/deepseek-v4.1-flash` | 1.0M | | | | | | $0.24 | $0.96 |
|
|
42
|
+
| `vancine/glm-5.3` | 1.0M | | | | | | $1 | $4 |
|
|
43
|
+
| `vancine/glm-5.3-flash` | 1.0M | | | | | | $0.12 | $0.40 |
|
|
44
|
+
| `vancine/hy4-preview` | 1.0M | | | | | | $0.67 | $2 |
|
|
45
|
+
| `vancine/kimi-k3` | 1.0M | | | | | | $2 | $12 |
|
|
46
|
+
| `vancine/MiniMax-M3` | 1.0M | | | | | | $0.24 | $0.96 |
|
|
47
|
+
| `vancine/qwen3.8-flash` | 1.0M | | | | | | $0.12 | $0.38 |
|
|
48
|
+
| `vancine/qwen3.8-max` | 1.0M | | | | | | $2 | $5 |
|
|
49
49
|
|
|
50
50
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
51
51
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Volcengine Ark
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 16 Volcengine Ark models through Mastra's model router. Authentication is handled automatically using the `ARK_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Volcengine Ark documentation](https://www.volcengine.com/docs/82379/1330310).
|
|
10
10
|
|
|
@@ -53,6 +53,7 @@ for await (const chunk of stream) {
|
|
|
53
53
|
| `volcengine/doubao-seed-character-260628` | 256K | | | | | | $0.12 | $0.30 |
|
|
54
54
|
| `volcengine/doubao-seed-evolving` | 256K | | | | | | $0.89 | $4 |
|
|
55
55
|
| `volcengine/glm-5-2-260617` | 1.0M | | | | | | $1 | $4 |
|
|
56
|
+
| `volcengine/glm-5-3-flash-260828` | 1.0M | | | | | | $0.12 | $0.42 |
|
|
56
57
|
|
|
57
58
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
58
59
|
|
|
@@ -84,7 +85,7 @@ const agent = new Agent({
|
|
|
84
85
|
model: ({ requestContext }) => {
|
|
85
86
|
const useAdvanced = requestContext.task === "complex";
|
|
86
87
|
return useAdvanced
|
|
87
|
-
? "volcengine/glm-5-
|
|
88
|
+
? "volcengine/glm-5-3-flash-260828"
|
|
88
89
|
: "volcengine/deepseek-v4-flash-ga-260731";
|
|
89
90
|
}
|
|
90
91
|
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
4
4
|
|
|
5
|
-
# CoreWeave
|
|
6
6
|
|
|
7
|
-
Access 27
|
|
7
|
+
Access 27 CoreWeave models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
8
8
|
|
|
9
|
-
Learn more in the [
|
|
9
|
+
Learn more in the [CoreWeave documentation](https://docs.wandb.ai).
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
WANDB_API_KEY=your-api-key
|
|
@@ -32,7 +32,7 @@ for await (const chunk of stream) {
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [
|
|
35
|
+
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [CoreWeave documentation](https://docs.wandb.ai) for details.
|
|
36
36
|
|
|
37
37
|
## Models
|
|
38
38
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# xAI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 10 xAI models through Mastra's model router. Authentication is handled automatically using the `XAI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [xAI documentation](https://docs.x.ai/docs/models).
|
|
10
10
|
|
|
@@ -44,8 +44,6 @@ for await (const chunk of stream) {
|
|
|
44
44
|
| `xai/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
45
45
|
| `xai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
46
46
|
| `xai/grok-imagine-image` | 16K | | | | | | — | — |
|
|
47
|
-
| `xai/grok-imagine-image-2.0` | 64K | | | | | | — | — |
|
|
48
|
-
| `xai/grok-imagine-image-quality` | 16K | | | | | | — | — |
|
|
49
47
|
| `xai/grok-imagine-video` | 1K | | | | | | — | — |
|
|
50
48
|
| `xai/grok-imagine-video-1.5` | 1K | | | | | | — | — |
|
|
51
49
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Zhipu AI Coding Plan
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 4 Zhipu AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Zhipu AI Coding Plan documentation](https://docs.bigmodel.cn/cn/coding-plan/overview).
|
|
10
10
|
|
|
@@ -39,15 +39,9 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
41
|
| `zhipuai-coding-plan/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
|
|
42
|
-
| `zhipuai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
|
|
43
|
-
| `zhipuai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
|
|
44
|
-
| `zhipuai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
|
|
45
|
-
| `zhipuai-coding-plan/glm-5.2` | 1.0M | | | | | | — | — |
|
|
46
|
-
| `zhipuai-coding-plan/glm-5.2-highspeed` | 1.0M | | | | | | — | — |
|
|
47
42
|
| `zhipuai-coding-plan/glm-5.3` | 1.0M | | | | | | — | — |
|
|
48
43
|
| `zhipuai-coding-plan/glm-5.3-flash` | 1.0M | | | | | | — | — |
|
|
49
44
|
| `zhipuai-coding-plan/glm-5.3-highspeed` | 1.0M | | | | | | — | — |
|
|
50
|
-
| `zhipuai-coding-plan/glm-5v-turbo` | 200K | | | | | | — | — |
|
|
51
45
|
|
|
52
46
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
53
47
|
|
|
@@ -79,7 +73,7 @@ const agent = new Agent({
|
|
|
79
73
|
model: ({ requestContext }) => {
|
|
80
74
|
const useAdvanced = requestContext.task === "complex";
|
|
81
75
|
return useAdvanced
|
|
82
|
-
? "zhipuai-coding-plan/glm-
|
|
76
|
+
? "zhipuai-coding-plan/glm-5.3-highspeed"
|
|
83
77
|
: "zhipuai-coding-plan/glm-4.6v";
|
|
84
78
|
}
|
|
85
79
|
});
|
|
@@ -21,6 +21,8 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
21
21
|
- [Agnes AI](https://mastra.ai/models/providers/agnes)
|
|
22
22
|
- [AI-ROUTER](https://mastra.ai/models/providers/ai-router)
|
|
23
23
|
- [ai&](https://mastra.ai/models/providers/aiand)
|
|
24
|
+
- [AI21 Labs](https://mastra.ai/models/providers/ai21)
|
|
25
|
+
- [ainetcafe](https://mastra.ai/models/providers/ainetcafe)
|
|
24
26
|
- [Aixy](https://mastra.ai/models/providers/aixy)
|
|
25
27
|
- [AKI.IO](https://mastra.ai/models/providers/aki-io)
|
|
26
28
|
- [Alibaba](https://mastra.ai/models/providers/alibaba)
|
|
@@ -49,6 +51,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
49
51
|
- [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock)
|
|
50
52
|
- [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai)
|
|
51
53
|
- [CoralBricks](https://mastra.ai/models/providers/coralbricks)
|
|
54
|
+
- [CoreWeave](https://mastra.ai/models/providers/wandb)
|
|
52
55
|
- [Cortecs](https://mastra.ai/models/providers/cortecs)
|
|
53
56
|
- [CrofAI](https://mastra.ai/models/providers/crof)
|
|
54
57
|
- [CrossModel](https://mastra.ai/models/providers/crossmodel)
|
|
@@ -80,6 +83,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
80
83
|
- [Impossibl](https://mastra.ai/models/providers/impossibl)
|
|
81
84
|
- [Inception](https://mastra.ai/models/providers/inception)
|
|
82
85
|
- [Inceptron](https://mastra.ai/models/providers/inceptron)
|
|
86
|
+
- [Inco](https://mastra.ai/models/providers/inco)
|
|
83
87
|
- [Infer by Flow7](https://mastra.ai/models/providers/infer)
|
|
84
88
|
- [Inference](https://mastra.ai/models/providers/inference)
|
|
85
89
|
- [InferX](https://mastra.ai/models/providers/inferx)
|
|
@@ -128,6 +132,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
128
132
|
- [Nova](https://mastra.ai/models/providers/nova)
|
|
129
133
|
- [NovitaAI](https://mastra.ai/models/providers/novita-ai)
|
|
130
134
|
- [Nvidia](https://mastra.ai/models/providers/nvidia)
|
|
135
|
+
- [OCI Generative AI](https://mastra.ai/models/providers/oci)
|
|
131
136
|
- [Ofox](https://mastra.ai/models/providers/ofox)
|
|
132
137
|
- [Ollama Cloud](https://mastra.ai/models/providers/ollama-cloud)
|
|
133
138
|
- [OpenCode Go](https://mastra.ai/models/providers/opencode-go)
|
|
@@ -190,7 +195,6 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
190
195
|
- [Vultr](https://mastra.ai/models/providers/vultr)
|
|
191
196
|
- [Wafer](https://mastra.ai/models/providers/wafer.ai)
|
|
192
197
|
- [Wallaby](https://mastra.ai/models/providers/wallaby)
|
|
193
|
-
- [Weights & Biases](https://mastra.ai/models/providers/wandb)
|
|
194
198
|
- [Xiaomi](https://mastra.ai/models/providers/xiaomi)
|
|
195
199
|
- [Xiaomi Token Plan (China)](https://mastra.ai/models/providers/xiaomi-token-plan-cn)
|
|
196
200
|
- [Xiaomi Token Plan (Europe)](https://mastra.ai/models/providers/xiaomi-token-plan-ams)
|
|
@@ -108,7 +108,7 @@ const result = await agent.generate('message for agent')
|
|
|
108
108
|
|
|
109
109
|
**options.structuredOutput.fallbackValue** (`<S extends ZodTypeAny>`): Fallback value to use when schema validation fails and errorStrategy is 'fallback'.
|
|
110
110
|
|
|
111
|
-
**options.structuredOutput.instructions** (`string`): Additional instructions for the structured output model.
|
|
111
|
+
**options.structuredOutput.instructions** (`string`): Additional instructions for the structured output model. With jsonPromptInjection and no structuring model, this text is injected into the prompt in place of the serialized schema.
|
|
112
112
|
|
|
113
113
|
**options.structuredOutput.jsonPromptInjection** (`boolean | 'system' | 'inline' | 'auto'`): Controls how the JSON schema reaches the model. Set to 'auto' to use native structured output when supported and inline prompt injection otherwise.
|
|
114
114
|
|
|
@@ -23,6 +23,26 @@ export const mastra = new Mastra({
|
|
|
23
23
|
})
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
## Restricting login to a single organization
|
|
27
|
+
|
|
28
|
+
Set `organizationId` or `organizationSlug` to only allow members of a specific Clerk organization to sign in. Non-members are rejected during authorization. Configure only one of the two. Setting both throws at startup, so login can't be granted to two different organizations.
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { Mastra } from '@mastra/core'
|
|
32
|
+
import { MastraAuthClerk } from '@mastra/auth-clerk'
|
|
33
|
+
|
|
34
|
+
export const mastra = new Mastra({
|
|
35
|
+
server: {
|
|
36
|
+
auth: new MastraAuthClerk({
|
|
37
|
+
jwksUri: process.env.CLERK_JWKS_URI,
|
|
38
|
+
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
|
|
39
|
+
secretKey: process.env.CLERK_SECRET_KEY,
|
|
40
|
+
organizationId: process.env.CLERK_ORGANIZATION_ID,
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
26
46
|
## Constructor parameters
|
|
27
47
|
|
|
28
48
|
**publishableKey** (`string`): Your Clerk publishable key. Can be found in your Clerk Dashboard under API Keys. (Default: `process.env.CLERK_PUBLISHABLE_KEY`)
|
|
@@ -31,9 +51,13 @@ export const mastra = new Mastra({
|
|
|
31
51
|
|
|
32
52
|
**jwksUri** (`string`): The JWKS URI from your Clerk application. Used to verify JWT signatures. (Default: `process.env.CLERK_JWKS_URI`)
|
|
33
53
|
|
|
54
|
+
**organizationId** (`string`): Restrict login to members of a single Clerk organization, identified by its ID. Users who are not members of this organization are denied access. (Default: `process.env.CLERK_ORGANIZATION_ID`)
|
|
55
|
+
|
|
56
|
+
**organizationSlug** (`string`): Restrict login to members of a single Clerk organization, identified by its slug. Users who are not members of this organization are denied access. (Default: `process.env.CLERK_ORGANIZATION_SLUG`)
|
|
57
|
+
|
|
34
58
|
**name** (`string`): Custom name for the auth provider instance.
|
|
35
59
|
|
|
36
|
-
**authorizeUser** (`(user: User, request: HonoRequest) => Promise<boolean> | boolean`): Custom authorization function to determine if a user should be granted access. Called after token verification. By default, allows all authenticated users.
|
|
60
|
+
**authorizeUser** (`(user: User, request: HonoRequest) => Promise<boolean> | boolean`): Custom authorization function to determine if a user should be granted access. Called after token verification. By default, allows all authenticated users, unless organizationId or organizationSlug is set, in which case only members of that organization are allowed.
|
|
37
61
|
|
|
38
62
|
## Related
|
|
39
63
|
|
|
@@ -1079,6 +1079,90 @@ See the [Storage migration guide](https://mastra.ai/reference/migrations/upgrade
|
|
|
1079
1079
|
|
|
1080
1080
|
It accepts [common flags](#common-flags).
|
|
1081
1081
|
|
|
1082
|
+
## `mastra traces import`
|
|
1083
|
+
|
|
1084
|
+
Imports historical traces from a supported observability provider into an existing Mastra Platform project. The command prepares complete traces locally, uploads whole-trace batches, supports resume, and verifies a sample through Mastra Platform.
|
|
1085
|
+
|
|
1086
|
+
```bash
|
|
1087
|
+
mastra traces import <provider> [options]
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
The following provider is currently supported:
|
|
1091
|
+
|
|
1092
|
+
| Provider | Argument | Requirements |
|
|
1093
|
+
| -------- | ---------- | -------------------------------------------------- |
|
|
1094
|
+
| Langfuse | `langfuse` | Langfuse Cloud or self-hosted Langfuse v4 or later |
|
|
1095
|
+
|
|
1096
|
+
See [Import existing traces](https://mastra.ai/docs/mastra-platform/observability) for the complete workflow, data mapping, local-file lifecycle, and limits.
|
|
1097
|
+
|
|
1098
|
+
### Options
|
|
1099
|
+
|
|
1100
|
+
#### `--project <name|slug|id>`
|
|
1101
|
+
|
|
1102
|
+
Selects the destination Mastra Platform project. `MASTRA_PROJECT_ID` takes precedence when set. Without either value, the command uses the project linked in `.mastra-project.json`.
|
|
1103
|
+
|
|
1104
|
+
#### `--from <date>`
|
|
1105
|
+
|
|
1106
|
+
Sets the inclusive start of the import window as an ISO 8601 date or timestamp. It defaults to 30 days before `--to`, clamped to the current 30-day Platform retention boundary.
|
|
1107
|
+
|
|
1108
|
+
#### `--to <date>`
|
|
1109
|
+
|
|
1110
|
+
Sets the exclusive end of the import window as an ISO 8601 date or timestamp. It defaults to the time when the import starts and can't be in the future.
|
|
1111
|
+
|
|
1112
|
+
The complete window must fall within the current 30-day Platform retention period, `--from` must be earlier than `--to`, and the window can't exceed 30 days.
|
|
1113
|
+
|
|
1114
|
+
#### `--dry-run`
|
|
1115
|
+
|
|
1116
|
+
Reads the source and prepares valid traces locally without uploading them. The command writes a report and prints a command that resumes the prepared import.
|
|
1117
|
+
|
|
1118
|
+
#### `--resume <import-id>`
|
|
1119
|
+
|
|
1120
|
+
Resumes a prepared import using its saved provider, destination project, date window, and acknowledged progress. Use the same destination project shown in the generated resume command. This option can't be combined with `--from`, `--to`, or `--dry-run`.
|
|
1121
|
+
|
|
1122
|
+
#### `-y, --yes`
|
|
1123
|
+
|
|
1124
|
+
Uploads without asking for confirmation.
|
|
1125
|
+
|
|
1126
|
+
### Environment variables
|
|
1127
|
+
|
|
1128
|
+
The command loads `.env` and `.env.local` from the current directory.
|
|
1129
|
+
|
|
1130
|
+
| Variable | Required | Description |
|
|
1131
|
+
| ------------------------------ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
1132
|
+
| `LANGFUSE_PUBLIC_KEY` | For new Langfuse imports | Public project API key. |
|
|
1133
|
+
| `LANGFUSE_SECRET_KEY` | For new Langfuse imports | Secret project API key. |
|
|
1134
|
+
| `LANGFUSE_BASE_URL` | No | Langfuse host. Defaults to `https://cloud.langfuse.com`. |
|
|
1135
|
+
| `MASTRA_API_TOKEN` | For headless authentication | Mastra Platform API token. Without it, the command uses credentials from `mastra auth login`. |
|
|
1136
|
+
| `MASTRA_ORG_ID` | With `MASTRA_API_TOKEN` | Organization that owns the destination project. |
|
|
1137
|
+
| `MASTRA_PLATFORM_ACCESS_TOKEN` | For upload and read-back with interactive login | Mastra Platform access token for the destination. Not required for `--dry-run` or when `MASTRA_API_TOKEN` is set. |
|
|
1138
|
+
| `MASTRA_PROJECT_ID` | When no project is otherwise linked | Destination project ID. Takes precedence over `--project`. |
|
|
1139
|
+
|
|
1140
|
+
### Examples
|
|
1141
|
+
|
|
1142
|
+
Preview the default 30-day window without uploading:
|
|
1143
|
+
|
|
1144
|
+
```bash
|
|
1145
|
+
mastra traces import langfuse --project my-project --dry-run
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
Import a smaller date window without a confirmation prompt:
|
|
1149
|
+
|
|
1150
|
+
```bash
|
|
1151
|
+
mastra traces import langfuse \
|
|
1152
|
+
--project my-project \
|
|
1153
|
+
--from "$FROM" \
|
|
1154
|
+
--to "$TO" \
|
|
1155
|
+
--yes
|
|
1156
|
+
```
|
|
1157
|
+
|
|
1158
|
+
Resume an existing import:
|
|
1159
|
+
|
|
1160
|
+
```bash
|
|
1161
|
+
mastra traces import langfuse \
|
|
1162
|
+
--resume 00000000-0000-0000-0000-000000000000 \
|
|
1163
|
+
--project my-project
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1082
1166
|
## `mastra api`
|
|
1083
1167
|
|
|
1084
1168
|
Calls a Mastra runtime server with JSON input and JSON output. Use it for local development servers, deployed Mastra platform projects, self-hosted Mastra servers, or hosted Mastra Platform Observability APIs.
|
|
@@ -119,6 +119,31 @@ while (true) {
|
|
|
119
119
|
}
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
+
#### Cancelling a stream
|
|
123
|
+
|
|
124
|
+
Cancelling the response body aborts the underlying HTTP request and stops any pending client tool executions and follow-up requests:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
const response = await agent.stream('Tell me a story')
|
|
128
|
+
const reader = response.body.getReader()
|
|
129
|
+
|
|
130
|
+
const { value } = await reader.read()
|
|
131
|
+
await reader.cancel('user navigated away')
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
You can also pass an `abortSignal` to cancel from outside the stream. The same option is available on `streamUntilIdle()`, `resumeStream()`, `resumeStreamUntilIdle()`, `approveToolCall()`, `declineToolCall()`, `generate()`, and `generateLegacy()`:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
const controller = new AbortController()
|
|
138
|
+
|
|
139
|
+
const response = await agent.stream('Tell me a story', {
|
|
140
|
+
abortSignal: controller.signal,
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
// Later
|
|
144
|
+
controller.abort()
|
|
145
|
+
```
|
|
146
|
+
|
|
122
147
|
#### AI SDK compatible format
|
|
123
148
|
|
|
124
149
|
To stream AI SDK-formatted parts on the client from an `agent.stream(...)` response, wrap `response.processDataStream` into a `ReadableStream<ChunkType>` and use `toAISdkStream`:
|
|
@@ -81,7 +81,7 @@ You can also pass `requestContext` as a `Record<string, any>`.
|
|
|
81
81
|
|
|
82
82
|
**getWorkflow(workflowId)** (`Workflow`): Retrieves a specific workflow instance by ID.
|
|
83
83
|
|
|
84
|
-
**getAgentBuilderActions()** (`Promise<
|
|
84
|
+
**getAgentBuilderActions()** (`Promise<GetAgentBuilderActionsResponse>`): Returns all available Agent Builder actions. See Agent Builder API.
|
|
85
85
|
|
|
86
86
|
**getAgentBuilderAction(actionId)** (`AgentBuilder`): Retrieves an Agent Builder action by ID. See Agent Builder API.
|
|
87
87
|
|