@mastra/mcp-docs-server 1.3.13-alpha.6 → 1.3.13-alpha.8

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.
@@ -74,6 +74,47 @@ export const mastra = new Mastra({
74
74
  })
75
75
  ```
76
76
 
77
+ ## Export to storage and Platform
78
+
79
+ On Mastra Platform, a nonempty `MASTRA_DEPLOYMENT_ID` disables `MastraStorageExporter` and the deprecated `DefaultExporter` by default. Other exporters remain enabled. The opt-in below applies only to `MastraStorageExporter`. Deprecated `DefaultExporter` stays disabled on Platform even with the flag set to `true`. Migrate to `MastraStorageExporter` to use this option.
80
+
81
+ > **Local storage remains blocked even with the opt-in:** `retainStorageExporterOnPlatform: true` **doesn't** enable in-memory, local libSQL, or DuckDB observability writes on Platform. When the observability domain reports local persistence, the built-in storage exporter stays disabled: it won't persist traces, logs, metrics, scores, or feedback to that database. Other exporters continue to receive events.
82
+
83
+ With updated adapters and `retainStorageExporterOnPlatform: true`, the behavior on Platform is:
84
+
85
+ | Observability database | Storage export on Platform |
86
+ | --------------------------------------------------------------------- | -------------------------------- |
87
+ | PostgreSQL | Allowed |
88
+ | Remote libSQL/Turso (`libsql://` or `https://`) | Allowed |
89
+ | Local libSQL (`file:` or `:memory:`) | Blocked |
90
+ | libSQL embedded replica with a remote sync URL | Blocked: it still writes locally |
91
+ | DuckDB, including in-memory databases | Blocked |
92
+ | `InMemoryStore`, including the fallback when no storage is configured | Blocked |
93
+
94
+ To keep writing to your own remote database alongside Platform observability, set [`retainStorageExporterOnPlatform`](https://mastra.ai/reference/observability/tracing/configuration) to `true` on the observability config:
95
+
96
+ ```typescript
97
+ import { Observability, MastraStorageExporter, MastraPlatformExporter } from '@mastra/observability'
98
+
99
+ const observability = new Observability({
100
+ configs: {
101
+ production: {
102
+ serviceName: 'my-service',
103
+ retainStorageExporterOnPlatform: true,
104
+ exporters: [new MastraStorageExporter(), new MastraPlatformExporter()],
105
+ },
106
+ },
107
+ })
108
+ ```
109
+
110
+ Pass this `observability` instance to `new Mastra()` alongside your configured `storage` provider. The option applies only to this config, including exporters registered later. It doesn't configure a database or add exporters automatically. Other configs keep the default suppression unless they also opt in.
111
+
112
+ The restriction applies to the **observability domain**, which can use a different provider from your default application storage. It doesn't disable other storage domains. Outside Platform, local observability storage continues to work.
113
+
114
+ To enable this guard, upgrade `@mastra/core` and any `@mastra/libsql` or `@mastra/duckdb` adapters alongside `@mastra/observability`: older or custom adapters without the `persistenceLocation` capability retain the existing opt-in behavior and aren't checked for local persistence.
115
+
116
+ A blocked exporter logs a warning during initialization, but the restriction applies even if your logging setup hides that warning. If dual export isn't writing to your database, check the observability provider against the table above and configure a remote database. Retrying or increasing the batch interval won't enable a blocked exporter.
117
+
77
118
  ## Studio
78
119
 
79
120
  Access your traces through Studio:
@@ -243,6 +243,52 @@ export default function Chat() {
243
243
 
244
244
  Use [`prepareSendMessagesRequest`](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#transport.default-chat-transport.prepare-send-messages-request) to customize the request sent to the chat route, for example to pass additional configuration to the agent.
245
245
 
246
+ ### Resume a chat stream after a disconnect
247
+
248
+ Enable resumable streams on the Mastra route:
249
+
250
+ ```typescript
251
+ import { Mastra } from '@mastra/core'
252
+ import { chatRoute } from '@mastra/ai-sdk'
253
+
254
+ export const mastra = new Mastra({
255
+ server: {
256
+ apiRoutes: [
257
+ chatRoute({
258
+ path: '/chat',
259
+ agent: 'weatherAgent',
260
+ resumable: true,
261
+ }),
262
+ ],
263
+ },
264
+ })
265
+ ```
266
+
267
+ Pass a stable chat ID and `resume: true` to `useChat()`. AI SDK UI reconnects through `GET /chat/:chatId/stream` when the component mounts again while the generation is still active.
268
+
269
+ ```tsx
270
+ import { useChat } from '@ai-sdk/react'
271
+ import { DefaultChatTransport } from 'ai'
272
+
273
+ export function Chat({ chatId }: { chatId: string }) {
274
+ const { messages, sendMessage, status } = useChat({
275
+ id: chatId,
276
+ resume: true,
277
+ transport: new DefaultChatTransport({
278
+ api: 'http://localhost:4111/chat',
279
+ }),
280
+ })
281
+
282
+ // ...render messages and call sendMessage()
283
+ }
284
+ ```
285
+
286
+ Keep `chatId` in a URL, browser storage, or application state so a refresh reuses the same value. Resumption only applies to an active run. Completed or unavailable runs return `204`, so load completed chat history from memory separately.
287
+
288
+ Resumable mode lets generation continue after the POST connection closes, which means `useChat().stop()` doesn't cancel the agent run. Active-run discovery is process-local, so the reconnect request must reach the same running Mastra server process.
289
+
290
+ If the chat uses a resource ID, authentication middleware must set `MASTRA_RESOURCE_ID_KEY` in the request context. Don't send the resource ID only as `memory.resource` in the POST body because the reconnecting GET request has no body.
291
+
246
292
  ### Client tools with `useChat()`
247
293
 
248
294
  A tool without an `execute` function runs on the client. When the model calls it, the agent's run ends at that step and the stream finishes with a `tool-{toolKey}` part in the `input-available` state. To let the agent continue, run the tool in the browser, add its result with `addToolOutput()`, and send the conversation back. `sendAutomaticallyWhen` sends the next request once every tool call in the last assistant message has a result:
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Merge Gateway logo](https://models.dev/logos/merge-gateway.svg)Merge Gateway
6
6
 
7
- Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 204 models through Mastra's model router.
7
+ Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 205 models through Mastra's model router.
8
8
 
9
9
  Learn more in the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway).
10
10
 
@@ -94,6 +94,7 @@ ANTHROPIC_API_KEY=ant-...
94
94
  | `google/gemini-3.7-flash` |
95
95
  | `google/gemini-3.8-flash` |
96
96
  | `google/gemini-4-argon` |
97
+ | `google/gemini-4-carbon` |
97
98
  | `google/gemini-embedding-001` |
98
99
  | `google/gemini-embedding-2` |
99
100
  | `google/gemini-flash-latest` |
@@ -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 285 models through Mastra's model router.
7
+ Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 286 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
 
@@ -71,6 +71,7 @@ ANTHROPIC_API_KEY=ant-...
71
71
  | `gemini/gemini-3.7-flash` |
72
72
  | `gemini/gemini-3.8-flash` |
73
73
  | `gemini/gemini-4-argon` |
74
+ | `gemini/gemini-4-carbon` |
74
75
  | `gemini/gemini-flash-latest` |
75
76
  | `gemini/gemini-flash-lite-latest` |
76
77
  | `gemini/gemini-nano-banana-2.1` |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenRouter logo](https://models.dev/logos/openrouter.svg)OpenRouter
6
6
 
7
- OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 376 models through Mastra's model router.
7
+ OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 377 models through Mastra's model router.
8
8
 
9
9
  Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
10
10
 
@@ -137,6 +137,7 @@ ANTHROPIC_API_KEY=ant-...
137
137
  | `google/gemini-3.7-flash` |
138
138
  | `google/gemini-3.8-flash` |
139
139
  | `google/gemini-4-argon` |
140
+ | `google/gemini-4-carbon` |
140
141
  | `google/gemini-nano-banana-2.1` |
141
142
  | `google/gemini-omni-1.1-flash` |
142
143
  | `google/gemini-omni-1.2-flash` |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Vercel logo](https://models.dev/logos/vercel.svg)Vercel
6
6
 
7
- Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 419 models through Mastra's model router.
7
+ Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 420 models through Mastra's model router.
8
8
 
9
9
  Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
10
10
 
@@ -180,6 +180,7 @@ ANTHROPIC_API_KEY=ant-...
180
180
  | `google/gemini-3.8-live` |
181
181
  | `google/gemini-3.8-live-extended-thinking` |
182
182
  | `google/gemini-4-argon` |
183
+ | `google/gemini-4-carbon` |
183
184
  | `google/gemini-embedding-001` |
184
185
  | `google/gemini-embedding-2` |
185
186
  | `google/gemini-nano-banana-2.1` |
@@ -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 8261 models from 223 providers through a single API.
7
+ Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 8285 models from 223 providers through a single API.
8
8
 
9
9
  ## Features
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![CrossModel logo](https://models.dev/logos/crossmodel.svg)CrossModel
6
6
 
7
- Access 68 CrossModel models through Mastra's model router. Authentication is handled automatically using the `CROSSMODEL_API_KEY` environment variable.
7
+ Access 72 CrossModel models through Mastra's model router. Authentication is handled automatically using the `CROSSMODEL_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [CrossModel documentation](https://www.crossmodel.ai/docs).
10
10
 
@@ -40,6 +40,7 @@ for await (const chunk of stream) {
40
40
  | ------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
41
  | `crossmodel/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
42
42
  | `crossmodel/anthropic/claude-fable-5-1` | 1.0M | | | | | | $10 | $50 |
43
+ | `crossmodel/anthropic/claude-fable-5-2` | 1.0M | | | | | | $8 | $40 |
43
44
  | `crossmodel/anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
44
45
  | `crossmodel/anthropic/claude-haiku-5-5` | 1.0M | | | | | | $0.10 | $0.50 |
45
46
  | `crossmodel/anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
@@ -67,6 +68,7 @@ for await (const chunk of stream) {
67
68
  | `crossmodel/moonshot/kimi-k2.6` | 262K | | | | | | $1 | $4 |
68
69
  | `crossmodel/moonshot/kimi-k2.7-code` | 262K | | | | | | $1 | $4 |
69
70
  | `crossmodel/moonshot/kimi-k3` | 1.0M | | | | | | $3 | $15 |
71
+ | `crossmodel/moonshot/kimi-k3.1-pro` | 1.0M | | | | | | $2 | $10 |
70
72
  | `crossmodel/openai/gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 |
71
73
  | `crossmodel/openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
72
74
  | `crossmodel/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
@@ -80,6 +82,7 @@ for await (const chunk of stream) {
80
82
  | `crossmodel/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
81
83
  | `crossmodel/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
82
84
  | `crossmodel/openai/gpt-6.1-sol` | 1.1M | | | | | | $2 | $10 |
85
+ | `crossmodel/openai/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
83
86
  | `crossmodel/qwen/qwen3.6-flash` | 1.0M | | | | | | $0.19 | $1 |
84
87
  | `crossmodel/qwen/qwen3.6-plus` | 1.0M | | | | | | $0.32 | $2 |
85
88
  | `crossmodel/qwen/qwen3.7-flash` | 1.0M | | | | | | $0.04 | $0.13 |
@@ -89,6 +92,7 @@ for await (const chunk of stream) {
89
92
  | `crossmodel/qwen/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
90
93
  | `crossmodel/qwen/qwen3.8-omni-flash` | 1.0M | | | | | | $0.13 | $0.43 |
91
94
  | `crossmodel/tencent/hy3` | 262K | | | | | | $0.16 | $0.64 |
95
+ | `crossmodel/tencent/hy4` | 1.0M | | | | | | $0.96 | $3 |
92
96
  | `crossmodel/tencent/hy4-preview` | 1.0M | | | | | | $0.96 | $3 |
93
97
  | `crossmodel/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
94
98
  | `crossmodel/x-ai/grok-4.5` | 500K | | | | | | $2 | $6 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Eden AI logo](https://models.dev/logos/edenai.svg)Eden AI
6
6
 
7
- Access 383 Eden AI models through Mastra's model router. Authentication is handled automatically using the `EDENAI_API_KEY` environment variable.
7
+ Access 387 Eden AI models through Mastra's model router. Authentication is handled automatically using the `EDENAI_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Eden AI documentation](https://docs.edenai.co).
10
10
 
@@ -66,7 +66,7 @@ for await (const chunk of stream) {
66
66
  | `edenai/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
67
67
  | `edenai/anthropic/claude-fable-5-1` | 1.0M | | | | | | $10 | $50 |
68
68
  | `edenai/anthropic/claude-fable-5-2` | 1.0M | | | | | | $8 | $40 |
69
- | `edenai/anthropic/claude-fable-latest` | 1.0M | | | | | | $10 | $50 |
69
+ | `edenai/anthropic/claude-fable-latest` | 1.0M | | | | | | $8 | $40 |
70
70
  | `edenai/anthropic/claude-haiku-5-5` | 1.0M | | | | | | $0.10 | $0.50 |
71
71
  | `edenai/anthropic/claude-haiku-latest` | 1.0M | | | | | | $0.10 | $0.50 |
72
72
  | `edenai/anthropic/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
@@ -205,6 +205,7 @@ for await (const chunk of stream) {
205
205
  | `edenai/google/gemini-3.7-flash` | 1.0M | | | | | | $2 | $8 |
206
206
  | `edenai/google/gemini-3.8-flash` | 1.0M | | | | | | $2 | $8 |
207
207
  | `edenai/google/gemini-4-argon` | 1.0M | | | | | | $4 | $20 |
208
+ | `edenai/google/gemini-4-carbon` | 1.0M | | | | | | $2 | $10 |
208
209
  | `edenai/google/gemini-flash-latest` | 1.0M | | | | | | $2 | $8 |
209
210
  | `edenai/google/gemini-nano-banana-2.1` | 66K | | | | | | $2 | $8 |
210
211
  | `edenai/google/gemini-pro-latest` | 1.0M | | | | | | $4 | $20 |
@@ -235,7 +236,7 @@ for await (const chunk of stream) {
235
236
  | `edenai/minimax/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
236
237
  | `edenai/minimax/MiniMax-M2.7` | 205K | | | | | | $0.30 | $1 |
237
238
  | `edenai/minimax/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
238
- | `edenai/minimax/MiniMax-M3.1-Flash` | 1.0M | | | | | | $0.15 | $0.60 |
239
+ | `edenai/minimax/MiniMax-M3.1-Flash` | 1.0M | | | | | | $0.07 | $0.30 |
239
240
  | `edenai/mistral/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
240
241
  | `edenai/mistral/codestral-2508@eu` | 256K | | | | | | $0.33 | $0.99 |
241
242
  | `edenai/mistral/codestral-latest` | 256K | | | | | | $0.30 | $0.90 |
@@ -399,6 +400,9 @@ for await (const chunk of stream) {
399
400
  | `edenai/vertex/gemini-4-argon` | 1.0M | | | | | | $4 | $20 |
400
401
  | `edenai/vertex/gemini-4-argon@eu` | 1.0M | | | | | | $4 | $20 |
401
402
  | `edenai/vertex/gemini-4-argon@us` | 1.0M | | | | | | $4 | $20 |
403
+ | `edenai/vertex/gemini-4-carbon` | 1.0M | | | | | | $4 | $20 |
404
+ | `edenai/vertex/gemini-4-carbon@eu` | 1.0M | | | | | | $4 | $20 |
405
+ | `edenai/vertex/gemini-4-carbon@us` | 1.0M | | | | | | $4 | $20 |
402
406
  | `edenai/vertex/gemini-flash-latest` | 1.0M | | | | | | $2 | $8 |
403
407
  | `edenai/vertex/gemini-nano-banana-2.1` | 131K | | | | | | $2 | $8 |
404
408
  | `edenai/vertex/gemini-pro-latest` | 1.0M | | | | | | $4 | $20 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Google logo](https://models.dev/logos/google.svg)Google
6
6
 
7
- Access 36 Google models through Mastra's model router. Authentication is handled automatically using one of the following environment variables: `GOOGLE_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`.
7
+ Access 37 Google models through Mastra's model router. Authentication is handled automatically using one of the following environment variables: `GOOGLE_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`.
8
8
 
9
9
  Learn more in the [Google documentation](https://ai.google.dev/gemini-api/docs/models).
10
10
 
@@ -61,6 +61,7 @@ for await (const chunk of stream) {
61
61
  | `google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
62
62
  | `google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
63
63
  | `google/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
64
+ | `google/gemini-4-carbon` | 1.0M | | | | | | $2 | $10 |
64
65
  | `google/gemini-embedding-001` | 2K | | | | | | $0.15 | — |
65
66
  | `google/gemini-embedding-2` | 8K | | | | | | $0.20 | — |
66
67
  | `google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
@@ -49,7 +49,7 @@ for await (const chunk of stream) {
49
49
  | `hyper/kimi-k3.1-pro` | 1.0M | | | | | | $2 | $11 |
50
50
  | `hyper/minimax-m3` | 512K | | | | | | $0.33 | $1 |
51
51
  | `hyper/muse-spark-open` | 1.0M | | | | | | $1 | $5 |
52
- | `hyper/prism` | 1.0M | | | | | | $3 | $16 |
52
+ | `hyper/prism` | 1.0M | | | | | | $2 | $11 |
53
53
  | `hyper/prism-core` | 1.0M | | | | | | $2 | $5 |
54
54
  | `hyper/prism-flash` | 1.0M | | | | | | $0.33 | $1 |
55
55
  | `hyper/qwen3.8-2.4t-a95b` | 1.0M | | | | | | $2 | $6 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Kilo Gateway logo](https://models.dev/logos/kilo.svg)Kilo Gateway
6
6
 
7
- Access 376 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
7
+ Access 377 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
 
@@ -55,7 +55,7 @@ for await (const chunk of stream) {
55
55
  | `kilo/~openai/gpt-terra-latest` | 1.1M | | | | | | $1 | $5 |
56
56
  | `kilo/~unbiased/pareto-latest` | 1.0M | | | | | | $0.80 | $3 |
57
57
  | `kilo/~x-ai/grok-latest` | 500K | | | | | | $2 | $6 |
58
- | `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.03 | $0.08 |
58
+ | `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.04 | $0.08 |
59
59
  | `kilo/~z-ai/glm-latest` | 1.0M | | | | | | $0.07 | $1 |
60
60
  | `kilo/aion-labs/aion-2.0` | 131K | | | | | | $0.80 | $2 |
61
61
  | `kilo/aion-labs/aion-3.0` | 131K | | | | | | $3 | $6 |
@@ -130,6 +130,7 @@ for await (const chunk of stream) {
130
130
  | `kilo/google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
131
131
  | `kilo/google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
132
132
  | `kilo/google/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
133
+ | `kilo/google/gemini-4-carbon` | 1.0M | | | | | | $4 | $20 |
133
134
  | `kilo/google/gemini-nano-banana-2.1` | 66K | | | | | | $2 | $8 |
134
135
  | `kilo/google/gemini-omni-1.1-flash` | 131K | | | | | | $2 | $9 |
135
136
  | `kilo/google/gemini-omni-1.2-flash` | 131K | | | | | | $2 | $9 |
@@ -137,7 +138,7 @@ for await (const chunk of stream) {
137
138
  | `kilo/google/gemma-3-12b-it` | 131K | | | | | | $0.04 | $0.12 |
138
139
  | `kilo/google/gemma-3-27b-it` | 131K | | | | | | $0.08 | $0.16 |
139
140
  | `kilo/google/gemma-3-4b-it` | 131K | | | | | | $0.04 | $0.05 |
140
- | `kilo/google/gemma-4-26b-a4b-it` | 256K | | | | | | $0.02 | $0.05 |
141
+ | `kilo/google/gemma-4-26b-a4b-it` | 256K | | | | | | $0.04 | $0.11 |
141
142
  | `kilo/google/gemma-4-31b-it` | 262K | | | | | | $0.10 | $0.34 |
142
143
  | `kilo/google/lyria-3-clip-preview` | 1.0M | | | | | | — | — |
143
144
  | `kilo/google/lyria-3-pro-preview` | 1.0M | | | | | | — | — |
@@ -361,10 +362,10 @@ for await (const chunk of stream) {
361
362
  | `kilo/tencent/hy-mt2-1.8b` | 8K | | | | | | $0.04 | $0.18 |
362
363
  | `kilo/tencent/hy-mt2-30b-a3b` | 8K | | | | | | $0.07 | $0.29 |
363
364
  | `kilo/tencent/hy-mt2-7b` | 8K | | | | | | $0.07 | $0.29 |
364
- | `kilo/tencent/hy3` | 262K | | | | | | $0.13 | $0.53 |
365
+ | `kilo/tencent/hy3` | 262K | | | | | | $0.08 | $0.33 |
365
366
  | `kilo/tencent/hy3-preview` | 262K | | | | | | $0.18 | $0.60 |
366
367
  | `kilo/tencent/hy4` | 1.0M | | | | | | $0.83 | $3 |
367
- | `kilo/tencent/hy4-preview` | 1.0M | | | | | | $0.83 | $3 |
368
+ | `kilo/tencent/hy4-preview` | 1.0M | | | | | | $0.75 | $2 |
368
369
  | `kilo/thedrummer/cydonia-24b-v4.1` | 131K | | | | | | $0.30 | $0.50 |
369
370
  | `kilo/thedrummer/skyfall-36b-v2` | 33K | | | | | | $0.55 | $0.80 |
370
371
  | `kilo/thedrummer/unslopnemo-12b` | 1.0M | | | | | | $0.40 | $0.40 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![LLM Gateway logo](https://models.dev/logos/llmgateway-providers.svg)LLM Gateway
6
6
 
7
- Access 439 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
7
+ Access 448 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
 
@@ -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
  | `llmgateway-providers/alibaba/deepseek-v4-flash` | 1.0M | | | | | | $0.20 | $0.40 |
42
+ | `llmgateway-providers/alibaba/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.20 | $0.40 |
42
43
  | `llmgateway-providers/alibaba/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
43
44
  | `llmgateway-providers/alibaba/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
44
45
  | `llmgateway-providers/alibaba/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.30 | $1 |
@@ -152,6 +153,7 @@ for await (const chunk of stream) {
152
153
  | `llmgateway-providers/azure/grok-4-1-fast-reasoning` | 128K | | | | | | $0.20 | $0.50 |
153
154
  | `llmgateway-providers/azure/grok-4-3` | 200K | | | | | | $1 | $3 |
154
155
  | `llmgateway-providers/baidu/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
156
+ | `llmgateway-providers/baidu/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
155
157
  | `llmgateway-providers/baidu/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
156
158
  | `llmgateway-providers/baidu/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
157
159
  | `llmgateway-providers/baidu/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.28 | $1 |
@@ -162,6 +164,7 @@ for await (const chunk of stream) {
162
164
  | `llmgateway-providers/baidu/kimi-k3` | 1.0M | | | | | | $3 | $15 |
163
165
  | `llmgateway-providers/bytedance/deepseek-v3.2` | 131K | | | | | | $0.28 | $0.42 |
164
166
  | `llmgateway-providers/bytedance/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
167
+ | `llmgateway-providers/bytedance/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
165
168
  | `llmgateway-providers/bytedance/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
166
169
  | `llmgateway-providers/bytedance/glm-4.7` | 200K | | | | | | $0.60 | $2 |
167
170
  | `llmgateway-providers/bytedance/glm-5.2` | 1.0M | | | | | | $1 | $4 |
@@ -183,6 +186,7 @@ for await (const chunk of stream) {
183
186
  | `llmgateway-providers/canopywave/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.50 |
184
187
  | `llmgateway-providers/cerebras/gpt-oss-120b` | 131K | | | | | | $0.35 | $0.75 |
185
188
  | `llmgateway-providers/cloudflare/deepseek-v4-flash` | 1.0M | | | | | | $0.44 | $1 |
189
+ | `llmgateway-providers/cloudflare/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
186
190
  | `llmgateway-providers/cloudflare/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
187
191
  | `llmgateway-providers/cloudflare/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.30 | $1 |
188
192
  | `llmgateway-providers/cloudflare/glm-5.3` | 1.0M | | | | | | $1 | $4 |
@@ -195,7 +199,8 @@ for await (const chunk of stream) {
195
199
  | `llmgateway-providers/consensusprotocol/gpt-oss-20b` | 128K | | | | | | $0.04 | $0.19 |
196
200
  | `llmgateway-providers/consensusprotocol/Qwen3.8-27B` | 262K | | | | | | $0.08 | $0.35 |
197
201
  | `llmgateway-providers/deepinfra/deepseek-v3.2` | 160K | | | | | | $0.26 | $0.38 |
198
- | `llmgateway-providers/deepinfra/deepseek-v4-flash` | 1.0M | | | | | | $0.08 | $0.18 |
202
+ | `llmgateway-providers/deepinfra/deepseek-v4-flash` | 1.0M | | | | | | $0.09 | $0.18 |
203
+ | `llmgateway-providers/deepinfra/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.08 | $0.18 |
199
204
  | `llmgateway-providers/deepinfra/deepseek-v4-pro` | 1.0M | | | | | | $1 | $3 |
200
205
  | `llmgateway-providers/deepinfra/deepseek-v4.1-flash` | 1.0M | | | | | | $0.20 | $0.60 |
201
206
  | `llmgateway-providers/deepinfra/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.20 | $0.60 |
@@ -250,6 +255,7 @@ for await (const chunk of stream) {
250
255
  | `llmgateway-providers/greenference/qwen3.6-27b` | 16K | | | | | | $0.15 | $1 |
251
256
  | `llmgateway-providers/groq/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.75 |
252
257
  | `llmgateway-providers/groq/gpt-oss-20b` | 131K | | | | | | $0.10 | $0.50 |
258
+ | `llmgateway-providers/inference.net/deepseek-v4-flash` | 1.0M | | | | | | $0.23 | $0.62 |
253
259
  | `llmgateway-providers/inference.net/deepseek-v4.1-flash-1017` | 262K | | | | | | $0.30 | $1 |
254
260
  | `llmgateway-providers/inference.net/deepseek-v4.1-flash-cyber` | 1.0M | | | | | | $0.30 | $1 |
255
261
  | `llmgateway-providers/inference.net/glm-5.3` | 1.0M | | | | | | $0.90 | $3 |
@@ -260,6 +266,7 @@ for await (const chunk of stream) {
260
266
  | `llmgateway-providers/luminal/deepseek-v4.1-flash` | 1.0M | | | | | | $0.14 | $0.54 |
261
267
  | `llmgateway-providers/meta-contributor/muse-spark-1.2-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
262
268
  | `llmgateway-providers/meta-contributor/muse-spark-1.3-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
269
+ | `llmgateway-providers/meta/muse-ember-1.0` | 1.0M | | | | | | $0.10 | $0.50 |
263
270
  | `llmgateway-providers/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
264
271
  | `llmgateway-providers/meta/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
265
272
  | `llmgateway-providers/meta/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
@@ -295,6 +302,7 @@ for await (const chunk of stream) {
295
302
  | `llmgateway-providers/moonshot/kimi-k3.1-pro-highspeed` | 1.0M | | | | | | $4 | $20 |
296
303
  | `llmgateway-providers/nebius/minimax-m3.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
297
304
  | `llmgateway-providers/novita/deepseek-v4-flash` | 1.1M | | | | | | $0.14 | $0.28 |
305
+ | `llmgateway-providers/novita/deepseek-v4-flash-0731` | 1.1M | | | | | | $0.14 | $0.28 |
298
306
  | `llmgateway-providers/novita/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
299
307
  | `llmgateway-providers/novita/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.30 | $1 |
300
308
  | `llmgateway-providers/novita/gemma-4-26b-a4b-it` | 262K | | | | | | $0.13 | $0.40 |
@@ -403,6 +411,7 @@ for await (const chunk of stream) {
403
411
  | `llmgateway-providers/scx-ai/minimax-m2.7` | 197K | | | | | | $0.48 | $2 |
404
412
  | `llmgateway-providers/scx-ai/qwen3-32b` | 33K | | | | | | $0.36 | $0.87 |
405
413
  | `llmgateway-providers/tencent/deepseek-v4-flash` | 1.0M | | | | | | $0.15 | $0.60 |
414
+ | `llmgateway-providers/tencent/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.15 | $0.60 |
406
415
  | `llmgateway-providers/tencent/deepseek-v4-pro` | 1.0M | | | | | | $0.66 | $2 |
407
416
  | `llmgateway-providers/tencent/deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
408
417
  | `llmgateway-providers/tencent/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.15 | $0.60 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![DevPass (LLM Gateway) logo](https://models.dev/logos/llmgateway.svg)DevPass (LLM Gateway)
6
6
 
7
- Access 202 DevPass (LLM Gateway) models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
7
+ Access 203 DevPass (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 [DevPass (LLM Gateway) documentation](https://llmgateway.io/docs).
10
10
 
@@ -60,7 +60,7 @@ for await (const chunk of stream) {
60
60
  | `llmgateway/custom` | 128K | | | | | | — | — |
61
61
  | `llmgateway/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.38 |
62
62
  | `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.08 | $0.15 |
63
- | `llmgateway/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
63
+ | `llmgateway/deepseek-v4-flash-0731` | 1.1M | | | | | | $0.08 | $0.18 |
64
64
  | `llmgateway/deepseek-v4-pro` | 1.1M | | | | | | $0.66 | $2 |
65
65
  | `llmgateway/deepseek-v4.1-flash` | 1.1M | | | | | | $0.14 | $0.54 |
66
66
  | `llmgateway/deepseek-v4.1-flash-1017` | 1.1M | | | | | | $0.14 | $0.54 |
@@ -190,6 +190,7 @@ for await (const chunk of stream) {
190
190
  | `llmgateway/mistral-medium-3-5` | 262K | | | | | | $2 | $8 |
191
191
  | `llmgateway/mistral-small-2506` | 128K | | | | | | $0.10 | $0.30 |
192
192
  | `llmgateway/mistral-small-2603` | 262K | | | | | | $0.15 | $0.60 |
193
+ | `llmgateway/muse-ember-1.0` | 1.0M | | | | | | $0.10 | $0.50 |
193
194
  | `llmgateway/muse-glimmer-30b` | 131K | | | | | | $0.30 | $1 |
194
195
  | `llmgateway/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
195
196
  | `llmgateway/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![NanoGPT logo](https://models.dev/logos/nano-gpt.svg)NanoGPT
6
6
 
7
- Access 633 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
7
+ Access 632 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
 
@@ -56,7 +56,7 @@ for await (const chunk of stream) {
56
56
  | `nano-gpt/amazon/nova-lite-v1` | 300K | | | | | | $0.06 | $0.24 |
57
57
  | `nano-gpt/amazon/nova-pro-v1` | 300K | | | | | | $0.80 | $3 |
58
58
  | `nano-gpt/anthracite-org/magnum-v2-72b` | 16K | | | | | | $2 | $3 |
59
- | `nano-gpt/anthracite-org/magnum-v4-72b` | 16K | | | | | | $2 | $3 |
59
+ | `nano-gpt/anthracite-org/magnum-v4-72b` | 16K | | | | | | $3 | $5 |
60
60
  | `nano-gpt/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
61
61
  | `nano-gpt/anthropic/claude-fable-5.1` | 1.0M | | | | | | $10 | $50 |
62
62
  | `nano-gpt/anthropic/claude-fable-5.2` | 1.0M | | | | | | $10 | $50 |
@@ -135,8 +135,6 @@ for await (const chunk of stream) {
135
135
  | `nano-gpt/deepseek/deepseek-v4-pro-0813:thinking` | 1.0M | | | | | | $0.66 | $2 |
136
136
  | `nano-gpt/deepseek/deepseek-v4-pro:thinking` | 1.0M | | | | | | $0.70 | $1 |
137
137
  | `nano-gpt/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.02 | $0.40 |
138
- | `nano-gpt/deepseek/deepseek-v4.1-flash-0910-uncensored` | 524K | | | | | | $0.33 | $1 |
139
- | `nano-gpt/deepseek/deepseek-v4.1-flash-0910-uncensored:thinking` | 524K | | | | | | $0.33 | $1 |
140
138
  | `nano-gpt/deepseek/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.10 | $0.60 |
141
139
  | `nano-gpt/deepseek/deepseek-v4.1-flash-1017:thinking` | 1.0M | | | | | | $0.10 | $0.60 |
142
140
  | `nano-gpt/deepseek/deepseek-v4.1-flash:thinking` | 1.0M | | | | | | $0.02 | $0.40 |
@@ -233,9 +231,9 @@ for await (const chunk of stream) {
233
231
  | `nano-gpt/google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
234
232
  | `nano-gpt/google/gemini-flash-lite-latest` | 1.0M | | | | | | $0.30 | $3 |
235
233
  | `nano-gpt/google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
236
- | `nano-gpt/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.04 | $0.11 |
234
+ | `nano-gpt/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.03 | $0.10 |
237
235
  | `nano-gpt/google/gemma-4-26b-a4b-it-cybersecurity` | 262K | | | | | | $0.11 | $0.33 |
238
- | `nano-gpt/google/gemma-4-26b-a4b-it:thinking` | 262K | | | | | | $0.04 | $0.11 |
236
+ | `nano-gpt/google/gemma-4-26b-a4b-it:thinking` | 262K | | | | | | $0.03 | $0.10 |
239
237
  | `nano-gpt/google/gemma-4-31b-it` | 262K | | | | | | $0.14 | $0.40 |
240
238
  | `nano-gpt/google/gemma-4-31b-it:thinking` | 262K | | | | | | $0.10 | $0.34 |
241
239
  | `nano-gpt/google/gemma4-31b-splituntied` | 262K | | | | | | $0.10 | $0.30 |
@@ -354,6 +352,7 @@ for await (const chunk of stream) {
354
352
  | `nano-gpt/NeverSleep/Lumimaid-v0.2-70B` | 16K | | | | | | $1 | $2 |
355
353
  | `nano-gpt/nex-agi/nex-n2.5-mini` | 262K | | | | | | $0.03 | $0.10 |
356
354
  | `nano-gpt/nex-agi/nex-n2.5-pro` | 262K | | | | | | $0.07 | $0.25 |
355
+ | `nano-gpt/nex-agi/nex-n2.6` | 262K | | | | | | $0.15 | $0.50 |
357
356
  | `nano-gpt/nothingiisreal/L3.1-70B-Celeste-V0.1-BF16` | 33K | | | | | | $0.49 | $0.49 |
358
357
  | `nano-gpt/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF` | 16K | | | | | | $0.36 | $0.41 |
359
358
  | `nano-gpt/nvidia/Llama-3.3-Nemotron-Super-49B-v1` | 128K | | | | | | $0.15 | $0.15 |
@@ -448,8 +447,8 @@ for await (const chunk of stream) {
448
447
  | `nano-gpt/qwen/qwen2.5-coder-32b-instruct` | 32K | | | | | | $0.20 | $0.20 |
449
448
  | `nano-gpt/qwen/qwen2.5-vl-72b-instruct` | 32K | | | | | | $0.70 | $0.70 |
450
449
  | `nano-gpt/qwen/qwen3-14b` | 41K | | | | | | $0.08 | $0.24 |
451
- | `nano-gpt/qwen/qwen3-235b-a22b` | 262K | | | | | | $0.09 | $0.35 |
452
- | `nano-gpt/qwen/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.09 | $0.35 |
450
+ | `nano-gpt/qwen/qwen3-235b-a22b` | 262K | | | | | | $0.09 | $0.55 |
451
+ | `nano-gpt/qwen/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.09 | $0.55 |
453
452
  | `nano-gpt/qwen/qwen3-235b-a22b-thinking-2507` | 131K | | | | | | $0.30 | $0.50 |
454
453
  | `nano-gpt/qwen/qwen3-30b-a3b` | 41K | | | | | | $0.10 | $0.30 |
455
454
  | `nano-gpt/qwen/qwen3-30b-a3b-instruct-2507` | 256K | | | | | | $0.20 | $0.50 |
@@ -572,15 +571,15 @@ for await (const chunk of stream) {
572
571
  | `nano-gpt/TEE/qwen3.8-27b` | 262K | | | | | | $0.20 | $3 |
573
572
  | `nano-gpt/tencent/hy3` | 262K | | | | | | $0.07 | $0.26 |
574
573
  | `nano-gpt/tencent/hy4` | 1.0M | | | | | | $0.46 | $1 |
575
- | `nano-gpt/tencent/hy4-preview` | 1.0M | | | | | | $0.83 | $3 |
574
+ | `nano-gpt/tencent/hy4-preview` | 1.0M | | | | | | $0.75 | $2 |
576
575
  | `nano-gpt/TheDrummer/Anubis-70B-v1` | 66K | | | | | | $0.31 | $0.31 |
577
- | `nano-gpt/TheDrummer/Anubis-70B-v1.1` | 32K | | | | | | $0.31 | $0.31 |
576
+ | `nano-gpt/TheDrummer/Anubis-70B-v1.1` | 33K | | | | | | $0.31 | $0.31 |
578
577
  | `nano-gpt/TheDrummer/artemis-31b-v1.2` | 66K | | | | | | $0.10 | $0.45 |
579
578
  | `nano-gpt/TheDrummer/Artemis-v1.1` | 262K | | | | | | $0.10 | $0.45 |
580
579
  | `nano-gpt/TheDrummer/Cydonia-24B-v2` | 33K | | | | | | $0.10 | $0.12 |
581
580
  | `nano-gpt/TheDrummer/Cydonia-24B-v4` | 33K | | | | | | $0.20 | $0.24 |
582
581
  | `nano-gpt/TheDrummer/Cydonia-24B-v4.1` | 131K | | | | | | $0.30 | $0.50 |
583
- | `nano-gpt/TheDrummer/Cydonia-24B-v4.3` | 131K | | | | | | $0.12 | $0.15 |
582
+ | `nano-gpt/TheDrummer/Cydonia-24B-v4.3` | 66K | | | | | | $0.12 | $0.15 |
584
583
  | `nano-gpt/TheDrummer/Magidonia-24B-v4.3` | 33K | | | | | | $0.10 | $0.12 |
585
584
  | `nano-gpt/TheDrummer/Rocinante-12B-v1.1` | 16K | | | | | | $0.41 | $0.59 |
586
585
  | `nano-gpt/TheDrummer/skyfall-36b-v2` | 33K | | | | | | $0.55 | $0.80 |
@@ -629,10 +628,10 @@ for await (const chunk of stream) {
629
628
  | `nano-gpt/z-ai/GLM-4.5:thinking` | 128K | | | | | | $0.30 | $1 |
630
629
  | `nano-gpt/z-ai/glm-4.5v` | 66K | | | | | | $0.60 | $2 |
631
630
  | `nano-gpt/z-ai/glm-4.5v:thinking` | 66K | | | | | | $0.60 | $2 |
632
- | `nano-gpt/z-ai/glm-4.6` | 200K | | | | | | $0.50 | $2 |
633
- | `nano-gpt/z-ai/glm-4.6-original` | 256K | | | | | | $0.50 | $2 |
634
- | `nano-gpt/z-ai/GLM-4.6-turbo` | 205K | | | | | | $1 | $3 |
635
- | `nano-gpt/z-ai/GLM-4.6-turbo:thinking` | 205K | | | | | | $1 | $3 |
631
+ | `nano-gpt/z-ai/glm-4.6` | 200K | | | | | | $0.55 | $2 |
632
+ | `nano-gpt/z-ai/glm-4.6-original` | 256K | | | | | | $0.55 | $2 |
633
+ | `nano-gpt/z-ai/GLM-4.6-turbo` | 205K | | | | | | $0.55 | $2 |
634
+ | `nano-gpt/z-ai/GLM-4.6-turbo:thinking` | 205K | | | | | | $0.55 | $2 |
636
635
  | `nano-gpt/z-ai/glm-4.6:thinking` | 200K | | | | | | $0.55 | $2 |
637
636
  | `nano-gpt/z-ai/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
638
637
  | `nano-gpt/z-ai/glm-4.6v-original` | 128K | | | | | | $0.60 | $0.90 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenCode logo](https://models.dev/logos/opencode.svg)OpenCode
6
6
 
7
- Access 137 OpenCode models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
7
+ Access 138 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
 
@@ -67,6 +67,7 @@ for await (const chunk of stream) {
67
67
  | `opencode/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
68
68
  | `opencode/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
69
69
  | `opencode/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
70
+ | `opencode/gemini-4-carbon` | 1.0M | | | | | | $2 | $10 |
70
71
  | `opencode/glm-5` | 205K | | | | | | $1 | $3 |
71
72
  | `opencode/glm-5.1` | 205K | | | | | | $1 | $4 |
72
73
  | `opencode/glm-5.2` | 1.0M | | | | | | $1 | $4 |
@@ -507,7 +507,9 @@ Returns: `Promise<ModelAuthStatus>`
507
507
 
508
508
  #### `listAvailableModels()`
509
509
 
510
- List models from the configured and built-in gateways. Results are cached briefly and sorted with usage data when `modelUseCountProvider` is configured.
510
+ List models from the configured and built-in gateways. Each model's `useCount` comes from `modelUseCountProvider` when you configure one.
511
+
512
+ The built-in gateways download public catalogs (models.dev and Netlify). A call waits for a catalog only while none has downloaded yet. After that, calls return the last downloaded catalog, including when a download fails. Once it's 5 minutes old, the next call downloads a new one in the background without waiting for it. Configured gateways and API key availability are checked again after 10 seconds.
511
513
 
512
514
  ```typescript
513
515
  const models = await controller.listAvailableModels()
@@ -517,7 +519,7 @@ Returns: `Promise<AvailableModel[]>`
517
519
 
518
520
  #### `invalidateAvailableModelsCache()`
519
521
 
520
- Clear the available-model cache.
522
+ Make the next `listAvailableModels()` call check configured gateways and API key availability again, and download the models.dev and Netlify catalogs again in the background. Call it after your app stores or removes a credential or changes a custom provider.
521
523
 
522
524
  ```typescript
523
525
  controller.invalidateAvailableModelsCache()
@@ -10,9 +10,9 @@ Use [`handleChatStream()`](https://mastra.ai/reference/ai-sdk/handle-chat-stream
10
10
 
11
11
  `chatRoute()` keeps the existing AI SDK v5/default behavior. If your app is typed against AI SDK v6, pass `version: 'v6'`.
12
12
 
13
- > **Disconnect behavior:** `chatRoute()` forwards the incoming request's `AbortSignal` to `agent.stream()`. If the client disconnects, Mastra aborts the in-flight generation.
13
+ > **Disconnect behavior:** By default, `chatRoute()` forwards the incoming request's `AbortSignal` to `agent.stream()`. If the client disconnects, Mastra aborts the in-flight generation.
14
14
  >
15
- > If you want the server to continue generation and persist the final response after disconnect, build a [custom API route](https://mastra.ai/docs/server/custom-api-routes) around `agent.stream()` and call `consumeStream()` on the returned `MastraModelOutput`.
15
+ > Set `resumable: true` to let the generation continue after a disconnect and allow AI SDK UI to reconnect to the active stream. Resumable chats don't support abort-based cancellation because `useChat().stop()` is indistinguishable from a refresh or network interruption at the server.
16
16
 
17
17
  ## Usage example
18
18
 
@@ -61,6 +61,8 @@ export const mastra = new Mastra({
61
61
 
62
62
  **agentVersion** (`{ versionId: string } | { status?: 'draft' | 'published' }`): Selects a specific agent version. Pass { versionId: '\<id>' } to target an exact version, or { status: 'draft' } / { status: 'published' } to resolve by status. When the route is called, query parameters ?versionId=\<id> or ?status=draft|published take precedence over this static value. Requires the Editor to be configured.
63
63
 
64
+ **resumable** (`boolean`): Enables AI SDK UI stream resumption. Returns the POST route and a GET \<path>/:chatId/stream route, uses the AI SDK chat ID as the Mastra thread ID, and lets generation continue after the POST connection closes. (Default: `false`)
65
+
64
66
  **defaultOptions** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
65
67
 
66
68
  **sendStart** (`boolean`): Whether to send start events in the stream. (Default: `true`)
@@ -77,6 +79,35 @@ export const mastra = new Mastra({
77
79
 
78
80
  **heartbeatMs** (`number`): Interval in milliseconds for SSE heartbeats that keep connections active through infrastructure with idle timeouts.
79
81
 
82
+ ## Resumable streams
83
+
84
+ Set `resumable: true` on `chatRoute()` and `resume: true` on AI SDK UI's `useChat()` to reconnect after a refresh or network interruption. The route factory returns a two-item array containing:
85
+
86
+ - `POST <path>`: Starts the agent run. The request's AI SDK chat ID becomes the Mastra memory thread ID.
87
+ - `GET <path>/:chatId/stream`: Replays cached events and follows the active run. The route returns `204` when the run is finished, unavailable, expired, or outside the caller's scope.
88
+
89
+ Pass the returned array as one entry in `server.apiRoutes`. Mastra flattens nested route arrays during server configuration.
90
+
91
+ ```typescript
92
+ import { Mastra } from '@mastra/core'
93
+ import { chatRoute } from '@mastra/ai-sdk'
94
+
95
+ export const mastra = new Mastra({
96
+ server: {
97
+ apiRoutes: [
98
+ chatRoute({
99
+ path: '/chat/:agentId',
100
+ resumable: true,
101
+ }),
102
+ ],
103
+ },
104
+ })
105
+ ```
106
+
107
+ Active-run discovery is process-local. A reconnect request must reach the same running server process that started the generation. Resumable mode doesn't forward the request `AbortSignal`, so `useChat().stop()` closes the client connection without cancelling the agent run.
108
+
109
+ If the chat uses a resource ID, set `MASTRA_RESOURCE_ID_KEY` in the request context through authentication middleware. Don't send the resource ID only as `memory.resource` in the POST body: the reconnecting GET request has no body, so `chatRoute()` rejects that configuration with `400`.
110
+
80
111
  ## Additional configuration
81
112
 
82
113
  You can use [`prepareSendMessagesRequest`](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#transport.default-chat-transport.prepare-send-messages-request) to customize the request sent to the chat route, for example to pass additional configuration to the agent:
@@ -45,7 +45,9 @@ const scorer = createScorer({
45
45
 
46
46
  **judge.model** (`LanguageModel`): The LLM model instance to use for evaluation.
47
47
 
48
- **judge.instructions** (`string`): System prompt/instructions for the LLM.
48
+ **judge.instructions** (`SystemMessage | ({ requestContext: RequestContext }) => SystemMessage | Promise<SystemMessage>`): System instructions for the LLM. Can be a string, array of strings, system message object, array of system messages, or a function that returns any of these types.
49
+
50
+ **judge.requestContext** (`RequestContext`): Values available to the judge's dynamic instructions, tools, and processors. Values from the run's requestContext override these values. scorer.run doesn't pass reserved Mastra keys or MastraMemory from the run to the judge, because they could put the judge on the caller's memory thread or give it credentials such as the auth token. To give the judge a reserved key, set it on this option. Only the scorer-level judge accepts this option.
49
51
 
50
52
  **judge.jsonPromptInjection** (`boolean | 'system' | 'inline' | 'auto'`): Controls how the judge's structured output schema reaches the model. Defaults to 'auto', which uses native structured output when supported and inline prompt injection otherwise. Explicit values override automatic routing.
51
53
 
@@ -31,6 +31,7 @@ interface ObservabilityInstanceConfig {
31
31
  serviceName: string
32
32
  sampling?: SamplingStrategy
33
33
  exporters?: ObservabilityExporter[]
34
+ retainStorageExporterOnPlatform?: boolean
34
35
  spanOutputProcessors?: SpanOutputProcessor[]
35
36
  includeInternalSpans?: boolean
36
37
  excludeSpanTypes?: SpanType[]
@@ -49,6 +50,8 @@ interface ObservabilityInstanceConfig {
49
50
 
50
51
  **exporters** (`ObservabilityExporter[]`): Trace data exporters
51
52
 
53
+ **retainStorageExporterOnPlatform** (`boolean`): Defaults to false. Retains configured MastraStorageExporter instances on Platform, including later registration. Known local storage remains blocked, and deprecated DefaultExporter remains disabled. See storage export on Platform for configuration, adapter requirements, and restrictions.
54
+
52
55
  **spanOutputProcessors** (`SpanOutputProcessor[]`): Span output processors
53
56
 
54
57
  **includeInternalSpans** (`boolean`): Include spans internal to Mastra operations
@@ -8,6 +8,10 @@ Persists traces to Mastra's configured storage with automatic batching and retry
8
8
 
9
9
  > **Note:** `MastraStorageExporter` was previously called `DefaultExporter`. The original `DefaultExporter` class is still exported from `@mastra/observability` so existing imports keep working, but it's deprecated and will be removed in a future major version. New code should use `MastraStorageExporter`.
10
10
 
11
+ > **Platform storage restrictions:** When `MASTRA_DEPLOYMENT_ID` is set, this exporter is disabled by default. Set `retainStorageExporterOnPlatform: true` on the **observability config**, not the exporter constructor, to allow remote storage export. `InMemoryStore` (including the fallback when no storage is configured), local libSQL, embedded replicas, and DuckDB remain blocked when the adapter reports local persistence, even with the opt-in. No observability events are written to that local database, even if the initialization warning is hidden by your logging setup.
12
+ >
13
+ > See [storage export on Platform](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage) for the supported-provider table, adapter upgrade requirements, and a configuration example.
14
+
11
15
  ## Span previews
12
16
 
13
17
  `MastraStorageExporter` automatically generates short, readable `inputPreview`, `outputPreview`, and `errorPreview` summaries based on the span type. Each preview contains up to 100 characters plus an ellipsis when truncated. Full payloads remain available separately.
@@ -1261,6 +1261,8 @@ interface ObservabilityInstanceConfig {
1261
1261
  }
1262
1262
  ```
1263
1263
 
1264
+ The `@mastra/observability` implementation also supports `retainStorageExporterOnPlatform`. See the [configuration reference](https://mastra.ai/reference/observability/tracing/configuration) for this implementation-specific option.
1265
+
1264
1266
  ### `ObservabilityRegistryConfig`
1265
1267
 
1266
1268
  Complete observability registry configuration.
@@ -1764,7 +1764,9 @@ With hooks disabled, your application is responsible for closing MCP connections
1764
1764
 
1765
1765
  For HTTP servers, you can provide a custom `fetch` function to handle runtime-defined authentication or request interception. It can also handle other custom behavior. This is particularly useful when you need to refresh tokens on each request or forward user credentials from the incoming request to the MCP server.
1766
1766
 
1767
- The custom `fetch` function receives an optional third `requestContext` parameter, which provides access to request-scoped data (e.g., authentication cookies, bearer tokens) set by middleware or passed during agent/tool execution. The `requestContext` is `null` during the initial connection handshake.
1767
+ The custom `fetch` function receives an optional third `requestContext` parameter, which provides access to request-scoped data (e.g., authentication cookies, bearer tokens) set by middleware or passed during agent/tool execution. The `requestContext` is `null` for requests that no tool call sends, such as `listTools()` and the connection handshake it opens. When a tool call opens the connection, either because a tool rebuilt with `toolsFromDefinitions()` or `toolFromDefinition()` connects on its first execution or because the call reconnects, the handshake receives that call's `requestContext`. Streams the connection keeps open afterward, such as the server-to-client event stream, keep using that same `requestContext`, and so do the client's replies to server requests on them, such as an answer to an input request. A request your own code starts from a server log or notification on those streams gets `null`.
1768
+
1769
+ A server that authenticates every request therefore needs a credential for discovery as well as for tool calls. The following example forwards the user's cookie when a tool call provides a `requestContext`, and sends the app's own token when there's none, as in `listTools()`. Any request without a `requestContext` gets that token, so have the server limit it to discovery, for example listing tools but not calling them.
1768
1770
 
1769
1771
  When `fetch` is provided, `requestInit` and `authProvider` become optional, as you can handle these concerns within your custom fetch function.
1770
1772
 
@@ -1775,10 +1777,15 @@ const mcpClient = new MCPClient({
1775
1777
  url: new URL('https://api.example.com/mcp'),
1776
1778
  fetch: async (url, init, requestContext) => {
1777
1779
  const headers = new Headers(init?.headers)
1778
- // Forward auth cookie from the incoming request
1779
- const cookie = requestContext?.get('cookie')
1780
- if (cookie) {
1781
- headers.set('cookie', cookie)
1780
+ if (requestContext) {
1781
+ // A tool call: forward the auth cookie from the incoming request
1782
+ const cookie = requestContext.get('cookie')
1783
+ if (cookie) {
1784
+ headers.set('cookie', cookie)
1785
+ }
1786
+ } else {
1787
+ // No requestContext, as in listTools(): a token the server only accepts for discovery
1788
+ headers.set('authorization', `Bearer ${process.env.MCP_DISCOVERY_TOKEN}`)
1782
1789
  }
1783
1790
  return fetch(url, { ...init, headers })
1784
1791
  },
@@ -1800,9 +1807,11 @@ await agent.generate('Hello!', {
1800
1807
  })
1801
1808
  ```
1802
1809
 
1810
+ If the server accepts only per-user credentials, skip `listTools()` at startup. Build the catalog with [`listToolDefinitions()`](#listtooldefinitions) from a client that has a credential of its own, for example in a build step with a static `requestInit` header, and store it. At runtime, rebuild the tools with [`toolsFromDefinitions()`](#toolsfromdefinitions). Each rebuilt tool opens the connection on its first call, so the handshake carries that call's `requestContext`.
1811
+
1803
1812
  ## Handling auth failures inside custom fetch
1804
1813
 
1805
- A custom `fetch` shouldn't `throw` when authentication is unavailable. Every MCP request is a `POST`, and the SDK surfaces a non-2xx response as an error to the caller of `listTools()`, `tools/call` and so on, which is the behavior you want. A thrown `fetch` is reported the same way but loses the server's status and body. The only long-lived request is the `subscriptions/listen` `POST` the client opens for `resources.subscribe()`, and it's retried after a failure, so an unauthenticated stream can loop. Wait for the token, then forward the request:
1814
+ A custom `fetch` shouldn't `throw` when authentication is unavailable. JSON-RPC requests such as `tools/call` are `POST`s, and the SDK surfaces a non-2xx response as an error to the caller of `listTools()`, `tools/call` and so on, which is the behavior you want. A thrown `fetch` is reported the same way but loses the server's status and body. On a 2025-11-25 server, the client also sends a `GET` with no body after the handshake to open the server-to-client event stream, so check `init.method` rather than assuming a `POST` body. Long-lived streams are reopened after a failure: the `subscriptions/listen` `POST` the client opens for `resources.subscribe()` and the `GET` event stream if it drops. An unauthenticated `subscriptions/listen` stream can loop. Wait for the token, then forward the request:
1806
1815
 
1807
1816
  ```typescript
1808
1817
  async function waitForToken(timeoutMs = 5000): Promise<string | null> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.13-alpha.6",
3
+ "version": "1.3.13-alpha.8",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.2.1",
28
28
  "zod": "^4.6.7",
29
- "@mastra/core": "1.83.0-alpha.3",
30
- "@mastra/mcp": "^2.9.0-alpha.1"
29
+ "@mastra/core": "1.83.0-alpha.5",
30
+ "@mastra/mcp": "^2.9.0-alpha.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.1.3",
@@ -43,8 +43,7 @@
43
43
  "typescript": "^7.0.2",
44
44
  "vitest": "5.1.0",
45
45
  "@internal/lint": "0.0.148",
46
- "@internal/types-builder": "0.0.123",
47
- "@mastra/core": "1.83.0-alpha.3"
46
+ "@internal/types-builder": "0.0.123"
48
47
  },
49
48
  "homepage": "https://mastra.ai",
50
49
  "repository": {