@mastra/mcp-docs-server 1.3.12 → 1.3.13-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/auth/simple-auth.md +8 -8
- package/.docs/docs/connections/mcp.md +99 -0
- package/.docs/docs/guides/authentication-identity.md +4 -0
- package/.docs/docs/harness/goals.md +1 -1
- package/.docs/docs/knowledge/agents-and-tools.md +122 -0
- package/.docs/docs/knowledge/load-your-content.md +86 -0
- package/.docs/docs/knowledge/overview.md +106 -0
- package/.docs/docs/knowledge/patterns.md +167 -0
- package/.docs/docs/knowledge/pinned-context.md +177 -0
- package/.docs/docs/knowledge/scopes-and-access.md +202 -0
- package/.docs/docs/knowledge/search.md +63 -0
- package/.docs/docs/memory/observational-memory.md +23 -23
- package/.docs/docs/memory/overview.md +19 -7
- package/.docs/docs/server/custom-adapters.md +4 -0
- package/.docs/docs/server/request-context.md +6 -6
- package/.docs/docs/server/server-adapters.md +12 -12
- package/.docs/docs/studio/knowledge.md +45 -24
- package/.docs/docs/studio/overview.md +3 -1
- package/.docs/models/gateways/netlify.md +3 -1
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/baseten.md +2 -1
- package/.docs/models/providers/edenai.md +7 -7
- package/.docs/models/providers/inceptron.md +3 -3
- package/.docs/models/providers/kilo.md +10 -15
- package/.docs/models/providers/llmgateway-providers.md +8 -4
- package/.docs/models/providers/llmgateway.md +2 -2
- package/.docs/models/providers/modular.md +6 -6
- package/.docs/models/providers/nano-gpt.md +10 -11
- package/.docs/models/providers/opencode.md +2 -1
- package/.docs/models/providers/ovhcloud.md +1 -2
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/agents/getLLM.md +1 -1
- package/.docs/reference/agents/getMetadata.md +1 -1
- package/.docs/reference/agents/getModel.md +4 -2
- package/.docs/reference/agents/getSkill.md +1 -1
- package/.docs/reference/agents/listScorers.md +1 -1
- package/.docs/reference/agents/listTools.md +1 -1
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/client-js/observability.md +67 -2
- package/.docs/reference/connect/tools.md +5 -1
- package/.docs/reference/core/addDynamicWorkflow.md +1 -1
- package/.docs/reference/core/addGateway.md +1 -1
- package/.docs/reference/core/getAgent.md +4 -2
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getGateway.md +1 -1
- package/.docs/reference/core/getMemory.md +2 -2
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/listMemory.md +3 -3
- package/.docs/reference/core/listScorers.md +2 -2
- package/.docs/reference/core/listVectors.md +1 -1
- package/.docs/reference/evals/completeness.md +0 -1
- package/.docs/reference/evals/content-similarity.md +1 -3
- package/.docs/reference/evals/create-scorer.md +5 -3
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +8 -1
- package/.docs/reference/evals/scorer-utils.md +1 -1
- package/.docs/reference/index.md +7 -0
- package/.docs/reference/knowledge/knowledge-class.md +296 -0
- package/.docs/reference/knowledge/knowledge-memory-scopes.md +78 -0
- package/.docs/reference/knowledge/knowledge-tools.md +299 -0
- package/.docs/reference/knowledge/limits.md +44 -0
- package/.docs/reference/knowledge/scope-declarations.md +275 -0
- package/.docs/reference/knowledge/tool-instructions.md +56 -0
- package/.docs/reference/logging/pino-logger.md +1 -1
- package/.docs/reference/memory/observational-memory.md +9 -7
- package/.docs/reference/observability/feedback.md +3 -1
- package/.docs/reference/processors/batch-parts-processor.md +0 -2
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +1 -1
- package/.docs/reference/processors/semantic-recall-processor.md +1 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/tool-search-processor.md +1 -1
- package/.docs/reference/schedules/overview.md +3 -3
- package/.docs/reference/server/invoke-route.md +86 -0
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/server/routes.md +63 -0
- package/.docs/reference/streaming/ChunkType.md +3 -1
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/tools/mcp-client.md +4 -0
- package/.docs/reference/tools/vector-query-tool.md +3 -3
- package/.docs/reference/workflows/run-methods/start.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/workflow.md +2 -0
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-BDrEqwuY.js → src-CwUXyWAK.js} +3 -3
- package/dist/src-CwUXyWAK.js.map +1 -0
- package/dist/stdio.js +1 -1
- package/dist/tools/embedded-docs.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/src-BDrEqwuY.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# LLM Gateway
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 427 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
10
10
|
|
|
@@ -154,6 +154,7 @@ for await (const chunk of stream) {
|
|
|
154
154
|
| `llmgateway-providers/baidu/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
155
155
|
| `llmgateway-providers/baidu/glm-5.3` | 1.0M | | | | | | $1 | $4 |
|
|
156
156
|
| `llmgateway-providers/baidu/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
157
|
+
| `llmgateway-providers/baidu/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
157
158
|
| `llmgateway-providers/bytedance/deepseek-v3.2` | 131K | | | | | | $0.28 | $0.42 |
|
|
158
159
|
| `llmgateway-providers/bytedance/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
|
|
159
160
|
| `llmgateway-providers/bytedance/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -214,6 +215,10 @@ for await (const chunk of stream) {
|
|
|
214
215
|
| `llmgateway-providers/fireworks/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
215
216
|
| `llmgateway-providers/fireworks/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
216
217
|
| `llmgateway-providers/fireworks/kimi-k3-fast` | 1.0M | | | | | | $5 | $23 |
|
|
218
|
+
| `llmgateway-providers/flexai/deepseek-v4-flash` | 1.0M | | | | | | $0.12 | $0.24 |
|
|
219
|
+
| `llmgateway-providers/flexai/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
220
|
+
| `llmgateway-providers/flexai/glm-5.2` | 1.0M | | | | | | $0.70 | $2 |
|
|
221
|
+
| `llmgateway-providers/flexai/glm-5.3-flash` | 1.0M | | | | | | $0.08 | $0.50 |
|
|
217
222
|
| `llmgateway-providers/google-ai-studio/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
218
223
|
| `llmgateway-providers/google-ai-studio/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
|
|
219
224
|
| `llmgateway-providers/google-ai-studio/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
@@ -351,9 +356,9 @@ for await (const chunk of stream) {
|
|
|
351
356
|
| `llmgateway-providers/quartz/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
352
357
|
| `llmgateway-providers/ranoai/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
353
358
|
| `llmgateway-providers/reka-ai/deepseek-v4.1-flash` | 1.0M | | | | | | $0.13 | $0.51 |
|
|
354
|
-
| `llmgateway-providers/reka-ai/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.15 | $0.
|
|
359
|
+
| `llmgateway-providers/reka-ai/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
355
360
|
| `llmgateway-providers/reka-ai/glm-5.3` | 1.0M | | | | | | $0.45 | $2 |
|
|
356
|
-
| `llmgateway-providers/reka-ai/glm-5.3-flash` | 1.0M | | | | | | $0.
|
|
361
|
+
| `llmgateway-providers/reka-ai/glm-5.3-flash` | 1.0M | | | | | | $0.11 | $0.33 |
|
|
357
362
|
| `llmgateway-providers/reka-ai/reka-edge-2603` | 16K | | | | | | $0.10 | $0.10 |
|
|
358
363
|
| `llmgateway-providers/runpod/glm-5.3` | 262K | | | | | | $0.77 | $2 |
|
|
359
364
|
| `llmgateway-providers/runpod/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
@@ -420,7 +425,6 @@ for await (const chunk of stream) {
|
|
|
420
425
|
| `llmgateway-providers/together-ai/minimax-m3` | 524K | | | | | | $0.30 | $1 |
|
|
421
426
|
| `llmgateway-providers/together-ai/minimax-m3.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
422
427
|
| `llmgateway-providers/together-ai/muse-glimmer-30b` | 131K | | | | | | $0.35 | $2 |
|
|
423
|
-
| `llmgateway-providers/together-ai/qwen3.8-2.4t-a95b` | 1.0M | | | | | | $2 | $6 |
|
|
424
428
|
| `llmgateway-providers/vertex-anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
425
429
|
| `llmgateway-providers/vertex-anthropic/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
|
|
426
430
|
| `llmgateway-providers/vertex-anthropic/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
@@ -61,7 +61,7 @@ for await (const chunk of stream) {
|
|
|
61
61
|
| `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.08 | $0.15 |
|
|
62
62
|
| `llmgateway/deepseek-v4-pro` | 1.1M | | | | | | $0.66 | $2 |
|
|
63
63
|
| `llmgateway/deepseek-v4.1-flash` | 1.1M | | | | | | $0.13 | $0.51 |
|
|
64
|
-
| `llmgateway/deepseek-v4.1-flash-1017` | 1.1M | | | | | | $0.
|
|
64
|
+
| `llmgateway/deepseek-v4.1-flash-1017` | 1.1M | | | | | | $0.20 | $0.80 |
|
|
65
65
|
| `llmgateway/deepseek-v4.1-flash-cyber` | 1.0M | | | | | | $0.30 | $1 |
|
|
66
66
|
| `llmgateway/fugu-max` | 1.0M | | | | | | $2 | $6 |
|
|
67
67
|
| `llmgateway/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
|
|
@@ -94,7 +94,7 @@ for await (const chunk of stream) {
|
|
|
94
94
|
| `llmgateway/glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
95
95
|
| `llmgateway/glm-5.2` | 1.0M | | | | | | $0.60 | $2 |
|
|
96
96
|
| `llmgateway/glm-5.2-fast` | 1.0M | | | | | | $2 | $7 |
|
|
97
|
-
| `llmgateway/glm-5.3` | 1.0M | | | | | | $0.
|
|
97
|
+
| `llmgateway/glm-5.3` | 1.0M | | | | | | $0.50 | $2 |
|
|
98
98
|
| `llmgateway/glm-5.3-fast` | 1.0M | | | | | | $3 | $9 |
|
|
99
99
|
| `llmgateway/glm-5.3-flash` | 1.0M | | | | | | $0.09 | $0.25 |
|
|
100
100
|
| `llmgateway/glm-5.3-flashx` | 1.0M | | | | | | $0.37 | $1 |
|
|
@@ -36,12 +36,12 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
## Models
|
|
38
38
|
|
|
39
|
-
| Model
|
|
40
|
-
|
|
|
41
|
-
| `modular/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.17 | $1 |
|
|
42
|
-
| `modular/google/gemma-4-31b-it`
|
|
43
|
-
| `modular/minimax/minimax-m3`
|
|
44
|
-
| `modular/MiniMaxAI/MiniMax-M3.1-Flash`
|
|
39
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
|
+
| ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
+
| `modular/deepseek/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.17 | $1 |
|
|
42
|
+
| `modular/google/gemma-4-31b-it` | 262K | | | | | | $0.25 | $0.65 |
|
|
43
|
+
| `modular/minimax/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
|
|
44
|
+
| `modular/MiniMaxAI/MiniMax-M3.1-Flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
45
45
|
|
|
46
46
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
47
47
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# NanoGPT
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 638 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
10
10
|
|
|
@@ -122,7 +122,7 @@ for await (const chunk of stream) {
|
|
|
122
122
|
| `nano-gpt/deepseek-chat` | 128K | | | | | | $0.10 | $0.42 |
|
|
123
123
|
| `nano-gpt/deepseek-chat-cheaper` | 128K | | | | | | $0.10 | $0.42 |
|
|
124
124
|
| `nano-gpt/deepseek-v3-0324` | 128K | | | | | | $0.20 | $0.77 |
|
|
125
|
-
| `nano-gpt/deepseek/deepseek-latest` | 1.0M | | | | | | $0.
|
|
125
|
+
| `nano-gpt/deepseek/deepseek-latest` | 1.0M | | | | | | $0.66 | $2 |
|
|
126
126
|
| `nano-gpt/deepseek/deepseek-v3.2` | 163K | | | | | | $0.21 | $0.31 |
|
|
127
127
|
| `nano-gpt/deepseek/deepseek-v3.2:thinking` | 163K | | | | | | $0.21 | $0.31 |
|
|
128
128
|
| `nano-gpt/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
@@ -134,8 +134,8 @@ for await (const chunk of stream) {
|
|
|
134
134
|
| `nano-gpt/deepseek/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.22 | $0.65 |
|
|
135
135
|
| `nano-gpt/deepseek/deepseek-v4-flash:thinking` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
136
136
|
| `nano-gpt/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.70 | $1 |
|
|
137
|
-
| `nano-gpt/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.
|
|
138
|
-
| `nano-gpt/deepseek/deepseek-v4-pro-0813:thinking` | 1.0M | | | | | | $0.
|
|
137
|
+
| `nano-gpt/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.66 | $2 |
|
|
138
|
+
| `nano-gpt/deepseek/deepseek-v4-pro-0813:thinking` | 1.0M | | | | | | $0.66 | $2 |
|
|
139
139
|
| `nano-gpt/deepseek/deepseek-v4-pro:thinking` | 1.0M | | | | | | $0.70 | $1 |
|
|
140
140
|
| `nano-gpt/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.03 | $0.13 |
|
|
141
141
|
| `nano-gpt/deepseek/deepseek-v4.1-flash-0910-uncensored` | 524K | | | | | | $0.33 | $1 |
|
|
@@ -421,7 +421,7 @@ for await (const chunk of stream) {
|
|
|
421
421
|
| `nano-gpt/openai/gpt-latest` | 1.1M | | | | | | $10 | $50 |
|
|
422
422
|
| `nano-gpt/openai/gpt-luna-latest` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
423
423
|
| `nano-gpt/openai/gpt-oss-120b` | 128K | | | | | | $0.03 | $0.15 |
|
|
424
|
-
| `nano-gpt/openai/gpt-oss-20b` | 131K | | | | | | $0.
|
|
424
|
+
| `nano-gpt/openai/gpt-oss-20b` | 131K | | | | | | $0.02 | $0.10 |
|
|
425
425
|
| `nano-gpt/openai/gpt-oss-safeguard-20b` | 131K | | | | | | $0.07 | $0.30 |
|
|
426
426
|
| `nano-gpt/openai/gpt-sol-latest` | 1.1M | | | | | | $2 | $10 |
|
|
427
427
|
| `nano-gpt/openai/gpt-terra-latest` | 1.1M | | | | | | $1 | $5 |
|
|
@@ -569,10 +569,8 @@ for await (const chunk of stream) {
|
|
|
569
569
|
| `nano-gpt/TEE/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
570
570
|
| `nano-gpt/TEE/gpt-oss-120b` | 131K | | | | | | $2 | $2 |
|
|
571
571
|
| `nano-gpt/TEE/kimi-k2.6` | 262K | | | | | | $2 | $5 |
|
|
572
|
-
| `nano-gpt/TEE/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
573
572
|
| `nano-gpt/TEE/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
574
573
|
| `nano-gpt/TEE/llama3-3-70b` | 128K | | | | | | $2 | $3 |
|
|
575
|
-
| `nano-gpt/TEE/nemotron-3.5-lightning` | 262K | | | | | | $0.08 | $0.20 |
|
|
576
574
|
| `nano-gpt/TEE/qwen2.5-vl-72b-instruct` | 66K | | | | | | $0.70 | $0.70 |
|
|
577
575
|
| `nano-gpt/TEE/qwen3.5-27b` | 262K | | | | | | $0.30 | $2 |
|
|
578
576
|
| `nano-gpt/TEE/qwen3.5-397b-a17b` | 262K | | | | | | $0.55 | $4 |
|
|
@@ -580,6 +578,7 @@ for await (const chunk of stream) {
|
|
|
580
578
|
| `nano-gpt/TEE/qwen3.6-35b-a3b` | 262K | | | | | | $0.20 | $1 |
|
|
581
579
|
| `nano-gpt/TEE/qwen3.8-27b` | 262K | | | | | | $0.40 | $3 |
|
|
582
580
|
| `nano-gpt/tencent/hy3` | 262K | | | | | | $0.07 | $0.26 |
|
|
581
|
+
| `nano-gpt/tencent/hy4` | 1.0M | | | | | | $0.46 | $1 |
|
|
583
582
|
| `nano-gpt/tencent/hy4-preview` | 1.0M | | | | | | $0.75 | $2 |
|
|
584
583
|
| `nano-gpt/TheDrummer/Anubis-70B-v1` | 66K | | | | | | $0.31 | $0.31 |
|
|
585
584
|
| `nano-gpt/TheDrummer/Anubis-70B-v1.1` | 32K | | | | | | $0.31 | $0.31 |
|
|
@@ -618,10 +617,10 @@ for await (const chunk of stream) {
|
|
|
618
617
|
| `nano-gpt/x-ai/grok-4.7` | 500K | | | | | | $2 | $6 |
|
|
619
618
|
| `nano-gpt/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
620
619
|
| `nano-gpt/x-ai/grok-latest` | 500K | | | | | | $2 | $6 |
|
|
621
|
-
| `nano-gpt/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.
|
|
620
|
+
| `nano-gpt/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.41 | $2 |
|
|
622
621
|
| `nano-gpt/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $0.49 | $0.97 |
|
|
623
622
|
| `nano-gpt/xiaomi/mimo-v2.5-pro:thinking` | 1.0M | | | | | | $0.49 | $0.97 |
|
|
624
|
-
| `nano-gpt/xiaomi/mimo-v2.5:thinking` | 1.0M | | | | | | $0.
|
|
623
|
+
| `nano-gpt/xiaomi/mimo-v2.5:thinking` | 1.0M | | | | | | $0.41 | $2 |
|
|
625
624
|
| `nano-gpt/xiaomi/mimo-v2.6-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
626
625
|
| `nano-gpt/xiaomi/mimo-v2.6-flash-abliterated` | 1.0M | | | | | | $0.50 | $2 |
|
|
627
626
|
| `nano-gpt/xiaomi/mimo-v2.6-flash-uncensored` | 1.0M | | | | | | $0.50 | $2 |
|
|
@@ -655,8 +654,8 @@ for await (const chunk of stream) {
|
|
|
655
654
|
| `nano-gpt/z-ai/glm-5:thinking` | 200K | | | | | | $0.60 | $2 |
|
|
656
655
|
| `nano-gpt/z-ai/glm-5.1` | 200K | | | | | | $0.70 | $3 |
|
|
657
656
|
| `nano-gpt/z-ai/glm-5.1:thinking` | 200K | | | | | | $0.70 | $3 |
|
|
658
|
-
| `nano-gpt/z-ai/glm-5.2` | 1.0M | | | | | | $0.
|
|
659
|
-
| `nano-gpt/z-ai/glm-5.2:thinking` | 1.0M | | | | | | $0.
|
|
657
|
+
| `nano-gpt/z-ai/glm-5.2` | 1.0M | | | | | | $0.21 | $1 |
|
|
658
|
+
| `nano-gpt/z-ai/glm-5.2:thinking` | 1.0M | | | | | | $0.21 | $1 |
|
|
660
659
|
| `nano-gpt/z-ai/glm-5.3` | 1.0M | | | | | | $0.60 | $1 |
|
|
661
660
|
| `nano-gpt/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.10 | $0.30 |
|
|
662
661
|
| `nano-gpt/z-ai/glm-5.3-flash-apex` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenCode
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 132 OpenCode 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 documentation](https://opencode.ai/v2/docs/console/models/).
|
|
10
10
|
|
|
@@ -54,6 +54,7 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `opencode/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
55
55
|
| `opencode/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
|
|
56
56
|
| `opencode/claude-sonnet-5-5` | 1.0M | | | | | | $2 | $10 |
|
|
57
|
+
| `opencode/crouton-alpha-free` | 1.0M | | | | | | — | — |
|
|
57
58
|
| `opencode/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
58
59
|
| `opencode/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
|
|
59
60
|
| `opencode/deepseek-v4.1-flash-free` | 200K | | | | | | — | — |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OVHcloud AI Endpoints
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 11 OVHcloud AI Endpoints models through Mastra's model router. Authentication is handled automatically using the `OVHCLOUD_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OVHcloud AI Endpoints documentation](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog//).
|
|
10
10
|
|
|
@@ -41,7 +41,6 @@ for await (const chunk of stream) {
|
|
|
41
41
|
| `ovhcloud/gpt-oss-120b` | 131K | | | | | | $0.09 | $0.47 |
|
|
42
42
|
| `ovhcloud/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.18 |
|
|
43
43
|
| `ovhcloud/meta-llama-3_3-70b-instruct` | 131K | | | | | | $0.74 | $0.74 |
|
|
44
|
-
| `ovhcloud/mistral-nemo-instruct-2407` | 66K | | | | | | $0.14 | $0.14 |
|
|
45
44
|
| `ovhcloud/mistral-small-3.2-24b-instruct-2506` | 131K | | | | | | $0.10 | $0.31 |
|
|
46
45
|
| `ovhcloud/qwen2.5-vl-72b-instruct` | 33K | | | | | | $1 | $1 |
|
|
47
46
|
| `ovhcloud/qwen3.5-397b-a17b` | 262K | | | | | | $0.71 | $4 |
|
|
@@ -38,14 +38,14 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
-
| `tinfoil/deepseek-v4-1-flash` | 1.0M | | | | | | $0.
|
|
41
|
+
| `tinfoil/deepseek-v4-1-flash` | 1.0M | | | | | | $0.60 | $1 |
|
|
42
42
|
| `tinfoil/gemma4-31b` | 262K | | | | | | $0.40 | $1 |
|
|
43
43
|
| `tinfoil/glm-5-3` | 1.0M | | | | | | $2 | $6 |
|
|
44
44
|
| `tinfoil/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
45
45
|
| `tinfoil/gpt-oss-safeguard-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
46
46
|
| `tinfoil/kimi-k3` | 262K | | | | | | $4 | $20 |
|
|
47
47
|
| `tinfoil/llama3-3-70b` | 131K | | | | | | $2 | $3 |
|
|
48
|
-
| `tinfoil/nomic-embed-text` | 8K | | | | | | $0.
|
|
48
|
+
| `tinfoil/nomic-embed-text` | 8K | | | | | | $0.02 | — |
|
|
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
|
# Together AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 33 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
|
|
10
10
|
|
|
@@ -41,6 +41,7 @@ for await (const chunk of stream) {
|
|
|
41
41
|
| `togetherai/meta-models/Muse-Spark-Open-816B-A42B` | 1.0M | | | | | | $1 | $4 |
|
|
42
42
|
| `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
|
|
43
43
|
| `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
44
|
+
| `togetherai/moonshotai/Kimi-K3.1-Pro` | 1.0M | | | | | | $2 | $10 |
|
|
44
45
|
| `togetherai/nvidia/NVIDIA-Nemotron-3.5-Super-VL` | 262K | | | | | | $0.15 | $0.50 |
|
|
45
46
|
| `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
46
47
|
| `togetherai/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.17 | $0.25 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# CoreWeave
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 24 CoreWeave models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [CoreWeave documentation](https://docs.wandb.ai).
|
|
10
10
|
|
|
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `wandb/deepseek-ai/DeepSeek-V4-Flash-0731` | 262K | | | | | | $0.13 | $0.28 |
|
|
43
43
|
| `wandb/deepseek-ai/DeepSeek-V4-Pro-0813` | 1.0M | | | | | | $1 | $4 |
|
|
44
44
|
| `wandb/deepseek-ai/DeepSeek-V4.1-Flash` | 1.0M | | | | | | $0.13 | $0.65 |
|
|
45
|
+
| `wandb/deepseek-ai/DeepSeek-V4.1-Flash-1017` | 1.0M | | | | | | $0.30 | $1 |
|
|
45
46
|
| `wandb/google/gemma-4-26B-A4B-it` | 262K | | | | | | $0.10 | $0.30 |
|
|
46
47
|
| `wandb/google/gemma-4-31B-it` | 262K | | | | | | $0.10 | $0.34 |
|
|
47
48
|
| `wandb/ibm-granite/granite-4.2-8b` | 131K | | | | | | $0.06 | $0.15 |
|
|
@@ -583,7 +583,7 @@ Returns an `AgentThreadSubscription` object with these members:
|
|
|
583
583
|
|
|
584
584
|
**scorers** (`MastraScorers | ({ requestContext: RequestContext }) => MastraScorers | Promise<MastraScorers>`): Scoring configuration for runtime evaluation and telemetry. Can be static or dynamically provided.
|
|
585
585
|
|
|
586
|
-
**scopes** (`string[] | ({ requestContext: RequestContext }) => string[] | Promise<string[]>`): Scopes
|
|
586
|
+
**scopes** (`string[] | ({ scopes: string[]; requestContext: RequestContext; mastra?: Mastra }) => string[] | Promise<string[]>`): Scopes the agent's runs act as, written as \<type>:\<value>. A list adds to the incoming scopes (per-call scopes, defaultOptions.scopes and the mastra__scopes request context key). A function receives the incoming scopes as scopes and returns the run's final set; it must keep every incoming resource: and thread: scope.
|
|
587
587
|
|
|
588
588
|
**memory** (`MastraMemory | ({ requestContext: RequestContext }) => MastraMemory | Promise<MastraMemory>`): Memory module used for storing and retrieving stateful context.
|
|
589
589
|
|
|
@@ -128,7 +128,7 @@ const result = await agent.generate('message for agent')
|
|
|
128
128
|
|
|
129
129
|
**options.output** (`Zod schema | JsonSchema7`): \*\*Deprecated.\*\* Use structuredOutput without a model to achieve the same thing. Defines the expected structure of the output. Can be a JSON Schema object or a Zod schema.
|
|
130
130
|
|
|
131
|
-
**options.scopes** (`string[]`): Scopes the run acts as, written as \<type>:\<value> (for example org:acme, resource:user-123, thread:conversation-123). Memory reads its resource and thread from resource: and thread: scopes. Other scopes are passed to tools and processors. Combined with the agent's scopes
|
|
131
|
+
**options.scopes** (`string[]`): Scopes the run acts as, written as \<type>:\<value> (for example org:acme, resource:user-123, thread:conversation-123). Memory reads its resource and thread from resource: and thread: scopes. Other scopes are passed to tools and processors. Combined with defaultOptions.scopes and the mastra__scopes request context key, then passed through the agent's scopes option: a list adds to them, a function replaces them. Throws if a resource: or thread: scope conflicts with another resource or thread value.
|
|
132
132
|
|
|
133
133
|
**options.memory** (`object`): Memory configuration for conversation persistence and retrieval.
|
|
134
134
|
|
|
@@ -28,7 +28,7 @@ await agent.getLLM({
|
|
|
28
28
|
|
|
29
29
|
## Returns
|
|
30
30
|
|
|
31
|
-
**llm** (`MastraLLMV1 | Promise<MastraLLMV1>`): The language model instance configured for the agent, either as a direct instance or a promise that resolves to the LLM.
|
|
31
|
+
**llm** (`MastraLLMV1 | MastraLLMVNext | Promise<MastraLLMV1 | MastraLLMVNext>`): The language model instance configured for the agent, either as a direct instance or a promise that resolves to the LLM.
|
|
32
32
|
|
|
33
33
|
## Extended usage example
|
|
34
34
|
|
|
@@ -20,7 +20,7 @@ await agent.getMetadata()
|
|
|
20
20
|
|
|
21
21
|
## Returns
|
|
22
22
|
|
|
23
|
-
**metadata** (`Record<string, unknown> | Promise<Record<string, unknown
|
|
23
|
+
**metadata** (`Record<string, unknown> | undefined | Promise<Record<string, unknown> | undefined>`): The metadata configured for the agent, or undefined if no metadata was configured. Returns either directly or as a promise that resolves to the metadata when defined as a function.
|
|
24
24
|
|
|
25
25
|
## Extended usage example
|
|
26
26
|
|
|
@@ -14,13 +14,15 @@ await agent.getModel()
|
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
**options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
|
|
17
|
+
**options** (`{ requestContext?: RequestContext; modelConfig?: DynamicArgument<MastraModelConfig | ModelWithRetries[]> | ModelFallbacks }`): Optional configuration object containing request context and an optional model override. (Default: `{}`)
|
|
18
18
|
|
|
19
19
|
**options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
|
|
20
20
|
|
|
21
|
+
**options.modelConfig** (`DynamicArgument<MastraModelConfig | ModelWithRetries[]> | ModelFallbacks`): Model configuration to resolve instead of the agent model. Can also be a function that receives the request context.
|
|
22
|
+
|
|
21
23
|
## Returns
|
|
22
24
|
|
|
23
|
-
**model** (`
|
|
25
|
+
**model** (`Promise<MastraLanguageModel | MastraLegacyLanguageModel>`): A promise that resolves to the language model configured for the agent. Always await the result.
|
|
24
26
|
|
|
25
27
|
## Extended usage example
|
|
26
28
|
|
|
@@ -54,7 +54,7 @@ interface Skill {
|
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
`source` describes where Mastra discovered the skill. Skills from a path with a `node_modules` segment are `external`, skills under `.mastra/skills` are `managed`, and all other skills, including those created with [`createSkill()`](https://mastra.ai/reference/agents/createSkill), are `local`.
|
|
57
|
+
`source` describes where Mastra discovered the skill. Skills from a path with a `node_modules` segment are `external`, skills from a path under `.mastra/skills` are `managed`, and all other skills, including those created with [`createSkill()`](https://mastra.ai/reference/agents/createSkill), are `local`.
|
|
58
58
|
|
|
59
59
|
## Merging behavior
|
|
60
60
|
|
|
@@ -20,7 +20,7 @@ await agent.listScorers()
|
|
|
20
20
|
|
|
21
21
|
## Returns
|
|
22
22
|
|
|
23
|
-
**scorers** (`
|
|
23
|
+
**scorers** (`Promise<MastraScorers>`): A promise that resolves to the scoring configuration configured for the agent.
|
|
24
24
|
|
|
25
25
|
## Extended usage example
|
|
26
26
|
|
|
@@ -20,7 +20,7 @@ await agent.listTools()
|
|
|
20
20
|
|
|
21
21
|
## Returns
|
|
22
22
|
|
|
23
|
-
**tools** (`
|
|
23
|
+
**tools** (`Promise<TTools>`): A promise that resolves to the tools configured for the agent.
|
|
24
24
|
|
|
25
25
|
## Extended usage example
|
|
26
26
|
|
|
@@ -71,8 +71,8 @@ The `Session` and `User` types are exported by the Better Auth package.
|
|
|
71
71
|
|
|
72
72
|
- `public` and `protected` accept exact paths, wildcard patterns (like `/api/*`), and path params (like `/users/:id`).
|
|
73
73
|
- For method-specific rules, use tuples like `["/api/agents", ["GET", "POST"]]`.
|
|
74
|
-
- If a route matches both `public` and `protected`, `public` wins and no auth is required.
|
|
75
|
-
- If neither matches,
|
|
74
|
+
- If a route matches both `public` and `protected`, `public` wins and no auth is required, unless the route is marked `requiresAuth: true`. Those routes still authenticate.
|
|
75
|
+
- If neither matches, a route requires auth when it's under `/api/*` (the built-in default `protected` pattern) or is a custom route registered with `registerApiRoute()` that isn't marked `requiresAuth: false`, and other paths don't require auth.
|
|
76
76
|
|
|
77
77
|
## Related
|
|
78
78
|
|
|
@@ -63,7 +63,7 @@ await slack.configure({
|
|
|
63
63
|
|
|
64
64
|
**toolApprovers** (`'requester' | 'anyone'`): Who can approve or deny tool calls. By default, only the user whose message triggered the call can respond when their identity was recorded; without a recorded requester, another channel member may respond. Set 'anyone' to allow another member of the shared Slack channel to approve or deny even when a requester was recorded. This bypasses only the requester check; the action still requires a pending approval in the same thread. (Default: `'requester'`)
|
|
65
65
|
|
|
66
|
-
**typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set false to disable, or pass a function to return custom status text per stream chunk (return
|
|
66
|
+
**typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set false to disable, or pass a function to return custom status text per stream chunk (return false, null, or undefined to leave the current status unchanged for that chunk). (Default: `true`)
|
|
67
67
|
|
|
68
68
|
**waitUntil** (`WaitUntilFn`): Returns a waitUntil for the current Slack webhook request. Required on serverless runtimes where Hono can't bridge the platform's ExecutionContext (Vercel, AWS Lambda). Without it, the invocation freezes after the 200 ack and kills the run mid-flight. Pass the bare waitUntil(promise) from your platform SDK (for example, @vercel/functions). Cloudflare Workers and Netlify users typically don't need this.
|
|
69
69
|
|
|
@@ -403,13 +403,30 @@ const scores = await mastraClient.listScoresBySpan({
|
|
|
403
403
|
})
|
|
404
404
|
```
|
|
405
405
|
|
|
406
|
+
## Creating scores
|
|
407
|
+
|
|
408
|
+
Create a score for a trace, optionally identifying a span within it:
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
const response = await mastraClient.createScore({
|
|
412
|
+
score: {
|
|
413
|
+
traceId: 'trace-123',
|
|
414
|
+
spanId: 'span-456',
|
|
415
|
+
scorerId: 'accuracy',
|
|
416
|
+
score: 0.95,
|
|
417
|
+
},
|
|
418
|
+
})
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
`createScore()` requires a nonblank `score.traceId`, with an optional `spanId`. The client generates a missing `scoreId` and ISO `timestamp` once per call and preserves them across retries. Supply these fields to reuse an existing identity. See [signal write options](#signal-write-options) for context resolution and retry behavior.
|
|
422
|
+
|
|
406
423
|
## Feedback
|
|
407
424
|
|
|
408
|
-
Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections through the
|
|
425
|
+
Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections through the configured API server. Create methods support OSS and Platform. Full replacement uses Platform's PUT endpoint. See the [feedback guide](https://mastra.ai/docs/observability/feedback) for examples and the [feedback reference](https://mastra.ai/reference/observability/feedback) for full schemas.
|
|
409
426
|
|
|
410
427
|
### Creating feedback
|
|
411
428
|
|
|
412
|
-
Create a feedback record
|
|
429
|
+
Create a feedback record for a trace, optionally identifying a span within it:
|
|
413
430
|
|
|
414
431
|
```typescript
|
|
415
432
|
const response = await mastraClient.createFeedback({
|
|
@@ -424,6 +441,54 @@ const response = await mastraClient.createFeedback({
|
|
|
424
441
|
})
|
|
425
442
|
```
|
|
426
443
|
|
|
444
|
+
`createFeedback()` requires a nonblank `feedback.traceId`, with an optional `spanId`. The client generates a missing `feedbackId` and ISO `timestamp` once per call and preserves them across retries. Set `feedbackUserId` to identify the feedback author. `userId` identifies the span's user. An authenticated OSS user takes precedence over a submitted feedback author.
|
|
445
|
+
|
|
446
|
+
### Signal write options
|
|
447
|
+
|
|
448
|
+
Both create methods accept an optional top-level `contextMode` alongside the `feedback` or `score` wrapper:
|
|
449
|
+
|
|
450
|
+
- `"provided"` uses the record's flattened context fields without looking up spans. Missing context fields aren't enriched.
|
|
451
|
+
- `"resolve"` derives context from the stored root and optional target span. Root tags are inherited. Record metadata overrides matching stored metadata keys. A missing root returns `TRACE_NOT_FOUND`. A missing target returns `SPAN_NOT_FOUND`.
|
|
452
|
+
|
|
453
|
+
Omitting `contextMode` uses the server's default: `"provided"` on OSS and `"resolve"` on Platform. The client preserves omission. Select a mode explicitly when the same behavior is required on both servers. On OSS, each configured trusted scope field overrides caller input. In provided mode, other context fields remain caller-supplied. For example, a trusted organization ID overrides `organizationId` but doesn't clear `resourceId` when no trusted resource scope is configured.
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
const result = await mastraClient.createFeedback({
|
|
457
|
+
contextMode: 'resolve',
|
|
458
|
+
feedback: {
|
|
459
|
+
traceId: 'trace-123',
|
|
460
|
+
feedbackUserId: 'reviewer-1',
|
|
461
|
+
feedbackType: 'thumbs',
|
|
462
|
+
value: 1,
|
|
463
|
+
},
|
|
464
|
+
})
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Use `retries` and `anchorRetryTimeoutMs` in the optional second argument to control retries. Network and server errors use the client's transport retry settings. Only 404s with `TRACE_NOT_FOUND` or `SPAN_NOT_FOUND` receive anchor retries, for at most 30 seconds after the first such response. Set `anchorRetryTimeoutMs` to a shorter window or `0` to disable them. Other 404s and authentication or validation errors are terminal.
|
|
468
|
+
|
|
469
|
+
Create responses contain `success` and optional `data` with the generated or supplied `feedbackId`/`scoreId`, `traceId`, nullable `spanId`, and normalized UTC `timestamp`. The client also accepts success-only responses. Platform success confirms publication. The record may not be immediately visible to reads. Direct OSS HTTP callers can omit the ID and timestamp to have the server generate them.
|
|
470
|
+
|
|
471
|
+
Explicit modes require server support. Older servers may ignore `contextMode`. Deploy Platform's supplied-context support before sending `"provided"` there.
|
|
472
|
+
|
|
473
|
+
### Replacing feedback on Platform
|
|
474
|
+
|
|
475
|
+
`replaceFeedback()` sends a full replacement to `PUT /api/observability/feedback/:feedbackId`. Include the original `feedbackId`, `traceId`, and normalized `timestamp`, along with all feedback fields to retain. This method targets Platform. OSS server doesn't implement this replacement endpoint.
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
await mastraClient.replaceFeedback({
|
|
479
|
+
feedback: {
|
|
480
|
+
feedbackId: 'feedback-1',
|
|
481
|
+
traceId: 'trace-123',
|
|
482
|
+
timestamp: '2026-01-01T00:00:00.123Z',
|
|
483
|
+
feedbackType: 'thumbs',
|
|
484
|
+
value: -1,
|
|
485
|
+
feedbackUserId: 'reviewer-1',
|
|
486
|
+
},
|
|
487
|
+
})
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Use the normalized timestamp from the create response's `data` when available. A changed timestamp identifies a different Platform record. The client preserves the replacement body across retries, but each accepted PUT retry is a new replacement and can supersede another edit. Pass `{ retries: 0, anchorRetryTimeoutMs: 0 }` as the second argument to disable automatic retries.
|
|
491
|
+
|
|
427
492
|
### Deleting feedback and scores
|
|
428
493
|
|
|
429
494
|
Delete feedback or score records by id. Deletion is idempotent, so missing ids are ignored. Each request accepts at most 1,000 `feedbackIds` or 1,000 `scoreIds`. Optional `organizationId` and `resourceId` fields restrict each deletion to records with matching scope fields:
|
|
@@ -74,12 +74,16 @@ Each value in the `providers` record form is `true`, `false`, or a `ToolsProvide
|
|
|
74
74
|
|
|
75
75
|
### ConnectClientOptions
|
|
76
76
|
|
|
77
|
-
Every field falls back to an environment variable, so a fully env-configured app can pass nothing.
|
|
77
|
+
Every field except `fetch` and `resourceId` falls back to an environment variable. `fetch` defaults to `globalThis.fetch`, and `resourceId` has no fallback, so a fully env-configured app that doesn't scope calls to a resource can pass nothing.
|
|
78
78
|
|
|
79
79
|
**accessToken** (`string`): Platform access token. Falls back to MASTRA_PLATFORM_ACCESS_TOKEN, then MASTRA_PLATFORM_SECRET_KEY.
|
|
80
80
|
|
|
81
81
|
**orgId** (`string`): Organization ID. Falls back to MASTRA_ORG_ID; sent as the x-organization-id header when present.
|
|
82
82
|
|
|
83
|
+
**projectId** (`string`): Project ID, sent as the x-mastra-project-id header so the platform can attribute proxy activity to the project. Falls back to MASTRA_PROJECT_ID; the header is omitted when absent.
|
|
84
|
+
|
|
85
|
+
**resourceId** (`string`): End-user resource key the client acts for, sent as the x-mastra-resource-id header. Connection listings are scoped to global connections plus that resource's connections. Has no environment variable fallback.
|
|
86
|
+
|
|
83
87
|
**baseUrl** (`string`): Connect API base URL. Falls back to MASTRA_INTEGRATIONS_API_URL, then the regional default from MASTRA_PLATFORM_REGION (us or eu), then https\://integrations.mastra.ai.
|
|
84
88
|
|
|
85
89
|
**fetch** (`typeof globalThis.fetch`): Fetch implementation, for testing or custom transports. Defaults to globalThis.fetch.
|
|
@@ -47,7 +47,7 @@ const result = await run.start({ inputData: { name: 'Ada' } })
|
|
|
47
47
|
|
|
48
48
|
## Returns
|
|
49
49
|
|
|
50
|
-
A promise that resolves once the definition is validated
|
|
50
|
+
A promise that resolves once the definition is validated and registered, and persisted when storage provides a `workflowDefinitions` store.
|
|
51
51
|
|
|
52
52
|
## Behavior
|
|
53
53
|
|
|
@@ -23,7 +23,7 @@ mastra.addGateway(new MyCustomGateway())
|
|
|
23
23
|
|
|
24
24
|
## Parameters
|
|
25
25
|
|
|
26
|
-
**gateway** (`
|
|
26
|
+
**gateway** (`MastraModelGatewayInterface`): The gateway instance to add
|
|
27
27
|
|
|
28
28
|
**key** (`string`): Optional registration key. If not provided, uses gateway.getId()
|
|
29
29
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Mastra.getAgent()
|
|
6
6
|
|
|
7
|
-
The `.getAgent()` method is used to retrieve an agent. The method accepts
|
|
7
|
+
The `.getAgent()` method is used to retrieve an agent. The method accepts the agent's name and an optional version selector. Passing a version selector returns a promise.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -16,9 +16,11 @@ mastra.getAgent('testAgent')
|
|
|
16
16
|
|
|
17
17
|
**name** (`TAgentName extends keyof TAgents`): The name of the agent to retrieve. Must be a valid agent name that exists in the Mastra configuration.
|
|
18
18
|
|
|
19
|
+
**version** (`{ versionId: string } | { status?: 'draft' | 'published' }`): Selects a stored version of the agent. When provided, the method returns a promise.
|
|
20
|
+
|
|
19
21
|
## Returns
|
|
20
22
|
|
|
21
|
-
**agent** (`TAgents[TAgentName]
|
|
23
|
+
**agent** (`TAgents[TAgentName] | Promise<TAgents[TAgentName]>`): The agent instance with the specified name, or a promise that resolves to it when version is provided. Throws an error if the agent is not found.
|
|
22
24
|
|
|
23
25
|
## Related
|
|
24
26
|
|
|
@@ -31,7 +31,7 @@ This method doesn't accept any parameters.
|
|
|
31
31
|
|
|
32
32
|
## Returns
|
|
33
33
|
|
|
34
|
-
**editor** (`
|
|
34
|
+
**editor** (`IMastraEditor | undefined`): The configured editor instance, or undefined if no editor has been configured.
|
|
35
35
|
|
|
36
36
|
## Related
|
|
37
37
|
|
|
@@ -20,11 +20,11 @@ const thread = await memory.createThread({
|
|
|
20
20
|
|
|
21
21
|
## Parameters
|
|
22
22
|
|
|
23
|
-
**
|
|
23
|
+
**name** (`TMemoryName extends keyof TMemory`): The registry key of the memory instance to retrieve. Must match a key used when registering memory in the Mastra constructor.
|
|
24
24
|
|
|
25
25
|
## Returns
|
|
26
26
|
|
|
27
|
-
**memory** (`TMemory[
|
|
27
|
+
**memory** (`TMemory[TMemoryName]`): The memory instance with the specified key. Throws an error if the memory is not found.
|
|
28
28
|
|
|
29
29
|
## Example: Registering and retrieving memory
|
|
30
30
|
|
|
@@ -18,7 +18,7 @@ This method doesn't accept any parameters.
|
|
|
18
18
|
|
|
19
19
|
## Returns
|
|
20
20
|
|
|
21
|
-
**storage** (`MastraCompositeStore | undefined`): The configured storage instance,
|
|
21
|
+
**storage** (`MastraCompositeStore | undefined`): The configured storage instance. When no storage is configured, Mastra uses a default InMemoryStore, which this method returns.
|
|
22
22
|
|
|
23
23
|
## Related
|
|
24
24
|
|