@mastra/mcp-docs-server 1.2.3-alpha.9 → 1.2.4-alpha.1

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.
Files changed (34) hide show
  1. package/.docs/docs/agent-builder/memory.md +4 -2
  2. package/.docs/docs/agent-controller/overview.md +1 -1
  3. package/.docs/docs/agents/agent-approval.md +38 -0
  4. package/.docs/docs/agents/file-based-agents.md +286 -0
  5. package/.docs/docs/agents/heartbeats.md +211 -0
  6. package/.docs/docs/getting-started/project-structure.md +18 -14
  7. package/.docs/docs/memory/observational-memory.md +114 -0
  8. package/.docs/docs/memory/working-memory.md +2 -0
  9. package/.docs/docs/observability/integrations/exporters/otel.md +23 -2
  10. package/.docs/models/gateways/netlify.md +3 -1
  11. package/.docs/models/gateways/openrouter.md +3 -4
  12. package/.docs/models/gateways/vercel.md +3 -1
  13. package/.docs/models/index.md +1 -1
  14. package/.docs/models/providers/anthropic.md +3 -2
  15. package/.docs/models/providers/deepinfra.md +2 -1
  16. package/.docs/models/providers/llmgateway.md +5 -4
  17. package/.docs/models/providers/novita-ai.md +1 -1
  18. package/.docs/models/providers/opencode-go.md +1 -1
  19. package/.docs/models/providers/opencode.md +4 -1
  20. package/.docs/models/providers/sakana.md +73 -0
  21. package/.docs/models/providers/stepfun.md +1 -1
  22. package/.docs/models/providers/synthetic.md +8 -6
  23. package/.docs/models/providers/xiaomi.md +2 -2
  24. package/.docs/models/providers/zeldoc.md +1 -1
  25. package/.docs/models/providers.md +1 -0
  26. package/.docs/reference/agent-controller/agent-controller-class.md +9 -9
  27. package/.docs/reference/agents/listSuspendedRuns.md +91 -0
  28. package/.docs/reference/client-js/agents.md +21 -0
  29. package/.docs/reference/coding-agent/build-base-prompt.md +75 -0
  30. package/.docs/reference/coding-agent/create-coding-agent.md +97 -0
  31. package/.docs/reference/index.md +3 -0
  32. package/.docs/reference/memory/observational-memory.md +90 -0
  33. package/CHANGELOG.md +58 -0
  34. package/package.json +6 -6
@@ -163,6 +163,120 @@ OM uses fast local token estimation for this thresholding work. Text is estimate
163
163
 
164
164
  The Observer can also see attachments in the history it reviews. OM keeps readable placeholders like `[Image #1: reference-board.png]` or `[File #1: floorplan.pdf]` in the transcript for readability, and forwards the actual attachment parts alongside the text. Image-like `file` parts are upgraded to image inputs for the Observer when possible, while non-image attachments are forwarded as file parts with normalized token counting. This applies to both normal thread observation and batched resource-scope observation.
165
165
 
166
+ ### Extractors
167
+
168
+ Use extractors when you want OM to persist specific values alongside observations. Built-in values such as **current task**, **suggested response**, and **thread title** use the same extraction pipeline as custom values.
169
+
170
+ The following example extracts a compact user profile from observations:
171
+
172
+ ```typescript
173
+ import { Agent } from '@mastra/core/agent'
174
+ import { Extractor, Memory } from '@mastra/memory'
175
+ import { z } from 'zod'
176
+
177
+ const memory = new Memory({
178
+ options: {
179
+ observationalMemory: {
180
+ model: 'openai/gpt-5-mini',
181
+ observation: {
182
+ extract: [
183
+ new Extractor({
184
+ name: 'User profile',
185
+ instructions: 'Extract stable user profile facts that should be remembered.',
186
+ schema: z.object({
187
+ preferredName: z.string().optional(),
188
+ timezone: z.string().optional(),
189
+ tools: z.array(z.string()).optional(),
190
+ }),
191
+ }),
192
+ ],
193
+ },
194
+ },
195
+ },
196
+ })
197
+
198
+ export const agent = new Agent({
199
+ name: 'assistant',
200
+ instructions: 'You are a helpful assistant.',
201
+ model: 'openai/gpt-5-mini',
202
+ memory,
203
+ })
204
+ ```
205
+
206
+ Adding a `schema` makes the extractor run as a follow-up structured output request. Schema-less extractors are inline string extractors emitted directly in the Observer or Reflector response.
207
+
208
+ ```typescript
209
+ new Extractor({
210
+ name: 'Mood',
211
+ instructions: 'Extract the user mood as a short phrase.',
212
+ })
213
+ ```
214
+
215
+ By default, OM shows the last extracted value to the extractor on later runs. Set `includePreviousExtraction: false` when the Observer should not see the previous value.
216
+
217
+ ```typescript
218
+ new Extractor({
219
+ name: 'Latest blocker',
220
+ instructions: 'Extract any blockers the agent is running into.',
221
+ includePreviousExtraction: false,
222
+ })
223
+ ```
224
+
225
+ Use dynamic `instructions` or `schema` functions when an extractor needs runtime context, such as the active memory instance or request context:
226
+
227
+ ```typescript
228
+ new Extractor({
229
+ name: 'Workspace summary',
230
+ instructions: ({ memory }) =>
231
+ memory ? 'Extract workspace facts for this memory instance.' : 'Extract workspace facts.',
232
+ })
233
+ ```
234
+
235
+ ### Working memory updates
236
+
237
+ Use `observationalMemory.observation.manageWorkingMemory` to let the Observer manage working memory automatically. The main agent no longer needs to call the working memory tool while it handles the user request, so working memory updates don't depend on the agent remembering to make them.
238
+
239
+ This also keeps working memory prompt-cache friendly. Working memory normally lives in the system prompt, so updates can invalidate the prompt cache. OM-managed working memory defaults `workingMemory.useStateSignals` to `true`, which moves working memory into state signals instead.
240
+
241
+ ```typescript
242
+ import { Memory } from '@mastra/memory'
243
+
244
+ const memory = new Memory({
245
+ options: {
246
+ workingMemory: {
247
+ enabled: true,
248
+ },
249
+ observationalMemory: {
250
+ enabled: true,
251
+ observation: {
252
+ manageWorkingMemory: true,
253
+ },
254
+ },
255
+ },
256
+ })
257
+ ```
258
+
259
+ This setting adds `WorkingMemoryExtractor`, defaults `workingMemory.agentManaged` to `false`, and defaults `workingMemory.useStateSignals` to `true`. Set `workingMemory.agentManaged: true` if the main agent should still receive working memory tool and instruction injection.
260
+
261
+ Use `onExtracted` to normalize or react to custom extracted values before they are persisted:
262
+
263
+ ```typescript
264
+ new Extractor({
265
+ name: 'Project status',
266
+ instructions: 'Extract the current project status.',
267
+ schema: z.string(),
268
+ async onExtracted({ current, sendSignal }) {
269
+ await sendSignal?.({
270
+ type: 'user-message',
271
+ contents: `Project status extracted: ${current}`,
272
+ })
273
+ return current.trim().toLowerCase()
274
+ },
275
+ })
276
+ ```
277
+
278
+ Extractor failures are reported in OM markers and do not block other successful extractor values. See [the API reference](https://mastra.ai/reference/memory/observational-memory) for the full `Extractor` shape.
279
+
166
280
  If your Observer model is text-only or its API rejects multimodal input, set `observation.observeAttachments` to `false` to drop attachments before they reach the Observer. The readable placeholders (`[Image #1: ...]`, `[File #1: ...]`) are kept in the transcript so the Observer can still reason about what was shared without receiving the binary payload. The same filter applies to tool results that contain image or file parts:
167
281
 
168
282
  ```typescript
@@ -6,6 +6,8 @@ Think of it as the agent's active thoughts or scratchpad – the key information
6
6
 
7
7
  This is useful for maintaining ongoing state that's always relevant and should always be available to the agent.
8
8
 
9
+ If you use [Observational Memory](https://mastra.ai/docs/memory/observational-memory), `observationalMemory.observation.manageWorkingMemory` lets OM update working memory for the agent.
10
+
9
11
  Working memory can persist at two different scopes:
10
12
 
11
13
  - **Resource-scoped** (default): Memory persists across all conversation threads for the same user
@@ -1,6 +1,6 @@
1
1
  # OpenTelemetry exporter
2
2
 
3
- The OpenTelemetry (OTEL) exporter sends your traces and logs to any OTEL-compatible observability platform using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, SigNoz, MLflow, Dash0, Traceloop, Laminar, and more.
3
+ The OpenTelemetry (OTEL) exporter sends your traces and logs to any OTEL-compatible observability platform using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, and more.
4
4
 
5
5
  > **Looking for bidirectional OTEL integration?:** If you have existing OpenTelemetry instrumentation and want Mastra traces to inherit context from active OTEL spans, see the [OpenTelemetry Bridge](https://mastra.ai/docs/observability/integrations/bridges/otel) instead.
6
6
 
@@ -8,7 +8,7 @@ The OpenTelemetry (OTEL) exporter sends your traces and logs to any OTEL-compati
8
8
 
9
9
  Each provider requires specific protocol packages. Install the base exporter plus the protocol package for your provider:
10
10
 
11
- ### For HTTP/Protobuf Providers (SigNoz, New Relic, Laminar, MLflow)
11
+ ### For HTTP/Protobuf Providers (SigNoz, New Relic, Laminar, MLflow, Latitude)
12
12
 
13
13
  **npm**:
14
14
 
@@ -118,6 +118,27 @@ new OtelExporter({
118
118
  })
119
119
  ```
120
120
 
121
+ ### Latitude
122
+
123
+ [Latitude](https://latitude.so) is an open-source LLM observability and evaluation platform that ingests OTLP traces. Use the `custom` provider with HTTP/Protobuf, pointing at Latitude's ingestion endpoint and authenticating with your API key and project slug:
124
+
125
+ ```typescript
126
+ new OtelExporter({
127
+ provider: {
128
+ custom: {
129
+ endpoint: 'https://ingest.latitude.so/v1/traces',
130
+ protocol: 'http/protobuf',
131
+ headers: {
132
+ Authorization: `Bearer ${process.env.LATITUDE_API_KEY}`,
133
+ 'X-Latitude-Project': process.env.LATITUDE_PROJECT,
134
+ },
135
+ },
136
+ },
137
+ })
138
+ ```
139
+
140
+ Sign up at [console.latitude.so](https://console.latitude.so/login), or self-host and point the endpoint at your own ingestion host.
141
+
121
142
  ### Dash0
122
143
 
123
144
  [Dash0](https://www.dash0.com/) provides real-time observability with automatic insights.
@@ -1,6 +1,6 @@
1
1
  # Netlify
2
2
 
3
- Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 64 models through Mastra's model router.
3
+ Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 66 models through Mastra's model router.
4
4
 
5
5
  Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
6
6
 
@@ -46,6 +46,7 @@ ANTHROPIC_API_KEY=ant-...
46
46
  | `anthropic/claude-sonnet-4-5` |
47
47
  | `anthropic/claude-sonnet-4-5-20250929` |
48
48
  | `anthropic/claude-sonnet-4-6` |
49
+ | `anthropic/claude-sonnet-5` |
49
50
  | `gemini/gemini-2.5-flash` |
50
51
  | `gemini/gemini-2.5-flash-image` |
51
52
  | `gemini/gemini-2.5-flash-lite` |
@@ -54,6 +55,7 @@ ANTHROPIC_API_KEY=ant-...
54
55
  | `gemini/gemini-3-pro-image` |
55
56
  | `gemini/gemini-3.1-flash-image` |
56
57
  | `gemini/gemini-3.1-flash-lite` |
58
+ | `gemini/gemini-3.1-flash-lite-image` |
57
59
  | `gemini/gemini-3.1-pro-preview` |
58
60
  | `gemini/gemini-3.1-pro-preview-customtools` |
59
61
  | `gemini/gemini-3.5-flash` |
@@ -1,6 +1,6 @@
1
1
  # ![OpenRouter logo](https://models.dev/logos/openrouter.svg)OpenRouter
2
2
 
3
- OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 337 models through Mastra's model router.
3
+ OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 336 models through Mastra's model router.
4
4
 
5
5
  Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
6
6
 
@@ -61,7 +61,6 @@ ANTHROPIC_API_KEY=ant-...
61
61
  | `anthropic/claude-opus-4.1` |
62
62
  | `anthropic/claude-opus-4.5` |
63
63
  | `anthropic/claude-opus-4.6` |
64
- | `anthropic/claude-opus-4.6-fast` |
65
64
  | `anthropic/claude-opus-4.7` |
66
65
  | `anthropic/claude-opus-4.7-fast` |
67
66
  | `anthropic/claude-opus-4.8` |
@@ -69,6 +68,7 @@ ANTHROPIC_API_KEY=ant-...
69
68
  | `anthropic/claude-sonnet-4` |
70
69
  | `anthropic/claude-sonnet-4.5` |
71
70
  | `anthropic/claude-sonnet-4.6` |
71
+ | `anthropic/claude-sonnet-5` |
72
72
  | `arcee-ai/coder-large` |
73
73
  | `arcee-ai/trinity-large-thinking` |
74
74
  | `arcee-ai/trinity-mini` |
@@ -110,6 +110,7 @@ ANTHROPIC_API_KEY=ant-...
110
110
  | `google/gemini-3.1-flash-image` |
111
111
  | `google/gemini-3.1-flash-image-preview` |
112
112
  | `google/gemini-3.1-flash-lite` |
113
+ | `google/gemini-3.1-flash-lite-image` |
113
114
  | `google/gemini-3.1-flash-lite-preview` |
114
115
  | `google/gemini-3.1-pro-preview` |
115
116
  | `google/gemini-3.1-pro-preview-customtools` |
@@ -152,7 +153,6 @@ ANTHROPIC_API_KEY=ant-...
152
153
  | `meta-llama/llama-4-scout` |
153
154
  | `meta-llama/llama-guard-4-12b` |
154
155
  | `microsoft/phi-4` |
155
- | `microsoft/phi-4-mini-instruct` |
156
156
  | `microsoft/wizardlm-2-8x22b` |
157
157
  | `minimax/minimax-01` |
158
158
  | `minimax/minimax-m1` |
@@ -271,7 +271,6 @@ ANTHROPIC_API_KEY=ant-...
271
271
  | `openrouter/bodybuilder` |
272
272
  | `openrouter/free` |
273
273
  | `openrouter/fusion` |
274
- | `openrouter/owl-alpha` |
275
274
  | `openrouter/pareto-code` |
276
275
  | `perceptron/perceptron-mk1` |
277
276
  | `perplexity/sonar` |
@@ -1,6 +1,6 @@
1
1
  # ![Vercel logo](https://models.dev/logos/vercel.svg)Vercel
2
2
 
3
- Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 294 models through Mastra's model router.
3
+ Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 296 models through Mastra's model router.
4
4
 
5
5
  Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
6
6
 
@@ -83,6 +83,7 @@ ANTHROPIC_API_KEY=ant-...
83
83
  | `anthropic/claude-sonnet-4` |
84
84
  | `anthropic/claude-sonnet-4.5` |
85
85
  | `anthropic/claude-sonnet-4.6` |
86
+ | `anthropic/claude-sonnet-5` |
86
87
  | `arcee-ai/trinity-large-preview` |
87
88
  | `arcee-ai/trinity-large-thinking` |
88
89
  | `arcee-ai/trinity-mini` |
@@ -129,6 +130,7 @@ ANTHROPIC_API_KEY=ant-...
129
130
  | `google/gemini-3.1-flash-image` |
130
131
  | `google/gemini-3.1-flash-image-preview` |
131
132
  | `google/gemini-3.1-flash-lite` |
133
+ | `google/gemini-3.1-flash-lite-image` |
132
134
  | `google/gemini-3.1-flash-lite-preview` |
133
135
  | `google/gemini-3.1-pro-preview` |
134
136
  | `google/gemini-3.5-flash` |
@@ -1,6 +1,6 @@
1
1
  # Model Providers
2
2
 
3
- Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4481 models from 135 providers through a single API.
3
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4495 models from 136 providers through a single API.
4
4
 
5
5
  ## Features
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ![Anthropic logo](https://models.dev/logos/anthropic.svg)Anthropic
2
2
 
3
- Access 17 Anthropic models through Mastra's model router. Authentication is handled automatically using the `ANTHROPIC_API_KEY` environment variable.
3
+ Access 18 Anthropic models through Mastra's model router. Authentication is handled automatically using the `ANTHROPIC_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Anthropic documentation](https://docs.anthropic.com/en/docs/about-claude/models).
6
6
 
@@ -49,6 +49,7 @@ for await (const chunk of stream) {
49
49
  | `anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
50
50
  | `anthropic/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
51
51
  | `anthropic/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
52
+ | `anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
52
53
 
53
54
  ## Advanced configuration
54
55
 
@@ -77,7 +78,7 @@ const agent = new Agent({
77
78
  model: ({ requestContext }) => {
78
79
  const useAdvanced = requestContext.task === "complex";
79
80
  return useAdvanced
80
- ? "anthropic/claude-sonnet-4-6"
81
+ ? "anthropic/claude-sonnet-5"
81
82
  : "anthropic/claude-fable-5";
82
83
  }
83
84
  });
@@ -1,6 +1,6 @@
1
1
  # ![Deep Infra logo](https://models.dev/logos/deepinfra.svg)Deep Infra
2
2
 
3
- Access 26 Deep Infra models through Mastra's model router. Authentication is handled automatically using the `DEEPINFRA_API_KEY` environment variable.
3
+ Access 27 Deep Infra models through Mastra's model router. Authentication is handled automatically using the `DEEPINFRA_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Deep Infra documentation](https://deepinfra.com/models).
6
6
 
@@ -44,6 +44,7 @@ for await (const chunk of stream) {
44
44
  | `deepinfra/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.15 | $1 |
45
45
  | `deepinfra/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $2 |
46
46
  | `deepinfra/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.75 | $4 |
47
+ | `deepinfra/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.74 | $4 |
47
48
  | `deepinfra/openai/gpt-oss-120b` | 131K | | | | | | $0.04 | $0.19 |
48
49
  | `deepinfra/openai/gpt-oss-20b` | 131K | | | | | | $0.03 | $0.14 |
49
50
  | `deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo` | 262K | | | | | | $0.30 | $1 |
@@ -1,6 +1,6 @@
1
1
  # ![LLM Gateway logo](https://models.dev/logos/llmgateway.svg)LLM Gateway
2
2
 
3
- Access 178 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
3
+ Access 179 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
6
6
 
@@ -49,6 +49,7 @@ for await (const chunk of stream) {
49
49
  | `llmgateway/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
50
50
  | `llmgateway/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
51
51
  | `llmgateway/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
52
+ | `llmgateway/claude-sonnet-5` | 1.0M | | | | | | $3 | $15 |
52
53
  | `llmgateway/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
53
54
  | `llmgateway/custom` | 128K | | | | | | — | — |
54
55
  | `llmgateway/deepseek-v3.1` | 128K | | | | | | $0.56 | $2 |
@@ -119,8 +120,8 @@ for await (const chunk of stream) {
119
120
  | `llmgateway/grok-4-1-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
120
121
  | `llmgateway/grok-4-20-beta-0309-non-reasoning` | 2.0M | | | | | | $2 | $6 |
121
122
  | `llmgateway/grok-4-20-beta-0309-reasoning` | 2.0M | | | | | | $2 | $6 |
122
- | `llmgateway/grok-4-20-non-reasoning` | 2.0M | | | | | | $2 | $6 |
123
- | `llmgateway/grok-4-20-reasoning` | 2.0M | | | | | | $2 | $6 |
123
+ | `llmgateway/grok-4-20-non-reasoning` | 2.0M | | | | | | $1 | $3 |
124
+ | `llmgateway/grok-4-20-reasoning` | 2.0M | | | | | | $1 | $3 |
124
125
  | `llmgateway/grok-4-3` | 1.0M | | | | | | $1 | $3 |
125
126
  | `llmgateway/grok-build-0-1` | 256K | | | | | | $1 | $2 |
126
127
  | `llmgateway/kimi-k2` | 256K | | | | | | $0.57 | $2 |
@@ -188,7 +189,7 @@ for await (const chunk of stream) {
188
189
  | `llmgateway/qwen3-coder-plus` | 1.0M | | | | | | $6 | $60 |
189
190
  | `llmgateway/qwen3-max` | 262K | | | | | | $0.84 | $3 |
190
191
  | `llmgateway/qwen3-max-2026-01-23` | 262K | | | | | | $1 | $6 |
191
- | `llmgateway/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.15 | $2 |
192
+ | `llmgateway/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.15 | $1 |
192
193
  | `llmgateway/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.15 | $1 |
193
194
  | `llmgateway/qwen3-vl-235b-a22b-instruct` | 131K | | | | | | $0.30 | $2 |
194
195
  | `llmgateway/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.50 | $2 |
@@ -63,7 +63,7 @@ for await (const chunk of stream) {
63
63
  | `novita-ai/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.13 | $0.40 |
64
64
  | `novita-ai/google/gemma-4-31b-it` | 262K | | | | | | $0.14 | $0.40 |
65
65
  | `novita-ai/gryphe/mythomax-l2-13b` | 4K | | | | | | $0.09 | $0.09 |
66
- | `novita-ai/inclusionai/ling-2.6-1t` | 262K | | | | | | | |
66
+ | `novita-ai/inclusionai/ling-2.6-1t` | 262K | | | | | | $0.30 | $3 |
67
67
  | `novita-ai/inclusionai/ling-2.6-flash` | 262K | | | | | | $0.10 | $0.30 |
68
68
  | `novita-ai/inclusionai/ring-2.6-1t` | 262K | | | | | | $0.30 | $3 |
69
69
  | `novita-ai/kwaipilot/kat-coder-pro` | 256K | | | | | | $0.30 | $1 |
@@ -43,7 +43,7 @@ for await (const chunk of stream) {
43
43
  | `opencode-go/mimo-v2.5` | 1.0M | | | | | | $0.14 | $0.28 |
44
44
  | `opencode-go/mimo-v2.5-pro` | 1.0M | | | | | | $2 | $3 |
45
45
  | `opencode-go/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
46
- | `opencode-go/minimax-m3` | 1.0M | | | | | | $0.10 | $0.40 |
46
+ | `opencode-go/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
47
47
  | `opencode-go/qwen3.6-plus` | 1.0M | | | | | | $0.50 | $3 |
48
48
  | `opencode-go/qwen3.7-max` | 1.0M | | | | | | $3 | $8 |
49
49
  | `opencode-go/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 |
@@ -1,6 +1,6 @@
1
1
  # ![OpenCode Zen logo](https://models.dev/logos/opencode.svg)OpenCode Zen
2
2
 
3
- Access 46 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
3
+ Access 49 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
6
6
 
@@ -44,6 +44,7 @@ for await (const chunk of stream) {
44
44
  | `opencode/claude-sonnet-4` | 1.0M | | | | | | $3 | $15 |
45
45
  | `opencode/claude-sonnet-4-5` | 1.0M | | | | | | $3 | $15 |
46
46
  | `opencode/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
47
+ | `opencode/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
47
48
  | `opencode/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
48
49
  | `opencode/deepseek-v4-flash-free` | 200K | | | | | | — | — |
49
50
  | `opencode/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
@@ -73,9 +74,11 @@ for await (const chunk of stream) {
73
74
  | `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
74
75
  | `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
75
76
  | `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
77
+ | `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
76
78
  | `opencode/mimo-v2.5-free` | 200K | | | | | | — | — |
77
79
  | `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
78
80
  | `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
81
+ | `opencode/minimax-m3` | 512K | | | | | | $0.30 | $1 |
79
82
  | `opencode/nemotron-3-ultra-free` | 1.0M | | | | | | — | — |
80
83
  | `opencode/north-mini-code-free` | 256K | | | | | | — | — |
81
84
  | `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
@@ -0,0 +1,73 @@
1
+ # ![Sakana AI logo](https://models.dev/logos/sakana.svg)Sakana AI
2
+
3
+ Access 3 Sakana AI models through Mastra's model router. Authentication is handled automatically using the `SAKANA_API_KEY` environment variable.
4
+
5
+ Learn more in the [Sakana AI documentation](https://console.sakana.ai/models).
6
+
7
+ ```bash
8
+ SAKANA_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "sakana/fugu"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Sakana AI documentation](https://console.sakana.ai/models) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ---------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `sakana/fugu` | 1.0M | | | | | | — | — |
38
+ | `sakana/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
39
+ | `sakana/fugu-ultra-20260615` | 1.0M | | | | | | $5 | $30 |
40
+
41
+ ## Advanced configuration
42
+
43
+ ### Custom headers
44
+
45
+ ```typescript
46
+ const agent = new Agent({
47
+ id: "custom-agent",
48
+ name: "custom-agent",
49
+ model: {
50
+ url: "https://api.sakana.ai/v1",
51
+ id: "sakana/fugu",
52
+ apiKey: process.env.SAKANA_API_KEY,
53
+ headers: {
54
+ "X-Custom-Header": "value"
55
+ }
56
+ }
57
+ });
58
+ ```
59
+
60
+ ### Dynamic model selection
61
+
62
+ ```typescript
63
+ const agent = new Agent({
64
+ id: "dynamic-agent",
65
+ name: "Dynamic Agent",
66
+ model: ({ requestContext }) => {
67
+ const useAdvanced = requestContext.task === "complex";
68
+ return useAdvanced
69
+ ? "sakana/fugu-ultra-20260615"
70
+ : "sakana/fugu";
71
+ }
72
+ });
73
+ ```
@@ -38,7 +38,7 @@ for await (const chunk of stream) {
38
38
  | `stepfun/step-2-16k` | 16K | | | | | | $5 | $16 |
39
39
  | `stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.30 |
40
40
  | `stepfun/step-3.5-flash-2603` | 256K | | | | | | $0.10 | $0.30 |
41
- | `stepfun/step-3.7-flash` | 256K | | | | | | $0.19 | $1 |
41
+ | `stepfun/step-3.7-flash` | 256K | | | | | | $0.20 | $1 |
42
42
 
43
43
  ## Advanced configuration
44
44
 
@@ -1,6 +1,6 @@
1
1
  # ![Synthetic logo](https://models.dev/logos/synthetic.svg)Synthetic
2
2
 
3
- Access 8 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
3
+ Access 10 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Synthetic documentation](https://synthetic.new/pricing).
6
6
 
@@ -37,11 +37,13 @@ for await (const chunk of stream) {
37
37
  | `synthetic/hf:MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.60 | $1 |
38
38
  | `synthetic/hf:moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
39
39
  | `synthetic/hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4` | 262K | | | | | | $0.30 | $1 |
40
- | `synthetic/hf:openai/gpt-oss-120b` | 128K | | | | | | $0.10 | $0.10 |
41
- | `synthetic/hf:Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $3 |
42
- | `synthetic/hf:zai-org/GLM-4.7` | 200K | | | | | | $0.55 | $2 |
43
- | `synthetic/hf:zai-org/GLM-4.7-Flash` | 197K | | | | | | $0.06 | $0.40 |
40
+ | `synthetic/hf:openai/gpt-oss-120b` | 131K | | | | | | $0.10 | $0.10 |
41
+ | `synthetic/hf:Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $4 |
42
+ | `synthetic/hf:Qwen/Qwen3.6-27B` | 262K | | | | | | $0.45 | $4 |
43
+ | `synthetic/hf:zai-org/GLM-4.7` | 203K | | | | | | $0.45 | $2 |
44
+ | `synthetic/hf:zai-org/GLM-4.7-Flash` | 197K | | | | | | $0.10 | $0.50 |
44
45
  | `synthetic/hf:zai-org/GLM-5.1` | 197K | | | | | | $1 | $3 |
46
+ | `synthetic/hf:zai-org/GLM-5.2` | 524K | | | | | | $1 | $4 |
45
47
 
46
48
  ## Advanced configuration
47
49
 
@@ -71,7 +73,7 @@ const agent = new Agent({
71
73
  model: ({ requestContext }) => {
72
74
  const useAdvanced = requestContext.task === "complex";
73
75
  return useAdvanced
74
- ? "synthetic/hf:zai-org/GLM-5.1"
76
+ ? "synthetic/hf:zai-org/GLM-5.2"
75
77
  : "synthetic/hf:MiniMaxAI/MiniMax-M3";
76
78
  }
77
79
  });
@@ -34,8 +34,8 @@ for await (const chunk of stream) {
34
34
 
35
35
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
36
  | --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 |
38
- | `xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $1 | $3 |
37
+ | `xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.14 | $0.28 |
38
+ | `xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $0.43 | $0.87 |
39
39
  | `xiaomi/mimo-v2.5-pro-ultraspeed` | 1.0M | | | | | | $1 | $3 |
40
40
 
41
41
  ## Advanced configuration
@@ -34,7 +34,7 @@ for await (const chunk of stream) {
34
34
 
35
35
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
36
  | --------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `zeldoc/z-code` | 262K | | | | | | — | — |
37
+ | `zeldoc/z-code` | 1.0M | | | | | | — | — |
38
38
 
39
39
  ## Advanced configuration
40
40
 
@@ -98,6 +98,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
98
98
  - [Regolo AI](https://mastra.ai/models/providers/regolo-ai)
99
99
  - [Requesty](https://mastra.ai/models/providers/requesty)
100
100
  - [routing.run](https://mastra.ai/models/providers/routing-run)
101
+ - [Sakana AI](https://mastra.ai/models/providers/sakana)
101
102
  - [Sarvam AI](https://mastra.ai/models/providers/sarvam)
102
103
  - [Scaleway](https://mastra.ai/models/providers/scaleway)
103
104
  - [SiliconFlow](https://mastra.ai/models/providers/siliconflow)
@@ -128,7 +128,7 @@ await agentController.sendMessage({ content: 'Hello!' })
128
128
 
129
129
  **disableBuiltinTools** (`BuiltinToolId[]`): Built-in tool IDs to remove from the \`controllerBuiltIn\` toolset. Valid values are \`ask\_user\`, \`submit\_plan\`, \`task\_write\`, \`task\_update\`, \`task\_complete\`, \`task\_check\`, and \`subagent\`.
130
130
 
131
- **heartbeatHandlers** (`HeartbeatHandler[]`): Periodic background tasks started during \`init()\`. Use for gateway sync, cache refresh, and similar tasks.
131
+ **intervalHandlers** (`IntervalHandler[]`): Periodic background tasks started during \`init()\`. Use for gateway sync, cache refresh, and similar tasks.
132
132
 
133
133
  **idGenerator** (`() => string`): Custom ID generator for AgentController-managed IDs such as threads and mode-run identifiers. (Default: `timestamp + random string`)
134
134
 
@@ -162,7 +162,7 @@ await agentController.sendMessage({ content: 'Hello!' })
162
162
 
163
163
  #### `init()`
164
164
 
165
- Initialize the agentController. Loads storage, initializes a static workspace (dynamic factory workspaces are resolved per-session during `createSession`), propagates memory and workspace to mode agents, and starts heartbeat handlers. Call this before using the agentController.
165
+ Initialize the agentController. Loads storage, initializes a static workspace (dynamic factory workspaces are resolved per-session during `createSession`), propagates memory and workspace to mode agents, and starts interval handlers. Call this before using the agentController.
166
166
 
167
167
  ```typescript
168
168
  await agentController.init()
@@ -220,26 +220,26 @@ const thread = await agentController.selectOrCreateThread()
220
220
 
221
221
  #### `destroy()`
222
222
 
223
- Stop all heartbeat handlers and clean up resources.
223
+ Stop all interval handlers and clean up resources.
224
224
 
225
225
  ```typescript
226
226
  await agentController.destroy()
227
227
  ```
228
228
 
229
- #### `removeHeartbeat({ id })`
229
+ #### `removeInterval({ id })`
230
230
 
231
- Remove a specific heartbeat handler by ID. Calls the handler's `shutdown()` callback if defined.
231
+ Remove a specific interval handler by ID. Calls the handler's `shutdown()` callback if defined.
232
232
 
233
233
  ```typescript
234
- await agentController.removeHeartbeat({ id: 'gateway-sync' })
234
+ await agentController.removeInterval({ id: 'gateway-sync' })
235
235
  ```
236
236
 
237
- #### `stopHeartbeats()`
237
+ #### `stopIntervals()`
238
238
 
239
- Stop and remove all heartbeat handlers.
239
+ Stop and remove all interval handlers.
240
240
 
241
241
  ```typescript
242
- await agentController.stopHeartbeats()
242
+ await agentController.stopIntervals()
243
243
  ```
244
244
 
245
245
  #### `getCurrentAgent()`