@mastra/mcp-docs-server 1.3.2-alpha.1 → 1.3.2-alpha.4
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/evals/evals-with-memory.md +3 -1
- package/.docs/docs/evals/experiments.md +30 -10
- package/.docs/integrations/sandboxes/modal.md +40 -0
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/openrouter.md +1 -3
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/above.md +2 -2
- package/.docs/models/providers/cerebras.md +1 -1
- package/.docs/models/providers/cortecs.md +3 -3
- package/.docs/models/providers/edenai.md +2 -2
- package/.docs/models/providers/kilo.md +8 -10
- package/.docs/models/providers/melious.md +1 -4
- package/.docs/models/providers/nano-gpt.md +2 -1
- package/.docs/models/providers/opencode.md +2 -2
- package/.docs/models/providers/zenmux.md +8 -1
- package/.docs/reference/channels/channel-provider.md +20 -1
- package/.docs/reference/processors/agents-md-injector.md +2 -0
- package/.docs/reference/workspace/workspace-class.md +14 -1
- package/package.json +4 -4
|
@@ -90,7 +90,9 @@ const average = scores.reduce((a, b) => a + b, 0) / scores.length
|
|
|
90
90
|
|
|
91
91
|
## Dataset experiments with an inline task
|
|
92
92
|
|
|
93
|
-
`dataset.startExperiment(
|
|
93
|
+
`dataset.startExperiment()` accepts `targetType` and `targetId` for a registered target, or an inline `task` function. For a registered memory-enabled agent, the runner creates a fresh thread per item by default. See [memory-enabled experiment targets](https://mastra.ai/docs/evals/experiments) for resource isolation and request context options.
|
|
94
|
+
|
|
95
|
+
To choose each item's thread explicitly through `agent.generate()`, use an inline `task` and store `{ threadId, resourceId }` in each item's `metadata`. The scorer pipeline still runs as normal.
|
|
94
96
|
|
|
95
97
|
```typescript
|
|
96
98
|
import { randomUUID } from 'node:crypto'
|
|
@@ -53,7 +53,9 @@ You can also delete experiments with the [Core API](https://mastra.ai/reference/
|
|
|
53
53
|
|
|
54
54
|
## Experiment targets
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Use `targetType` and `targetId` to select an agent, workflow, or scorer registered on your Mastra instance. The target processes each dataset item. The experiment's `scorers` evaluate the target's output afterward.
|
|
57
|
+
|
|
58
|
+
For custom execution, pass an inline `task` function instead. See [dataset experiments with an inline task](https://mastra.ai/docs/evals/evals-with-memory) for an example that controls each item's memory thread.
|
|
57
59
|
|
|
58
60
|
### Registered agent
|
|
59
61
|
|
|
@@ -68,25 +70,27 @@ const summary = await dataset.startExperiment({
|
|
|
68
70
|
})
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
Each item's `input` is passed directly to
|
|
73
|
+
Each item's `input` is passed directly to the agent. Use a supported message format, such as a prompt string, a message object, or an array of messages. See the [`agent.generate()` reference](https://mastra.ai/reference/agents/generate) for accepted inputs.
|
|
72
74
|
|
|
73
75
|
#### Memory-enabled agents
|
|
74
76
|
|
|
75
|
-
When the target agent has its own memory
|
|
77
|
+
When the target agent has its own memory, the experiment runner injects a fresh memory thread for each item and retry. Without a resource id in the request context, each thread gets an isolated, experiment-owned resource.
|
|
78
|
+
|
|
79
|
+
To run against an existing resource, set `MASTRA_RESOURCE_ID_KEY` in the experiment's `requestContext` or in an item's `requestContext`. Item values override experiment values. The runner still creates a fresh thread for each item and retry, but all threads using the same resource id share that resource's memory.
|
|
76
80
|
|
|
77
81
|
Injected threads are tagged so you can map them back to the run: thread metadata carries the `experimentId` and the dataset item's id as `experimentItemId`. No thread title is generated for them.
|
|
78
82
|
|
|
79
|
-
|
|
83
|
+
When items share a resource, resource-scoped memory features can read and write the same state:
|
|
80
84
|
|
|
81
|
-
- Resource-scoped working memory updates persist to the resource
|
|
85
|
+
- Resource-scoped working memory updates persist to the resource and can affect other items. Items run concurrently by default, so don't rely on an execution order.
|
|
82
86
|
- Resource-scoped semantic recall can surface the resource's prior conversations to the experiment, and experiment transcripts become recallable in that resource's later conversations.
|
|
83
87
|
|
|
84
88
|
Use this approach to evaluate an agent against a real user's accumulated context. To keep experiment runs from touching real user state, use a dedicated evaluation resource id instead.
|
|
85
89
|
|
|
86
90
|
Thread injection is skipped in the following cases:
|
|
87
91
|
|
|
88
|
-
- If the request context
|
|
89
|
-
- If the agent has no memory, or the request context
|
|
92
|
+
- If the request context sets `MASTRA_THREAD_ID_KEY`, the runner uses that thread as-is. Items and retries using the same thread id share a conversation.
|
|
93
|
+
- If the agent has no memory, or the request context explicitly sets the resource id to an empty string or `null`, the runner skips thread injection.
|
|
90
94
|
|
|
91
95
|
### Registered workflow
|
|
92
96
|
|
|
@@ -101,13 +105,24 @@ const summary = await dataset.startExperiment({
|
|
|
101
105
|
})
|
|
102
106
|
```
|
|
103
107
|
|
|
104
|
-
The workflow receives each item's `input` as
|
|
108
|
+
The workflow receives each item's `input` as `inputData` in `run.start()`. Structure the input to match the workflow's input schema.
|
|
105
109
|
|
|
106
110
|
### Registered scorer
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
Use a scorer as the target to evaluate the judge itself. The runner calls `scorer.run(item.input)`, so the dataset item's `input` must contain the full payload the scorer expects.
|
|
113
|
+
|
|
114
|
+
This example assumes a registered `accuracy` scorer that accepts string `input`, `output`, and `groundTruth` fields. Adapt those fields to your scorer's expected shape:
|
|
109
115
|
|
|
110
116
|
```typescript
|
|
117
|
+
await dataset.addItem({
|
|
118
|
+
input: {
|
|
119
|
+
input: 'What is the capital of France?',
|
|
120
|
+
output: 'Paris',
|
|
121
|
+
groundTruth: 'Paris',
|
|
122
|
+
},
|
|
123
|
+
groundTruth: { score: 1 },
|
|
124
|
+
})
|
|
125
|
+
|
|
111
126
|
const summary = await dataset.startExperiment({
|
|
112
127
|
name: 'judge-accuracy-eval',
|
|
113
128
|
targetType: 'scorer',
|
|
@@ -115,7 +130,12 @@ const summary = await dataset.startExperiment({
|
|
|
115
130
|
})
|
|
116
131
|
```
|
|
117
132
|
|
|
118
|
-
The
|
|
133
|
+
The two `groundTruth` fields serve different purposes:
|
|
134
|
+
|
|
135
|
+
- `input.groundTruth` is the reference answer passed to the judge: `'Paris'`.
|
|
136
|
+
- The top-level `groundTruth` is the expected result from the judge: `{ score: 1 }`. It isn't passed to the target scorer.
|
|
137
|
+
|
|
138
|
+
The target's output contains its `score` and `reason`. To evaluate that output against the top-level ground truth, add another scorer through the experiment's `scorers` option. Without an additional scorer, the experiment records the judge's output but doesn't score its agreement with the expected result.
|
|
119
139
|
|
|
120
140
|
## Scoring results
|
|
121
141
|
|
|
@@ -100,6 +100,8 @@ Get your credentials from the [Modal dashboard](https://modal.com/settings/token
|
|
|
100
100
|
|
|
101
101
|
**onStart** (`function`): Lifecycle hook called after the sandbox reaches running status.
|
|
102
102
|
|
|
103
|
+
**volumes** (`Record<string, Volume>`): Modal Volumes to mount into the sandbox, keyed by absolute mount path. The working directory must not be at or inside a mount path.
|
|
104
|
+
|
|
103
105
|
**onStop** (`function`): Lifecycle hook called before the sandbox stops.
|
|
104
106
|
|
|
105
107
|
**onDestroy** (`function`): Lifecycle hook called before the sandbox is destroyed.
|
|
@@ -137,6 +139,44 @@ await sandbox._stop()
|
|
|
137
139
|
await sandbox._start()
|
|
138
140
|
```
|
|
139
141
|
|
|
142
|
+
## Volumes and persistent files
|
|
143
|
+
|
|
144
|
+
Mount [Modal Volumes](https://modal.com/docs/guide/volumes) with the `volumes` option, then use `ModalFilesystem` to expose a mounted path to the agent's workspace file tools. Files written under the mount persist across sandbox restarts.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { Workspace } from '@mastra/core/workspace'
|
|
148
|
+
import { ModalFilesystem, ModalSandbox } from '@mastra/modal'
|
|
149
|
+
import { ModalClient } from 'modal'
|
|
150
|
+
|
|
151
|
+
const modal = new ModalClient()
|
|
152
|
+
const privateVolume = await modal.volumes.fromName('agent-user-123', { createIfMissing: true })
|
|
153
|
+
const teamVolume = await modal.volumes.fromName('agent-team', { createIfMissing: true })
|
|
154
|
+
|
|
155
|
+
const sandbox = new ModalSandbox({
|
|
156
|
+
id: 'agent-sandbox',
|
|
157
|
+
workingDirectory: '/workspace',
|
|
158
|
+
volumes: {
|
|
159
|
+
'/mnt/agent': privateVolume,
|
|
160
|
+
'/mnt/team': teamVolume,
|
|
161
|
+
},
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
const workspace = new Workspace({
|
|
165
|
+
sandbox,
|
|
166
|
+
filesystem: new ModalFilesystem({ sandbox, basePath: '/mnt/agent' }),
|
|
167
|
+
})
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`ModalFilesystem` runs file operations inside the sandbox and confines all paths to `basePath`. Set `readOnly: true` to reject writes.
|
|
171
|
+
|
|
172
|
+
Writes made by other sandboxes to the same Volume are only visible after a reload. Call `reloadVolumes()` on a long-lived sandbox to pick them up:
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
await sandbox.reloadVolumes()
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
> **Note:** Keep the working directory outside every Volume mount (for example `/workspace`). Modal can't reload a Volume that is the current working directory, so `ModalSandbox` throws if `workingDirectory` is at or inside a mount path.
|
|
179
|
+
|
|
140
180
|
## Background processes
|
|
141
181
|
|
|
142
182
|
`ModalSandbox` includes a built-in process manager for spawning and managing background processes. Each `spawn()` call creates a new `ContainerProcess` via the Modal SDK's `Sandbox.exec()` API.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Netlify
|
|
6
6
|
|
|
7
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
7
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 270 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
10
10
|
|
|
@@ -229,6 +229,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
229
229
|
| `openrouter/openrouter/free` |
|
|
230
230
|
| `openrouter/openrouter/pareto-code` |
|
|
231
231
|
| `openrouter/perceptron/perceptron-mk1` |
|
|
232
|
+
| `openrouter/perceptron/perceptron-mk1.5` |
|
|
232
233
|
| `openrouter/perplexity/sonar` |
|
|
233
234
|
| `openrouter/perplexity/sonar-deep-research` |
|
|
234
235
|
| `openrouter/perplexity/sonar-pro` |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenRouter
|
|
6
6
|
|
|
7
|
-
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
7
|
+
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 385 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
10
10
|
|
|
@@ -214,8 +214,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
214
214
|
| `moonshotai/kimi-k3` |
|
|
215
215
|
| `morph/morph-v3-fast` |
|
|
216
216
|
| `morph/morph-v3-large` |
|
|
217
|
-
| `nex-agi/nex-n2.5-mini:free` |
|
|
218
|
-
| `nex-agi/nex-n2.5-pro:free` |
|
|
219
217
|
| `nousresearch/hermes-3-llama-3.1-405b` |
|
|
220
218
|
| `nousresearch/hermes-3-llama-3.1-70b` |
|
|
221
219
|
| `nousresearch/hermes-4-405b` |
|
package/.docs/models/index.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Model Providers
|
|
6
6
|
|
|
7
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
7
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 7628 models from 210 providers through a single API.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# above.dev
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 10 above.dev models through Mastra's model router. Authentication is handled automatically using the `ABOVE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [above.dev documentation](https://above.dev/docs).
|
|
10
10
|
|
|
@@ -38,8 +38,8 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
-
| `above/deepseek-v4-flash` | 1.0M | | | | | | $0.17 | $0.66 |
|
|
42
41
|
| `above/deepseek-v4-pro` | 1.0M | | | | | | $0.73 | $2 |
|
|
42
|
+
| `above/deepseek-v4.1-flash` | 1.0M | | | | | | $0.17 | $0.66 |
|
|
43
43
|
| `above/glm-5.2` | 1.0M | | | | | | $2 | $5 |
|
|
44
44
|
| `above/glm-5.2-fast` | 1.0M | | | | | | $2 | $7 |
|
|
45
45
|
| `above/glm-5.3-flash` | 1.0M | | | | | | $0.17 | $0.55 |
|
|
@@ -37,7 +37,7 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ----------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `cerebras/gpt-oss-120b` | 131K | | | | | | $0.35 | $0.75 |
|
|
40
|
-
| `cerebras/qwen-3.8-27b` |
|
|
40
|
+
| `cerebras/qwen-3.8-27b` | 131K | | | | | | $0.99 | $1 |
|
|
41
41
|
|
|
42
42
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
43
43
|
|
|
@@ -56,7 +56,7 @@ for await (const chunk of stream) {
|
|
|
56
56
|
| `cortecs/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.09 | $0.17 |
|
|
57
57
|
| `cortecs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
58
58
|
| `cortecs/deepseek-v4-pro-0813` | 1.0M | | | | | | $2 | $4 |
|
|
59
|
-
| `cortecs/deepseek-v4.1-flash` | 1.0M | | | | | | $0.
|
|
59
|
+
| `cortecs/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
|
|
60
60
|
| `cortecs/devstral-2512` | 256K | | | | | | $0.48 | $2 |
|
|
61
61
|
| `cortecs/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $2 |
|
|
62
62
|
| `cortecs/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
@@ -107,7 +107,7 @@ for await (const chunk of stream) {
|
|
|
107
107
|
| `cortecs/minimax-m2.1` | 196K | | | | | | $0.36 | $1 |
|
|
108
108
|
| `cortecs/minimax-m2.5` | 196K | | | | | | $0.30 | $1 |
|
|
109
109
|
| `cortecs/minimax-m2.7` | 197K | | | | | | $0.67 | $3 |
|
|
110
|
-
| `cortecs/minimax-m3` | 1.0M | | | | | | $0.
|
|
110
|
+
| `cortecs/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
|
|
111
111
|
| `cortecs/ministral-14b-2512` | 256K | | | | | | $0.24 | $0.24 |
|
|
112
112
|
| `cortecs/ministral-3b-2512` | 256K | | | | | | $0.12 | $0.12 |
|
|
113
113
|
| `cortecs/ministral-8b-2512` | 256K | | | | | | $0.18 | $0.18 |
|
|
@@ -142,7 +142,7 @@ for await (const chunk of stream) {
|
|
|
142
142
|
| `cortecs/qwen3.6-27b` | 262K | | | | | | $0.45 | $3 |
|
|
143
143
|
| `cortecs/qwen3.6-35b-a3b` | 262K | | | | | | $0.17 | $0.56 |
|
|
144
144
|
| `cortecs/qwen3.8-2.4t-a95b` | 262K | | | | | | $3 | $6 |
|
|
145
|
-
| `cortecs/qwen3.8-27b` |
|
|
145
|
+
| `cortecs/qwen3.8-27b` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
146
146
|
| `cortecs/qwen3.8-flash-next` | 262K | | | | | | $0.20 | $0.50 |
|
|
147
147
|
| `cortecs/qwen3guard-gen-0.6b` | 32K | | | | | | — | — |
|
|
148
148
|
| `cortecs/qwen3guard-gen-8b` | 32K | | | | | | — | — |
|
|
@@ -164,7 +164,7 @@ for await (const chunk of stream) {
|
|
|
164
164
|
| `edenai/groq/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
165
165
|
| `edenai/groq/openai/gpt-oss-20b` | 131K | | | | | | $0.07 | $0.30 |
|
|
166
166
|
| `edenai/groq/openai/gpt-oss-safeguard-20b` | 131K | | | | | | $0.07 | $0.30 |
|
|
167
|
-
| `edenai/infomaniak/mistralai/Ministral-3-14B-Instruct-2512` | 100K | | | | | | $0.34 | $0.
|
|
167
|
+
| `edenai/infomaniak/mistralai/Ministral-3-14B-Instruct-2512` | 100K | | | | | | $0.34 | $0.46 |
|
|
168
168
|
| `edenai/ionos/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.74 | $0.74 |
|
|
169
169
|
| `edenai/ionos/openai/gpt-oss-120b` | 131K | | | | | | $0.17 | $0.74 |
|
|
170
170
|
| `edenai/minimax/MiniMax-M2` | 205K | | | | | | $0.30 | $1 |
|
|
@@ -265,7 +265,7 @@ for await (const chunk of stream) {
|
|
|
265
265
|
| `edenai/qwen/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
|
|
266
266
|
| `edenai/qwen/qwen3.8-max-0902` | 1.0M | | | | | | $2 | $6 |
|
|
267
267
|
| `edenai/qwen/qwq-plus` | 131K | | | | | | $0.80 | $2 |
|
|
268
|
-
| `edenai/scaleway/deepseek-v4-flash-0731` | 256K | | | | | | $0.
|
|
268
|
+
| `edenai/scaleway/deepseek-v4-flash-0731` | 256K | | | | | | $0.46 | $0.91 |
|
|
269
269
|
| `edenai/scaleway/gemma-3-27b-it` | 40K | | | | | | $0.29 | $0.57 |
|
|
270
270
|
| `edenai/scaleway/gpt-oss-120b` | 128K | | | | | | $0.17 | $0.68 |
|
|
271
271
|
| `edenai/scaleway/llama-3.3-70b-instruct` | 128K | | | | | | $1 | $1 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Kilo Gateway
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 392 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Kilo Gateway documentation](https://kilo.ai).
|
|
10
10
|
|
|
@@ -42,8 +42,8 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `kilo/~anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
|
|
43
43
|
| `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $4 | $20 |
|
|
44
44
|
| `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
45
|
-
| `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.
|
|
46
|
-
| `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.
|
|
45
|
+
| `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.07 | $0.30 |
|
|
46
|
+
| `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.25 | $2 |
|
|
47
47
|
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.03 | $0.32 |
|
|
48
48
|
| `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
|
|
49
49
|
| `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
@@ -153,7 +153,7 @@ for await (const chunk of stream) {
|
|
|
153
153
|
| `kilo/inclusionai/ling-3.0-flash-fin` | 262K | | | | | | $0.06 | $0.18 |
|
|
154
154
|
| `kilo/inclusionai/ling-3.0-flash-fin:free` | 262K | | | | | | — | — |
|
|
155
155
|
| `kilo/inclusionai/ling-3.0-flash-sante:free` | 262K | | | | | | — | — |
|
|
156
|
-
| `kilo/inclusionai/ling-3.0-flash-vl` |
|
|
156
|
+
| `kilo/inclusionai/ling-3.0-flash-vl` | 262K | | | | | | $0.07 | $0.22 |
|
|
157
157
|
| `kilo/inference-net/schematron-v2-small` | 128K | | | | | | $0.05 | $0.23 |
|
|
158
158
|
| `kilo/inference-net/schematron-v2-turbo` | 128K | | | | | | $0.03 | $0.15 |
|
|
159
159
|
| `kilo/kilo-auto/balanced` | 1.0M | | | | | | $0.33 | $2 |
|
|
@@ -217,8 +217,6 @@ for await (const chunk of stream) {
|
|
|
217
217
|
| `kilo/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
218
218
|
| `kilo/morph/morph-v3-fast` | 82K | | | | | | $0.80 | $1 |
|
|
219
219
|
| `kilo/morph/morph-v3-large` | 262K | | | | | | $0.90 | $2 |
|
|
220
|
-
| `kilo/nex-agi/nex-n2.5-mini:free` | 262K | | | | | | — | — |
|
|
221
|
-
| `kilo/nex-agi/nex-n2.5-pro:free` | 262K | | | | | | — | — |
|
|
222
220
|
| `kilo/nousresearch/hermes-3-llama-3.1-405b` | 131K | | | | | | $1 | $1 |
|
|
223
221
|
| `kilo/nousresearch/hermes-3-llama-3.1-70b` | 131K | | | | | | $0.70 | $0.70 |
|
|
224
222
|
| `kilo/nousresearch/hermes-4-405b` | 131K | | | | | | $1 | $3 |
|
|
@@ -336,7 +334,7 @@ for await (const chunk of stream) {
|
|
|
336
334
|
| `kilo/qwen/qwen3-next-80b-a3b-thinking` | 262K | | | | | | $0.15 | $1 |
|
|
337
335
|
| `kilo/qwen/qwen3-vl-235b-a22b-instruct` | 131K | | | | | | $0.26 | $1 |
|
|
338
336
|
| `kilo/qwen/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.40 | $4 |
|
|
339
|
-
| `kilo/qwen/qwen3-vl-30b-a3b-instruct` |
|
|
337
|
+
| `kilo/qwen/qwen3-vl-30b-a3b-instruct` | 262K | | | | | | $0.13 | $0.52 |
|
|
340
338
|
| `kilo/qwen/qwen3-vl-30b-a3b-thinking` | 131K | | | | | | $0.20 | $2 |
|
|
341
339
|
| `kilo/qwen/qwen3-vl-32b-instruct` | 131K | | | | | | $0.10 | $0.42 |
|
|
342
340
|
| `kilo/qwen/qwen3-vl-8b-instruct` | 131K | | | | | | $0.12 | $0.46 |
|
|
@@ -420,13 +418,13 @@ for await (const chunk of stream) {
|
|
|
420
418
|
| `kilo/z-ai/glm-4.5v` | 66K | | | | | | $0.60 | $2 |
|
|
421
419
|
| `kilo/z-ai/glm-4.6` | 198K | | | | | | $0.43 | $2 |
|
|
422
420
|
| `kilo/z-ai/glm-4.6v` | 131K | | | | | | $0.30 | $0.90 |
|
|
423
|
-
| `kilo/z-ai/glm-4.7` | 203K | | | | | | $0.
|
|
421
|
+
| `kilo/z-ai/glm-4.7` | 203K | | | | | | $0.60 | $2 |
|
|
424
422
|
| `kilo/z-ai/glm-4.7-flash` | 131K | | | | | | $0.06 | $0.40 |
|
|
425
423
|
| `kilo/z-ai/glm-5` | 198K | | | | | | $0.60 | $2 |
|
|
426
424
|
| `kilo/z-ai/glm-5-turbo` | 203K | | | | | | $1 | $4 |
|
|
427
|
-
| `kilo/z-ai/glm-5.1` |
|
|
425
|
+
| `kilo/z-ai/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
428
426
|
| `kilo/z-ai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
429
|
-
| `kilo/z-ai/glm-5.2:free` |
|
|
427
|
+
| `kilo/z-ai/glm-5.2:free` | 131K | | | | | | — | — |
|
|
430
428
|
| `kilo/z-ai/glm-5.3` | 1.0M | | | | | | $1 | $4 |
|
|
431
429
|
| `kilo/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
432
430
|
| `kilo/z-ai/glm-5.3-flashx` | 1.0M | | | | | | $0.37 | $1 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Melious
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 12 Melious models through Mastra's model router. Authentication is handled automatically using the `MELIOUS_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Melious documentation](https://melious.ai/docs/reference/models).
|
|
10
10
|
|
|
@@ -41,12 +41,9 @@ for await (const chunk of stream) {
|
|
|
41
41
|
| `melious/deepseek-r1-0528` | 164K | | | | | | $0.70 | $3 |
|
|
42
42
|
| `melious/deepseek-v3.2` | 164K | | | | | | $0.35 | $0.58 |
|
|
43
43
|
| `melious/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.12 | $0.29 |
|
|
44
|
-
| `melious/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
|
|
45
|
-
| `melious/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $3 |
|
|
46
44
|
| `melious/deepseek-v4.1-flash` | 1.0M | | | | | | $0.23 | $1 |
|
|
47
45
|
| `melious/glm-5` | 203K | | | | | | $1 | $3 |
|
|
48
46
|
| `melious/glm-5.1` | 203K | | | | | | $2 | $5 |
|
|
49
|
-
| `melious/glm-5.2` | 1.0M | | | | | | $1 | $5 |
|
|
50
47
|
| `melious/glm-5.3` | 1.0M | | | | | | $1 | $3 |
|
|
51
48
|
| `melious/glm-5.3-flash` | 1.0M | | | | | | $0.12 | $0.46 |
|
|
52
49
|
| `melious/kimi-k2.5` | 262K | | | | | | $0.58 | $3 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# NanoGPT
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 593 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
|
|
|
@@ -592,6 +592,7 @@ for await (const chunk of stream) {
|
|
|
592
592
|
| `nano-gpt/xiaomi/mimo-v2.5-pro:thinking` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
593
593
|
| `nano-gpt/xiaomi/mimo-v2.5:thinking` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
594
594
|
| `nano-gpt/xiaomi/mimo-v2.6-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
595
|
+
| `nano-gpt/xiaomi/mimo-v2.6-flash-uncensored` | 1.0M | | | | | | $0.50 | $2 |
|
|
595
596
|
| `nano-gpt/xiaomi/mimo-v2.6-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
596
597
|
| `nano-gpt/xiaomi/mimo-v2.6-pro-ultraspeed` | 1.0M | | | | | | $4 | $9 |
|
|
597
598
|
| `nano-gpt/z-ai/glm-4.5` | 128K | | | | | | $0.30 | $1 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenCode Zen
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 111 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
|
|
|
@@ -105,7 +105,6 @@ for await (const chunk of stream) {
|
|
|
105
105
|
| `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
106
106
|
| `opencode/minimax-m3` | 512K | | | | | | $0.30 | $1 |
|
|
107
107
|
| `opencode/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
|
|
108
|
-
| `opencode/muse-spark-1.2-contributor-free` | 1.0M | | | | | | — | — |
|
|
109
108
|
| `opencode/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
|
|
110
109
|
| `opencode/muse-spark-1.3-contributor-free` | 1.0M | | | | | | — | — |
|
|
111
110
|
| `opencode/nemotron-3-ultra-free` | 1.0M | | | | | | — | — |
|
|
@@ -113,6 +112,7 @@ for await (const chunk of stream) {
|
|
|
113
112
|
| `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
|
|
114
113
|
| `opencode/qwen3.6-plus` | 262K | | | | | | $0.50 | $3 |
|
|
115
114
|
| `opencode/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
|
|
115
|
+
| `opencode/qwen3.8-max` | 262K | | | | | | $2 | $6 |
|
|
116
116
|
| `opencode/space-bunny-free` | 1.0M | | | | | | — | — |
|
|
117
117
|
|
|
118
118
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# ZenMux
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 129 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [ZenMux documentation](https://docs.zenmux.ai).
|
|
10
10
|
|
|
@@ -39,6 +39,7 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
41
|
| `zenmux/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
42
|
+
| `zenmux/anthropic/claude-fable-5.1` | 1.0M | | | | | | $10 | $50 |
|
|
42
43
|
| `zenmux/anthropic/claude-haiku-4.5` | 200K | | | | | | $1 | $5 |
|
|
43
44
|
| `zenmux/anthropic/claude-opus-4` | 200K | | | | | | $15 | $75 |
|
|
44
45
|
| `zenmux/anthropic/claude-opus-4.1` | 200K | | | | | | $15 | $75 |
|
|
@@ -46,6 +47,7 @@ for await (const chunk of stream) {
|
|
|
46
47
|
| `zenmux/anthropic/claude-opus-4.6` | 1.0M | | | | | | $5 | $25 |
|
|
47
48
|
| `zenmux/anthropic/claude-opus-4.7` | 1.0M | | | | | | $5 | $25 |
|
|
48
49
|
| `zenmux/anthropic/claude-opus-4.8` | 1.0M | | | | | | $5 | $25 |
|
|
50
|
+
| `zenmux/anthropic/claude-opus-5.5` | 1.0M | | | | | | $4 | $20 |
|
|
49
51
|
| `zenmux/anthropic/claude-sonnet-4` | 1.0M | | | | | | $3 | $15 |
|
|
50
52
|
| `zenmux/anthropic/claude-sonnet-4.5` | 1.0M | | | | | | $3 | $15 |
|
|
51
53
|
| `zenmux/anthropic/claude-sonnet-4.6` | 1.0M | | | | | | $3 | $15 |
|
|
@@ -56,6 +58,7 @@ for await (const chunk of stream) {
|
|
|
56
58
|
| `zenmux/deepseek/deepseek-v3.2-exp` | 163K | | | | | | $0.22 | $0.33 |
|
|
57
59
|
| `zenmux/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
58
60
|
| `zenmux/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
61
|
+
| `zenmux/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
59
62
|
| `zenmux/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
60
63
|
| `zenmux/google/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
61
64
|
| `zenmux/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
|
|
@@ -77,6 +80,7 @@ for await (const chunk of stream) {
|
|
|
77
80
|
| `zenmux/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
78
81
|
| `zenmux/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
79
82
|
| `zenmux/moonshotai/kimi-k2.7-code-free` | 262K | | | | | | — | — |
|
|
83
|
+
| `zenmux/moonshotai/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
80
84
|
| `zenmux/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
81
85
|
| `zenmux/moonshotai/kimi-k3-free` | 1.0M | | | | | | — | — |
|
|
82
86
|
| `zenmux/openai/gpt-5` | 400K | | | | | | $1 | $10 |
|
|
@@ -99,6 +103,8 @@ for await (const chunk of stream) {
|
|
|
99
103
|
| `zenmux/openai/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
|
|
100
104
|
| `zenmux/openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
|
|
101
105
|
| `zenmux/openai/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
|
|
106
|
+
| `zenmux/openai/gpt-6-astra` | 1.1M | | | | | | $10 | $50 |
|
|
107
|
+
| `zenmux/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
102
108
|
| `zenmux/qwen/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
|
|
103
109
|
| `zenmux/qwen/qwen3-max` | 256K | | | | | | $1 | $6 |
|
|
104
110
|
| `zenmux/qwen/qwen3.5-flash` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
@@ -131,6 +137,7 @@ for await (const chunk of stream) {
|
|
|
131
137
|
| `zenmux/xiaomi/mimo-v2-pro` | 1.0M | | | | | | $1 | $3 |
|
|
132
138
|
| `zenmux/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 |
|
|
133
139
|
| `zenmux/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $1 | $3 |
|
|
140
|
+
| `zenmux/xiaomi/mimo-v2.6-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
134
141
|
| `zenmux/z-ai/glm-4.5` | 128K | | | | | | $0.29 | $1 |
|
|
135
142
|
| `zenmux/z-ai/glm-4.5-air` | 128K | | | | | | $0.12 | $0.29 |
|
|
136
143
|
| `zenmux/z-ai/glm-4.6` | 200K | | | | | | $0.29 | $1 |
|
|
@@ -26,6 +26,25 @@ The provider's `baseUrl` is the public URL the platform sends webhooks and event
|
|
|
26
26
|
|
|
27
27
|
Mastra includes [`SlackProvider`](https://mastra.ai/reference/channels/slack-provider) and [`TelegramProvider`](https://mastra.ai/reference/channels/telegram-provider) implementations. Build a custom provider by implementing this interface.
|
|
28
28
|
|
|
29
|
+
## Dynamic resolution
|
|
30
|
+
|
|
31
|
+
Instead of a static record, `channels` also accepts a resolver: an async function returning the current provider map, with a synchronous `getRoutes()` method. Mastra mounts the resolver's routes at construction and resolves providers at runtime, so connections added after boot become usable without a redeploy. The `channels()` helper from `@mastra/connect` returns a resolver backed by the Mastra platform.
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
35
|
+
import { channels } from '@mastra/connect'
|
|
36
|
+
|
|
37
|
+
export const mastra = new Mastra({
|
|
38
|
+
channels: await channels({ projectId: process.env.MASTRA_PROJECT_ID! }),
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
With a resolver configured, call `resolveChannels()` to get the current provider map. It also works with a static record, where it returns the record directly.
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
const providers = await mastra.resolveChannels()
|
|
46
|
+
```
|
|
47
|
+
|
|
29
48
|
## Properties
|
|
30
49
|
|
|
31
50
|
**id** (`string`): Unique identifier for this channel type, for example 'slack' or 'discord'. Used as the key when routing events and looking the provider up from Mastra.
|
|
@@ -54,7 +73,7 @@ Access a registered provider through the `channels` getter, keyed by the id you
|
|
|
54
73
|
await mastra.channels.slack.configure({ refreshToken })
|
|
55
74
|
```
|
|
56
75
|
|
|
57
|
-
When the key is only known at runtime, look the provider up by string id instead. `getChannelProvider` takes the concrete type as a generic, and `getChannelProviders` returns every registered provider keyed by id.
|
|
76
|
+
When the key is only known at runtime, look the provider up by string id instead. `getChannelProvider` takes the concrete type as a generic, and `getChannelProviders` returns every registered provider keyed by id. With a [resolver](#dynamic-resolution), both return the latest resolved snapshot. Use `resolveChannels()` when you need providers that reflect the current platform state.
|
|
58
77
|
|
|
59
78
|
```typescript
|
|
60
79
|
import type { SlackProvider } from '@mastra/slack'
|
|
@@ -32,6 +32,8 @@ Add the processor to an agent's `inputProcessors`. Each invocation injects at mo
|
|
|
32
32
|
|
|
33
33
|
**getReader** (`(args: ProcessInputStepArgs) => ReminderFileReader | undefined`): Select a reader for this request. Returning undefined keeps the instance defaults.
|
|
34
34
|
|
|
35
|
+
**getBasePath** (`(args: ProcessInputStepArgs) => string | undefined`): Return the project root for this request. Relative tool paths resolve against it instead of process.cwd(), and instruction files outside it are never loaded. Returning undefined keeps process.cwd() resolution with no boundary.
|
|
36
|
+
|
|
35
37
|
## `ReminderFileReader`
|
|
36
38
|
|
|
37
39
|
A reader controls both file access and optional path identity. Return one from `getReader` when instruction files live in a virtual filesystem or a trusted git ref rather than the current checkout.
|
|
@@ -516,7 +516,7 @@ Added when a sandbox is configured:
|
|
|
516
516
|
|
|
517
517
|
With a static sandbox, capability checks (`executeCommand`, `processes`) decide which tool variants are exposed. With a [runtime-defined sandbox](https://mastra.ai/docs/sandbox/overview), all sandbox tools are registered and the runtime throws a clear error if the resolved sandbox doesn't implement a requested capability.
|
|
518
518
|
|
|
519
|
-
The `execute_command` tool accepts
|
|
519
|
+
The `execute_command` tool accepts these options:
|
|
520
520
|
|
|
521
521
|
**backgroundProcesses** (`BackgroundProcessesConfig`): Configuration for handling background processes. Only applicable if the sandbox supports background execution.
|
|
522
522
|
|
|
@@ -528,6 +528,19 @@ The `execute_command` tool accepts a `backgroundProcesses` option for lifecycle
|
|
|
528
528
|
|
|
529
529
|
**backgroundProcesses.abortSignal** (`AbortSignal | null | false`): Abort signal for background processes. undefined (default) uses the agent's signal. null or false disables abort — processes persist after agent shutdown.
|
|
530
530
|
|
|
531
|
+
**requireDescription** (`boolean`): Adds a required description argument, listed before command, where the model says in a few words what the command does. Use it to show a readable label in place of the raw command. When false, the tool schema has no description argument. (Default: `false`)
|
|
532
|
+
|
|
533
|
+
```typescript
|
|
534
|
+
const workspace = new Workspace({
|
|
535
|
+
sandbox: new LocalSandbox({ workingDirectory: './workspace' }),
|
|
536
|
+
tools: {
|
|
537
|
+
[WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND]: {
|
|
538
|
+
requireDescription: true,
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
})
|
|
542
|
+
```
|
|
543
|
+
|
|
531
544
|
See [Background processes](https://mastra.ai/docs/sandbox/overview) for callback examples.
|
|
532
545
|
|
|
533
546
|
### Search tools
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.3.2-alpha.
|
|
3
|
+
"version": "1.3.2-alpha.4",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
|
|
27
27
|
"local-pkg": "^1.1.2",
|
|
28
28
|
"zod": "^4.6.4",
|
|
29
|
-
"@mastra/core": "1.72.0-alpha.
|
|
29
|
+
"@mastra/core": "1.72.0-alpha.2",
|
|
30
30
|
"@mastra/mcp": "^2.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"typescript": "^7.0.2",
|
|
45
45
|
"vitest": "4.1.11",
|
|
46
46
|
"@internal/lint": "0.0.137",
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
47
|
+
"@internal/types-builder": "0.0.112",
|
|
48
|
+
"@mastra/core": "1.72.0-alpha.2"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://mastra.ai",
|
|
51
51
|
"repository": {
|