@mastra/mcp-docs-server 1.3.9-alpha.1 → 1.3.9-alpha.10

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 (115) hide show
  1. package/.docs/docs/agents/guardrails.md +3 -0
  2. package/.docs/docs/agents/human-in-the-loop.md +2 -1
  3. package/.docs/docs/agents/processors.md +3 -0
  4. package/.docs/docs/harness/agent-controller.md +1 -1
  5. package/.docs/docs/harness/background-tasks.md +11 -0
  6. package/.docs/docs/harness/durable-agents.md +24 -8
  7. package/.docs/docs/harness/signals.md +3 -1
  8. package/.docs/docs/mastra-platform/connect/channels.md +14 -2
  9. package/.docs/docs/mastra-platform/connect/overview.md +1 -1
  10. package/.docs/docs/mastra-platform/connect/providers.md +1 -0
  11. package/.docs/docs/mastra-platform/connect/tools.md +25 -3
  12. package/.docs/docs/mastra-platform/observability.md +1 -1
  13. package/.docs/docs/memory/observational-memory.md +4 -2
  14. package/.docs/docs/memory/semantic-recall.md +2 -0
  15. package/.docs/docs/studio/overview.md +8 -0
  16. package/.docs/docs/workflows/control-flow.md +3 -1
  17. package/.docs/docs/workflows/overview.md +2 -0
  18. package/.docs/docs/workflows/time-travel.md +1 -1
  19. package/.docs/integrations/databases/clickhouse.md +1 -1
  20. package/.docs/integrations/voice/google.md +6 -0
  21. package/.docs/models/embeddings.md +2 -1
  22. package/.docs/models/environment-variables.md +2 -0
  23. package/.docs/models/gateways/merge-gateway.md +3 -1
  24. package/.docs/models/gateways/netlify.md +8 -4
  25. package/.docs/models/gateways/openrouter.md +8 -4
  26. package/.docs/models/gateways/vercel.md +9 -4
  27. package/.docs/models/index.md +3 -1
  28. package/.docs/models/providers/302ai.md +2 -1
  29. package/.docs/models/providers/aimlapi.md +3 -3
  30. package/.docs/models/providers/alibaba-token-plan-cn.md +31 -30
  31. package/.docs/models/providers/baseten.md +27 -25
  32. package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
  33. package/.docs/models/providers/commandcode.md +147 -0
  34. package/.docs/models/providers/coralbricks.md +5 -8
  35. package/.docs/models/providers/cortecs.md +5 -6
  36. package/.docs/models/providers/databricks.md +2 -1
  37. package/.docs/models/providers/deepinfra.md +2 -1
  38. package/.docs/models/providers/edenai.md +11 -3
  39. package/.docs/models/providers/empiriolabs.md +3 -1
  40. package/.docs/models/providers/engy.md +12 -11
  41. package/.docs/models/providers/fireworks-ai.md +2 -1
  42. package/.docs/models/providers/huggingface.md +2 -1
  43. package/.docs/models/providers/hyper.md +26 -25
  44. package/.docs/models/providers/kenari.md +1 -1
  45. package/.docs/models/providers/kilo.md +29 -24
  46. package/.docs/models/providers/llmgateway-providers.md +9 -12
  47. package/.docs/models/providers/llmgateway.md +3 -4
  48. package/.docs/models/providers/melious.md +16 -15
  49. package/.docs/models/providers/minimax-cn-coding-plan.md +2 -1
  50. package/.docs/models/providers/minimax-cn.md +3 -2
  51. package/.docs/models/providers/minimax-coding-plan.md +2 -1
  52. package/.docs/models/providers/minimax.md +3 -2
  53. package/.docs/models/providers/nano-gpt.md +61 -55
  54. package/.docs/models/providers/nearai.md +1 -1
  55. package/.docs/models/providers/nebius.md +2 -1
  56. package/.docs/models/providers/novita-ai.md +2 -1
  57. package/.docs/models/providers/nvidia.md +2 -1
  58. package/.docs/models/providers/ofox.md +26 -25
  59. package/.docs/models/providers/ollama-cloud.md +31 -29
  60. package/.docs/models/providers/openai.md +1 -1
  61. package/.docs/models/providers/opencode-go.md +7 -7
  62. package/.docs/models/providers/opencode.md +91 -91
  63. package/.docs/models/providers/pioneer.md +120 -119
  64. package/.docs/models/providers/prime.md +4 -1
  65. package/.docs/models/providers/reflection.md +77 -0
  66. package/.docs/models/providers/requesty.md +6 -2
  67. package/.docs/models/providers/scaleway.md +2 -1
  68. package/.docs/models/providers/standardcompute.md +47 -8
  69. package/.docs/models/providers/togetherai.md +4 -1
  70. package/.docs/models/providers/upstage.md +8 -7
  71. package/.docs/models/providers/wandb.md +4 -2
  72. package/.docs/models/providers/xai.md +0 -1
  73. package/.docs/models/providers/zenmux.md +2 -1
  74. package/.docs/models/providers.md +2 -0
  75. package/.docs/reference/agent-controller/session.md +3 -2
  76. package/.docs/reference/agents/channels.md +5 -1
  77. package/.docs/reference/agents/durable-agent.md +16 -7
  78. package/.docs/reference/agents/inngest-agent.md +4 -4
  79. package/.docs/reference/classifier/classifier.md +31 -7
  80. package/.docs/reference/cli/mastra.md +43 -6
  81. package/.docs/reference/client-js/agent-controller.md +2 -0
  82. package/.docs/reference/client-js/agents.md +20 -0
  83. package/.docs/reference/client-js/observability.md +165 -6
  84. package/.docs/reference/configuration.md +30 -0
  85. package/.docs/reference/connect/channels.md +2 -2
  86. package/.docs/reference/connect/providers.md +38 -3
  87. package/.docs/reference/connect/tools.md +21 -2
  88. package/.docs/reference/core/mastra-class.md +7 -1
  89. package/.docs/reference/datasets/list.md +9 -1
  90. package/.docs/reference/evals/create-classifier-scorer.md +1 -0
  91. package/.docs/reference/index.md +1 -1
  92. package/.docs/reference/memory/observational-memory.md +2 -2
  93. package/.docs/reference/memory/settled.md +13 -5
  94. package/.docs/reference/observability/metrics/automatic-metrics.md +3 -3
  95. package/.docs/reference/observability/metrics/queries.md +1 -0
  96. package/.docs/reference/observability/tracing/{trace-query.md → advanced-queries.md} +477 -158
  97. package/.docs/reference/observability/tracing/interfaces.md +6 -0
  98. package/.docs/reference/processors/classifier-processor.md +8 -6
  99. package/.docs/reference/processors/model-selection-processor.md +2 -2
  100. package/.docs/reference/processors/moderation-processor.md +5 -1
  101. package/.docs/reference/processors/system-prompt-scrubber.md +4 -0
  102. package/.docs/reference/rag/embeddings.md +18 -0
  103. package/.docs/reference/signals/create-notification-inbox-tool.md +11 -9
  104. package/.docs/reference/streaming/agents/stream.md +19 -1
  105. package/.docs/reference/tools/create-tool.md +2 -2
  106. package/.docs/reference/tools/mcp-client.md +2 -2
  107. package/.docs/reference/workflows/dynamic-workflow-definition.md +1 -1
  108. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  109. package/.docs/reference/workflows/run-methods/timeTravel.md +15 -16
  110. package/.docs/reference/workflows/step.md +1 -0
  111. package/.docs/reference/workflows/workflow-methods/classifier.md +1 -0
  112. package/.docs/reference/workspace/factory-sandbox.md +2 -0
  113. package/.docs/reference/workspace/filesystem.md +4 -0
  114. package/.docs/reference/workspace/workspace-class.md +10 -10
  115. package/package.json +7 -8
@@ -336,11 +336,13 @@ export const outputGuardrails = createWorkflow({
336
336
  .parallel([
337
337
  createStep(
338
338
  new PIIDetector({
339
+ model: 'openai/gpt-5-nano',
339
340
  strategy: 'redact',
340
341
  }),
341
342
  ),
342
343
  createStep(
343
344
  new ModerationProcessor({
345
+ model: 'openai/gpt-5-nano',
344
346
  strategy: 'block',
345
347
  }),
346
348
  ),
@@ -353,6 +355,7 @@ export const outputGuardrails = createWorkflow({
353
355
  .then(
354
356
  createStep(
355
357
  new SystemPromptScrubber({
358
+ model: 'openai/gpt-5-nano',
356
359
  strategy: 'redact',
357
360
  placeholderText: '[REDACTED]',
358
361
  }),
@@ -144,7 +144,8 @@ const stream = await agent.stream('Clean up old records', {
144
144
  },
145
145
  })
146
146
 
147
- return result.answers.requiresApproval.probability >= 0.7
147
+ // A refused question has no probability, so it falls back to requiring approval.
148
+ return (result.answers.requiresApproval.probability ?? 1) >= 0.7
148
149
  },
149
150
  })
150
151
  ```
@@ -871,16 +871,19 @@ const moderationWorkflow = createWorkflow({
871
871
  .parallel([
872
872
  createStep(
873
873
  new PIIDetector({
874
+ model: 'openai/gpt-5-nano',
874
875
  strategy: 'redact',
875
876
  }),
876
877
  ),
877
878
  createStep(
878
879
  new PromptInjectionDetector({
880
+ model: 'openai/gpt-5-nano',
879
881
  strategy: 'block',
880
882
  }),
881
883
  ),
882
884
  createStep(
883
885
  new ModerationProcessor({
886
+ model: 'openai/gpt-5-nano',
884
887
  strategy: 'block',
885
888
  }),
886
889
  ),
@@ -513,7 +513,7 @@ const subscription = await session.subscribe({
513
513
  subscription.unsubscribe()
514
514
  ```
515
515
 
516
- `subscribe()` takes an options object and is async, unlike the in-process listener. Its promise resolves once the stream is established and rejects when it can't connect. A rejected call leaves nothing running in the background. `reconnect: true` re-establishes a stream that drops after it was established, with exponential backoff.
516
+ `subscribe()` takes an options object and is async, unlike the in-process listener. Its promise resolves once the stream is established and rejects when it can't connect. A rejected call leaves nothing running in the background. `reconnect: true` re-establishes a stream that drops after it was established, with exponential backoff. A connection that goes silent without closing, for example after the device sleeps, counts as a drop once no data, including server heartbeats, arrives for `idleTimeoutMs` (default `60000`).
517
517
 
518
518
  The server doesn't replay events missed while the stream was down, so read `session.state()` from `onReconnect` for the current mode, model, and thread. The client surface has no `session.displayState.get()`.
519
519
 
@@ -176,6 +176,17 @@ const stream = await agent.stream('Research solana for me', {
176
176
 
177
177
  Visit [`Agent.stream()`](https://mastra.ai/reference/streaming/agents/stream) for the full API.
178
178
 
179
+ To change the default for every `untilIdle: true` call, including calls Mastra makes internally, set `untilIdleMaxIdleMs` on the Mastra `backgroundTasks` config. Use a value longer than your slowest background task so its completion still triggers a continuation turn. A per-call `maxIdleMs` still takes precedence:
180
+
181
+ ```typescript
182
+ export const mastra = new Mastra({
183
+ backgroundTasks: {
184
+ enabled: true,
185
+ untilIdleMaxIdleMs: 30 * 60_000,
186
+ },
187
+ })
188
+ ```
189
+
179
190
  ### Aggregate properties
180
191
 
181
192
  `stream()` with `untilIdle` returns a `MastraModelOutput` that looks like the one from a regular `stream()` call, but `fullStream` alone spans the initial turn and any auto-continuations. Aggregate properties (`text`, `toolCalls`, `toolResults`, `finishReason`, `messageList`, `getFullOutput()`) still resolve against the **first turn's** internal buffer. If you need an aggregate view across continuations, consume `fullStream` yourself and accumulate.
@@ -170,7 +170,11 @@ for await (const chunk of output.fullStream) {
170
170
  }
171
171
  ```
172
172
 
173
- Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. Events arrive only when the published index reaches the requested offset. If the index counter restarts below that offset and never reaches it, observation remains pending indefinitely. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
173
+ Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. For a completed run, observation replays the retained events and closes. If the run is unknown or its history has been cleared and no live run remains, observation closes without events. The HTTP observe endpoint returns an empty, closed stream in this case rather than waiting for its idle timeout.
174
+
175
+ The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
176
+
177
+ Replay isn't a permanent execution archive. Events remain available only until [cleanup](#cleanup) clears them or the cache removes them. A workflow snapshot can't reconstruct cleared stream events, and disabling caching prevents historical replay.
174
178
 
175
179
  Observing doesn't own the run. When the loop ends, or you leave it early with `break`, `return`, or an error, the observer unsubscribes and the run keeps going for anyone else watching it. To stop observing from outside the loop, for example when the client disconnects, call `detach()`:
176
180
 
@@ -188,7 +192,7 @@ for await (const chunk of output.fullStream) {
188
192
 
189
193
  If you pass `idleTimeoutMs` and no chunks arrive for that long, Mastra checks `isAlive` when you provide it. If `isAlive` returns `true` or throws, the timer restarts and the stream stays open. Otherwise the stream ends with an error chunk and detaches the observer. The run itself is only cleaned up when `isAlive` returns `false`.
190
194
 
191
- `createDurableAgent()` and `createEventedAgent()` use an in-memory cache by default, which means resumable streams work within a single process. For production, provide a persistent cache backend (e.g., Redis) so cached events survive process restarts:
195
+ `createDurableAgent()` and `createEventedAgent()` use an in-memory cache by default, which means resumable streams work within a single process. For reconnects across processes or replicas, share the replay cache, PubSub transport, and run storage between the producer and observer. A shared transport delivers live events but can't recover events held only in another process's cache. Configure a persistent cache backend (for example, Redis) so retained events survive process restarts:
192
196
 
193
197
  ```typescript
194
198
  import { createDurableAgent } from '@mastra/core/agent/durable'
@@ -249,7 +253,7 @@ Visit [Background tasks](https://mastra.ai/docs/harness/background-tasks) for th
249
253
 
250
254
  Every `stream()` and `observe()` call returns a `cleanup` function that tears the run down: it unsubscribes from PubSub, removes the run from the internal registry, and deletes the run's cached events so nobody can replay it afterward.
251
255
 
252
- When you don't call `cleanup()` yourself, Mastra calls it `cleanupTimeoutMs` after the run finishes, errors, or is aborted. Detaching an observer or reaching a plain `idleTimeoutMs` doesn't start this timer. Set `cleanupTimeoutMs: 0` to turn the timer off.
256
+ When you don't call `cleanup()` yourself, Mastra calls it `cleanupTimeoutMs` after the run finishes, errors, or is aborted. The default is 30 seconds, so completed-run replay is limited to that window unless you configure a different value or call `cleanup()` sooner. Detaching an observer or reaching a plain `idleTimeoutMs` doesn't start this timer. Set `cleanupTimeoutMs: 0` to turn the timer off.
253
257
 
254
258
  Call `cleanup()` from the process that started the run. To stop watching a run from `observe()`, use `detach()` or leave the loop instead.
255
259
 
@@ -320,6 +324,10 @@ export const mastra = new Mastra({
320
324
 
321
325
  On startup, this discovers every registered durable agent with runs stuck in `running` status and re-drives them from the last persisted snapshot.
322
326
 
327
+ Recovery attempts runs serially, waiting up to 30 seconds per run for both `recover()` setup and settlement of the whole recovered workflow. If that wait expires, the attempt continues in the background while recovery moves to later runs and agents. Discovery and overridden custom recovery methods aren't bounded by this budget.
328
+
329
+ When shutdown begins, recovery stops dispatching new runs and agents and cancels pending re-checks. Original attempts, including those whose wait timed out, remain tracked for Mastra's shared shutdown drain. A recovery timeout doesn't cancel execution or add a separate drain window.
330
+
323
331
  Recovery doesn't take over a run that another execution still drives. It skips the run and checks it again once that execution's claim could have lapsed. A run whose process crashed shortly before the restart is still recovered, without another call.
324
332
 
325
333
  ### Manual recovery
@@ -330,20 +338,20 @@ If you need finer control, such as running recovery on a schedule, call the meth
330
338
  // Recover all durable agents
331
339
  const result = await mastra.recoverAllDurableAgents()
332
340
  console.log(
333
- `Recovered ${result.recovered} runs (${result.succeeded} ok, ${result.failed} failed, ${result.skipped} still live)`,
341
+ `Recovered ${result.recovered} runs (${result.succeeded} ok, ${result.failed} failed, ${result.skipped} skipped)`,
334
342
  )
335
343
 
336
344
  // Recover a specific agent
337
345
  const { recovered } = await durableAgent.recoverActiveRuns()
338
346
  for (const run of recovered) {
339
- if (run.status === 'skipped') console.log(`${run.runId} is still live: ${run.reason}`)
347
+ if (run.status === 'skipped') console.log(`${run.runId} was skipped: ${run.reason}`)
340
348
  }
341
349
 
342
350
  // Recover a single known run
343
351
  await durableAgent.recoverActiveRuns({ runId: 'run-abc-123' })
344
352
  ```
345
353
 
346
- `recoverAllDurableAgents()` returns counts and re-checks skipped runs itself. `recoverActiveRuns()` returns each run's outcome as `success`, `failed`, or `skipped`, and doesn't re-check skipped runs. A run skipped because another process drives it carries `retryAt`, the time after which its claim lapses unless renewed.
354
+ `recoverAllDurableAgents()` returns counts and schedules eligible ownership re-checks itself. `recoverActiveRuns()` returns each run's outcome as `success`, `failed`, or `skipped`, and doesn't re-check skipped runs. A run skipped because another process drives it carries `retryAt`, the time after which its claim lapses unless renewed. A timed-out attempt instead returns `status: 'skipped'` with `reason: 'recovery-timeout'` and no `retryAt`, so Mastra doesn't automatically retry it. Only the `skipped` count includes this attempt; the `recovered`, `succeeded`, and `failed` counts exclude it even if it settles later.
347
355
 
348
356
  Manual recovery reads the same `running` checkpoints as automatic recovery. For a `DurableAgent` using the default snapshot policy with `recovery.durableAgents` set to `'off'`, in-flight runs are only checkpointed at step boundaries reached after `mastra.shutdown()` starts. A run that crashes before then, or doesn't reach a step boundary during the drain, has no checkpoint, so `listActiveRuns()` and `recoverActiveRuns()` don't find it. See [snapshot persistence](#snapshot-persistence).
349
357
 
@@ -353,11 +361,11 @@ To take over a run that's still live, such as one held by a hung execution, call
353
361
  const { output } = await durableAgent.recover('run-abc-123', { force: true })
354
362
  ```
355
363
 
356
- The execution that held the run loses it and stops, and streams for the run drop the events it still publishes. Without `force`, `recover()` throws `DURABLE_AGENT_RUN_ACTIVE` for a live run. Even with `force`, `recover()` refuses a run that the same process is executing.
364
+ The execution that held the run loses its claim. Mastra requests cancellation when that execution detects the loss. Work that ignores cancellation can continue. With storage-backed claims, streams drop events from older claim generations. See [stop work after ownership loss](#stop-work-after-ownership-loss) for cancellation limits. Without `force`, `recover()` throws `DURABLE_AGENT_RUN_ACTIVE` for a live run. Even with `force`, `recover()` refuses a run that the same process is executing.
357
365
 
358
366
  ### Run ownership
359
367
 
360
- Every `stream()`, `generate()`, `resume()`, and `recover()` call claims the run before it executes and renews the claim every 10 seconds. A claim lapses 30 seconds after its last renewal, so a run whose process crashed becomes recoverable within 30 seconds. Until then, recovery treats the run as live, and a `stream()` or `resume()` call for that run waits up to 5 seconds for the claim, then throws `DURABLE_AGENT_EXECUTION_CONFLICT`. `mastra.shutdown()` stops the runs still executing after its drain window without further writes and releases their claims. The next boot then recovers them without waiting for the claims to lapse.
368
+ Every `stream()`, `generate()`, `resume()`, and `recover()` call claims the run before it executes and renews the claim every 5 seconds. A claim lapses 15 seconds after its last renewal, so a run whose process crashed becomes recoverable within 15 seconds. Until then, recovery treats the run as live, and a `stream()` or `resume()` call for that run waits up to 5 seconds for the claim, then throws `DURABLE_AGENT_EXECUTION_CONFLICT`. `mastra.shutdown()` stops the runs still executing after its drain window without further writes and releases their claims. The next boot then recovers them without waiting for the claims to lapse. Set `MASTRA_AGENT_THREAD_LEASE_TTL_MS` to change the lapse time. Renewal happens every third of it unless `MASTRA_AGENT_THREAD_LEASE_RENEW_INTERVAL_MS` sets an interval shorter than the TTL.
361
369
 
362
370
  Enforcement of the claim depends on the workflows store. When the store supports run fencing, the claim is a record in that store, and each write is checked against the claim in the same operation. Once another execution claims the run, writes from the execution that lost it are rejected. That execution's message, thread, and working memory writes are rejected only if the memory store supports run fencing too, so they still land when the agent's `Memory` uses a storage adapter without it. These storage adapters support run fencing:
363
371
 
@@ -386,6 +394,14 @@ With any other workflows store, the claim is a lease on the [PubSub](https://mas
386
394
 
387
395
  A lease only coordinates the processes that share it. `EventEmitterPubSub`, the default, covers one process. `UnixSocketPubSub` covers the processes on one host. `RedisStreamsPubSub` and `ValkeyStreamsPubSub` cover every instance connected to the same server. `GoogleCloudPubSub` doesn't provide leases, so with a store that lacks run fencing every claim succeeds, and recovery can take over a run that's still live.
388
396
 
397
+ ### Stop work after ownership loss
398
+
399
+ Durable and evented agents request cancellation of in-flight tool and model calls when their step detects that it no longer owns the run. Evented workers in another process check ownership at the claim renewal interval without renewing the original execution's claim. By default that's every 5 seconds, a third of `MASTRA_AGENT_THREAD_LEASE_TTL_MS`. Detection depends on backend response time. If ownership checks keep failing or stop responding, the step stops trusting its claim after one lease TTL, 15 seconds by default.
400
+
401
+ Cancellation is cooperative. Use the tool execution context's `abortSignal` for cancellable operations, and check it before starting another side effect. A tool that ignores the signal can keep running. Work already completed outside Mastra isn't rolled back.
402
+
403
+ Recovery can start the same tool call before the old invocation detects ownership loss. Keep tools idempotent or deduplicate external effects even when they handle cancellation. Cancellation reduces overlapping work. It doesn't guarantee exactly-once execution.
404
+
389
405
  ### Multi-instance deployments
390
406
 
391
407
  Every replica can start with `recovery.durableAgents: 'auto'`. Replicas that boot together race to recover the same orphaned runs, but only one claim succeeds per run and the other replicas skip it. This requires a claim that every replica shares: a workflows store that supports run fencing, or a PubSub backend whose lease every replica shares. Without either, gate recovery behind your own leader election or run it from a single replica.
@@ -416,7 +416,9 @@ Use the connection tools for distinct operations:
416
416
 
417
417
  Saved connections remain in the sender thread until explicitly disconnected. Every send independently refreshes discovery and verifies the exact endpoint before routing begins. A saved connection therefore records collaboration intent. It doesn't indicate current presence.
418
418
 
419
- After a send attempt reaches Core routing, the routing result is authoritative. The result can be `wake`, `deliver`, `persist`, `blocked`, or `discard`, depending on the target thread and notification policy. A send that isn't acknowledged by the advertised thread owner returns an error and doesn't consume its `messageId`, so the sender can retry it.
419
+ After a send attempt reaches Core routing, the routing result is authoritative. The result can be `wake`, `deliver`, `persist`, `blocked`, or `discard`, depending on the target thread and notification policy. A send that fails a direct delivery because no thread owner acknowledged it isn't lost: the signal stays pending in the target's notification inbox and the send reports `persist` instead of claiming delivery. The notification dispatcher retries that delivery on its own, so the sender doesn't need to resend it. The `messageId` isn't recorded in sent history and isn't rejected as a duplicate, although the pending notification still matches on it. A resend with the same `messageId` merges into that notification while it's pending, and delivers a second copy once the retry has succeeded. A send made with `expectsReply: true` returns an error there, because the reply obligation isn't established until the signal is delivered.
420
+
421
+ When the delivery policy routes a signal to a notification summary rather than delivering it directly, the send records the `messageId`, so retrying with the same id reports a duplicate instead of routing again. A low-priority send always takes this route and reports `persist`. A high- or medium-priority send to an active thread takes it too, but there the summary signal is emitted immediately, so the send reports that signal's routing result (`wake`, `deliver`, or `persist`) and records the `messageId` the same way, including when `expectsReply: true`. Only when the policy schedules a summary without emitting a signal at send time does an `expectsReply: true` send fail to establish its reply obligation: it returns an error and doesn't record the send in sent history, so establishing the reply obligation takes a new signal at a priority that routes directly.
420
422
 
421
423
  ### Discover agents in other projects
422
424
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Channels
6
6
 
7
- [Channels](https://mastra.ai/docs/channels) let people talk to your agents from services such as Slack, Telegram, and Discord. Connect stores provider credentials on the platform and uses [`channels()`](https://mastra.ai/reference/connect/channels) to make those channels available in your Mastra application. It uses the same channel packages with platform-managed credentials, while vendor-side setup depends on the provider.
7
+ [Channels](https://mastra.ai/docs/channels) let people talk to your agents from services such as Slack, Telegram, Discord, and Microsoft Teams. Connect stores provider credentials on the platform and uses [`channels()`](https://mastra.ai/reference/connect/channels) to make those channels available in your Mastra application. It uses the same channel packages with platform-managed credentials, while vendor-side setup depends on the provider.
8
8
 
9
9
  Before you start, follow the [Connect setup](https://mastra.ai/docs/mastra-platform/connect/overview) to install the package and configure your platform project.
10
10
 
@@ -29,7 +29,7 @@ The channels available to your app are configured at startup, while their creden
29
29
 
30
30
  ## Connect a provider
31
31
 
32
- The following steps cover Slack, Discord, and Telegram. Start your Mastra application before completing the agent connection in Studio.
32
+ The following steps cover Slack, Discord, Telegram, and Microsoft Teams. Start your Mastra application before completing the agent connection in Studio.
33
33
 
34
34
  For webhook delivery and OAuth callbacks, your server needs a public URL reachable by the provider. Mastra platform supplies this URL. When hosting elsewhere, set `MASTRA_SERVER_URL` to your public server URL. Use a public HTTPS tunnel for local webhook development.
35
35
 
@@ -72,6 +72,18 @@ Telegram uses a bot token from BotFather. Before connecting an agent, set `MASTR
72
72
 
73
73
  For local development without a public webhook URL, the [Telegram provider reference](https://mastra.ai/reference/channels/telegram-provider) describes polling mode.
74
74
 
75
+ ### Microsoft Teams
76
+
77
+ Teams uses a Microsoft work or school account authorized with OAuth. The same `microsoft-teams` connection provides both the channel and Teams [tools](https://mastra.ai/docs/mastra-platform/connect/tools). When an agent connects, Mastra registers a bot for it in the Teams Developer Portal, so no Azure app registration is needed on your side.
78
+
79
+ The bot credential is stored encrypted at rest. Set `MASTRA_ENCRYPTION_KEY` to use a dedicated key; without it, `channels()` derives a key from the platform access token and logs a warning. Rotating the platform access token then makes stored bot credentials unreadable, disconnect and reconnect the channel to re-provision.
80
+
81
+ 1. Run `mastra connect add microsoft-teams` and sign in with a Microsoft work or school account. Some of the requested permissions require admin consent, so the first connection in a tenant needs a Microsoft Entra administrator.
82
+ 2. Connect the channel to an agent in Studio. Mastra creates a single-tenant bot registration for the agent and returns a link to the [Teams Developer Portal](https://dev.teams.microsoft.com/bots).
83
+ 3. Open the link, package the bot into a Teams app in the Developer Portal, and add the app to Teams.
84
+
85
+ Disconnecting the agent deletes the bot registration and its Entra application.
86
+
75
87
  ## Configure available channels
76
88
 
77
89
  Use `providers` to select the channels your app exposes:
@@ -9,7 +9,7 @@
9
9
  Connect manages connections to services such as GitHub, Slack, and Linear in your [Mastra platform](https://mastra.ai/docs/mastra-platform/overview) project. The `@mastra/connect` package makes those connections available to your application as tools, channels, or credentials.
10
10
 
11
11
  - **Tools** let agents call a provider's API. Connect supplies ready-made tools and sends their requests through a platform proxy that adds credentials and refreshes OAuth tokens. See [Tools](https://mastra.ai/docs/mastra-platform/connect/tools).
12
- - **Channels** let people talk to agents through Slack, Telegram, or Discord. Connect supplies credentials to Mastra's channel providers. See [Channels](https://mastra.ai/docs/mastra-platform/connect/channels).
12
+ - **Channels** let people talk to agents through Slack, Telegram, Discord, or Microsoft Teams. Connect supplies credentials to Mastra's channel providers. See [Channels](https://mastra.ai/docs/mastra-platform/connect/channels).
13
13
  - **Raw credentials** let your code call a provider's SDK directly when the tools don't cover what you need. See [`credential()`](https://mastra.ai/reference/connect/credential).
14
14
 
15
15
  ## When to use Connect
@@ -25,6 +25,7 @@ This directory covers the generated toolsets and channel setup documented here,
25
25
  | `incident-io` | ![](https://app.nango.dev/images/template-logos/incident-io.svg) incident.io | [Tools](https://mastra.ai/reference/connect/providers) |
26
26
  | `jira` | ![](https://cdn.simpleicons.org/jira?viewbox=auto\&size=28) Jira | [Tools](https://mastra.ai/reference/connect/providers) |
27
27
  | `linear` | ![](https://cdn.simpleicons.org/linear?viewbox=auto\&size=28) Linear | [Tools](https://mastra.ai/reference/connect/providers) |
28
+ | `microsoft-teams` | ![](https://cdn.simpleicons.org/microsoftteams?viewbox=auto\&size=28) Microsoft Teams | [Tools](https://mastra.ai/reference/connect/providers), [Channels](https://mastra.ai/docs/mastra-platform/connect/channels) |
28
29
  | `notion` | ![](https://cdn.simpleicons.org/notion?viewbox=auto\&size=28) Notion | [Tools](https://mastra.ai/reference/connect/providers) |
29
30
  | `openai` | ![](https://svgl.app/library/openai.svg) OpenAI | [Tools](https://mastra.ai/reference/connect/providers) |
30
31
  | `posthog` | ![](https://cdn.simpleicons.org/posthog?viewbox=auto\&size=28) PostHog | [Tools](https://mastra.ai/reference/connect/providers) |
@@ -73,7 +73,31 @@ Find tool keys in the [provider toolsets reference](https://mastra.ai/reference/
73
73
 
74
74
  ## Filter tools per request
75
75
 
76
- The `providers` option selects which providers the resolver can load. To vary the available tools by request, use the agent's `tools` function with [request context](https://mastra.ai/docs/server/request-context):
76
+ To vary provider options by request, pass `tools()` a callback instead of an options object. The callback receives the [request context](https://mastra.ai/docs/server/request-context) and returns the options for that request:
77
+
78
+ ```typescript
79
+ import { Agent } from '@mastra/core/agent'
80
+ import { tools } from '@mastra/connect'
81
+
82
+ export const opsAgent = new Agent({
83
+ id: 'ops',
84
+ name: 'ops',
85
+ instructions: 'You help the team track work in Linear.',
86
+ model: 'openai/gpt-5-mini',
87
+ tools: tools(ctx => ({
88
+ providers: {
89
+ linear:
90
+ ctx?.requestContext?.get('role') === 'viewer'
91
+ ? { allowTools: ['linear_list_*'] }
92
+ : { requireApproval: ['linear_delete_*'] },
93
+ },
94
+ })),
95
+ })
96
+ ```
97
+
98
+ This example gives viewers only the Linear read tools and gates deletions behind [approval](https://mastra.ai/docs/agents/human-in-the-loop) for other roles. Set the role in trusted server-side code based on the authenticated user. The resolver caches one toolset per distinct options value, so requests that produce the same options share a cached snapshot. Derive options from a small, closed set of inputs such as roles, not from unbounded per-request data.
99
+
100
+ To post-process the resolved tool record instead (for example, to filter on something other than tool keys), hoist the resolver and wrap it in the agent's `tools` function:
77
101
 
78
102
  ```typescript
79
103
  import { Agent } from '@mastra/core/agent'
@@ -98,8 +122,6 @@ export const opsAgent = new Agent({
98
122
  })
99
123
  ```
100
124
 
101
- This example gives viewers only `linear_list_issues` and gives other roles the resolved Linear tools. Set the role in trusted server-side code based on the authenticated user. The resolver caches its toolset, while the callback filters it for each request.
102
-
103
125
  ## Require approval for sensitive tools
104
126
 
105
127
  Tools run without [human approval](https://mastra.ai/docs/agents/human-in-the-loop) by default. Set `requireApproval` to pause before selected tools execute:
@@ -185,7 +185,7 @@ npx mastra api trace query '{
185
185
 
186
186
  Choose a time range containing your exported traces, up to 31 days. Results appear in `data.traces`.
187
187
 
188
- Mastra Platform uses the same trace-query endpoints and request format as Mastra Server. Use the [Trace queries API reference](https://mastra.ai/reference/observability/tracing/trace-query) for HTTP requests, supported filters, pagination, polling, and field discovery.
188
+ Mastra Platform uses the same trace-query endpoints and request format as Mastra Server. Use the [Advanced trace queries reference](https://mastra.ai/reference/observability/tracing/advanced-queries) for HTTP requests, supported filters, pagination, polling, and field discovery.
189
189
 
190
190
  You can query exported feedback over HTTP. See the [Feedback API](https://mastra.ai/docs/mastra-platform/api) for its current status, regional endpoints, authentication, project scoping, and supported query parameters such as `traceId` and `environment`.
191
191
 
@@ -203,7 +203,7 @@ const memory = new Memory({
203
203
 
204
204
  ### Retries and failure policy
205
205
 
206
- Observer and Reflector model calls are retried on transient provider errors, and a turn aborts if they still fail. Each stage is controlled independently by:
206
+ Observer and Reflector model calls are retried on transient provider errors. By default, a synchronous observation or reflection that still fails aborts the turn. Each stage is controlled independently by:
207
207
 
208
208
  - `maxRetries`: retries after the initial model call (default `8`).
209
209
  - `failurePolicy`: what happens once retries are exhausted, either `'abort'` (default) or `'continue'`.
@@ -231,7 +231,9 @@ With `failurePolicy: 'continue'`, Mastra retries as configured, reports the fail
231
231
 
232
232
  A provider outage usually takes out both stages, so set the policy on both if you want the turn to survive one.
233
233
 
234
- This policy applies only to Observer and Reflector model and provider failures in synchronous, resource-scoped, and buffered observation. Persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. It doesn't prevent the underlying provider or network error, change `blockAfter`, or change attachment handling.
234
+ This policy applies only to Observer and Reflector model and provider failures when observation or reflection runs synchronously: at `blockAfter`, when async buffering is disabled, and in resource-scoped observation. In those paths, persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. It doesn't prevent the underlying provider or network error, change `blockAfter`, or change attachment handling.
235
+
236
+ Background (async buffered) observation and reflection failures never stop the turn, whatever the policy. They're reported as `om_buffering_failed`, and the failed input stays pending. If it keeps growing, it reaches `blockAfter`, where synchronous observation applies `failurePolicy`.
235
237
 
236
238
  > **Warning:** `'continue'` has no backstop for a sustained outage. Unobserved messages stay pending and keep accruing in the main agent's context. A long outage moves the failure from the memory layer to the model's context limit.
237
239
 
@@ -403,6 +403,8 @@ Memory uses a single embedder for both storing and recalling messages, so pick o
403
403
 
404
404
  Multilingual E5 produces 1024-dimensional vectors. Your vector index must be created with matching dimensions, and E5 vectors can't be mixed with vectors from another embedder in the same index.
405
405
 
406
+ FastEmbed models embed at most 512 tokens per input (roughly 2,000 to 2,500 characters of English text). Longer inputs are truncated, so text past the limit doesn't affect the embedding and can't be found by semantic recall. The AI SDK v3 FastEmbed models return a warning when this happens. The legacy v1 and v2 models don't. If you embed long documents with FastEmbed, chunk them to fit the window, for example with `maxSize: 1500` in `MDocument.chunk()`.
407
+
406
408
  ## PostgreSQL index optimization
407
409
 
408
410
  When using PostgreSQL as your vector store, you can optimize semantic recall performance by configuring the vector index. This is particularly important for large-scale deployments with thousands of messages.
@@ -67,6 +67,14 @@ Use [Editor](https://mastra.ai/docs/studio/editor) to let non-technical team mem
67
67
 
68
68
  Use [Agent Builder](https://agent-builder.mastra.ai) to create and manage fully stored agents through a separate browser-based interface.
69
69
 
70
+ #### Models panel
71
+
72
+ Open an agent's **Models** panel to view its primary model and fallback models in priority order. For static model lists, you can reorder models, enable or disable fallbacks, and change the provider or model. The panel stays synchronized when Studio refetches the agent.
73
+
74
+ These edits change the running server's in-memory agent and are lost when the server restarts. Persistent model-list editing is tracked in [GitHub issue #27089](https://github.com/mastra-ai/mastra/issues/27089).
75
+
76
+ Function-valued model lists can vary by request context, so Studio displays them as read-only. Change a dynamic model list in code instead.
77
+
70
78
  ### Workflows
71
79
 
72
80
  Visualize your workflow as a graph and run it step by step with a custom input. During execution, the interface updates in real time to show the active step and the path taken.
@@ -289,7 +289,9 @@ export const ticketTriage = createWorkflow({
289
289
  .commit()
290
290
  ```
291
291
 
292
- The `choice` field retains the configured criteria-key union, so `inputData.answers.route.choice` is typed as `'billing' | 'support' | 'other'`. Score answers expose `score`. Boolean answers expose the `P(true)` value as `probability`. Apply an explicit threshold when routing.
292
+ The `choice` field retains the configured criteria-key union, so `inputData.answers.route.choice` is typed as `'billing' | 'support' | 'other' | undefined`. Score answers expose `score`. Boolean answers expose the `P(true)` value as `probability`. Apply an explicit threshold when routing.
293
+
294
+ When the decision model refuses a question, its answer is `{ type: 'refusal' }` and `choice`, `score`, and `probability` are `undefined`. In the example above, a refused `route` question matches no condition. Add a condition on `inputData.answers.route.type === 'refusal'` to handle it explicitly.
293
295
 
294
296
  ### Output structure
295
297
 
@@ -494,6 +494,8 @@ Runs restart concurrently, up to `recovery.workflowConcurrency` at a time (defau
494
494
 
495
495
  To exclude a workflow from automatic boot-time restarts triggered by `Mastra.restartAllActiveWorkflowRuns()`, set `autoRestartActiveRuns: false` in the workflow's `options`. This is useful for workflows with side effects that must not be re-driven by a blanket restart. Durable agent workflows set this automatically because their recovery is owned by the opt-in `recovery.durableAgents: 'auto'` path.
496
496
 
497
+ While a run executes, Mastra holds a storage lease on it and renews it in the background. `restart()` refuses to take over a run whose lease hasn't expired: it throws a `WORKFLOW_RESTART_RUN_OWNED` error and the sweep skips the run. The lease is advisory and doesn't fence writes. If a process stops renewing its lease but keeps executing a step, for example because its event loop is blocked for longer than the lease TTL, recovery can run that step a second time. The boot-time sweep, `mastra.restartAllActiveWorkflowRuns()`, rechecks a skipped run once its lease could have expired, so a run whose process crashed is still recovered. `workflow.restartAllActiveWorkflowRuns()` skips the run without a recheck, so call it after the lease expires if you need to recover that run. Storage adapters without run-ownership support keep the previous behavior and restart every active run.
498
+
497
499
  ### Restarting an active workflow run with `restart()`
498
500
 
499
501
  Use `restart()` to restart an active workflow run from the last active step. This will resume execution from the last active step, and the workflow will continue from there.
@@ -197,7 +197,7 @@ const result = await run.timeTravel({
197
197
 
198
198
  ## Error handling
199
199
 
200
- Time travel throws errors in specific situations. It rejects a call that observes a running snapshot, but it doesn't atomically claim the run. Concurrent calls can both pass the status check and proceed, so guard against duplicates in your application. See [Concurrent time travel calls](https://mastra.ai/reference/workflows/run-methods/timeTravel).
200
+ Time travel throws errors in specific situations. Before it runs anything, time travel atomically claims the run, so only one call proceeds at a time. A concurrent call throws `WORKFLOW_TIME_TRAVEL_ALREADY_CLAIMED`, or `WORKFLOW_TIME_TRAVEL_RUN_RUNNING` if the run is already executing. See [Concurrent time travel calls](https://mastra.ai/reference/workflows/run-methods/timeTravel).
201
201
 
202
202
  ### Running workflow
203
203
 
@@ -290,7 +290,7 @@ Don't set `replication` on ClickHouse Cloud. Cloud rewrites `MergeTree` to `Shar
290
290
 
291
291
  ### Observability domain options
292
292
 
293
- `ObservabilityStorageClickhouse` and `ObservabilityStorageClickhouseVNext` accept the same connection options as `ClickhouseStore` (`url`, `username`, `password`, or a pre-configured `client`). `ObservabilityStorageClickhouseVNext` also accepts `retention`, the per-signal TTL in days described in [ClickHouse native TTL](https://mastra.ai/reference/storage/retention), and `traceQuery`, the execution limits for [trace queries](https://mastra.ai/reference/observability/tracing/trace-query).
293
+ `ObservabilityStorageClickhouse` and `ObservabilityStorageClickhouseVNext` accept the same connection options as `ClickhouseStore` (`url`, `username`, `password`, or a pre-configured `client`). `ObservabilityStorageClickhouseVNext` also accepts `retention`, the per-signal TTL in days described in [ClickHouse native TTL](https://mastra.ai/reference/storage/retention), and `traceQuery`, the execution limits for [trace queries](https://mastra.ai/reference/observability/tracing/advanced-queries).
294
294
 
295
295
  ## Hosting options
296
296
 
@@ -397,6 +397,12 @@ voice.close()
397
397
 
398
398
  **sessionConfig.contextCompression** (`boolean`): Enable automatic context compression.
399
399
 
400
+ **inputAudioTranscription** (`GeminiAudioTranscriptionConfig`): Transcription settings for the user's speech. Set languageCodes to BCP-47 hints (for example \['es-ES']) so short or accented utterances aren't transcribed in the wrong language. Without hints, the server auto-detects the language. Applied when the session connects.
401
+
402
+ **inputAudioTranscription.languageCodes** (`string[]`): BCP-47 language codes present in the audio.
403
+
404
+ **outputAudioTranscription** (`GeminiAudioTranscriptionConfig`): Transcription settings for the model's speech. Takes the same languageCodes hints as inputAudioTranscription. Applied when the session connects.
405
+
400
406
  **debug** (`boolean`): Enable debug logging for troubleshooting. (Default: `false`)
401
407
 
402
408
  ### Methods
@@ -72,7 +72,8 @@ bun add @mastra/voyageai
72
72
  - `voyage-4-large` - 1024 dimensions (default), supports 256-2048 dimensions, best general-purpose and multilingual retrieval quality (120k max tokens per batch)
73
73
  - `voyage-4` - 1024 dimensions (default), supports 256-2048 dimensions, optimized for general-purpose and multilingual retrieval (320k max tokens per batch)
74
74
  - `voyage-4-lite` - 1024 dimensions (default), supports 256-2048 dimensions, optimized for latency and cost (1M max tokens per batch)
75
- - `voyage-code-3` - 1024 dimensions (default), supports 256-2048 dimensions, optimized for code retrieval
75
+ - `voyage-code-4` - 1024 dimensions (default), supports 256-2048 dimensions, optimized for code retrieval and coding agents
76
+ - `voyage-code-3` - 1024 dimensions (default), supports 256-2048 dimensions, optimized for code retrieval (previous generation)
76
77
  - `voyage-finance-2` - 1024 dimensions, optimized for finance retrieval and RAG
77
78
  - `voyage-law-2` - 1024 dimensions, optimized for legal retrieval and RAG (16k context)
78
79
  - `voyage-3-large` - 1024 dimensions (default), supports 256-2048 dimensions (previous generation)
@@ -49,6 +49,7 @@ List of required environment variables for each model provider and gateway suppo
49
49
  | [ClinePass](https://mastra.ai/models/providers/cline-pass) | `cline-pass/*` | `CLINE_API_KEY` |
50
50
  | [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock) | `cloudferro-sherlock/*` | `CLOUDFERRO_SHERLOCK_API_KEY` |
51
51
  | [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai) | `cloudflare-workers-ai/*` | `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_KEY` |
52
+ | [CommandCode](https://mastra.ai/models/providers/commandcode) | `commandcode/*` | `CMD_API_KEY` |
52
53
  | [CoralBricks](https://mastra.ai/models/providers/coralbricks) | `coralbricks/*` | `CORAL_API_KEY` |
53
54
  | [CoreWeave](https://mastra.ai/models/providers/wandb) | `wandb/*` | `WANDB_API_KEY` |
54
55
  | [Cortecs](https://mastra.ai/models/providers/cortecs) | `cortecs/*` | `CORTECS_API_KEY` |
@@ -159,6 +160,7 @@ List of required environment variables for each model provider and gateway suppo
159
160
  | [Privatemode AI](https://mastra.ai/models/providers/privatemode-ai) | `privatemode-ai/*` | `PRIVATEMODE_API_KEY` |
160
161
  | [QiHang](https://mastra.ai/models/providers/qihang-ai) | `qihang-ai/*` | `QIHANG_API_KEY` |
161
162
  | [Qiniu](https://mastra.ai/models/providers/qiniu-ai) | `qiniu-ai/*` | `QINIU_API_KEY` |
163
+ | [Reflection](https://mastra.ai/models/providers/reflection) | `reflection/*` | `REFLECTION_API_KEY` |
162
164
  | [Regolo AI](https://mastra.ai/models/providers/regolo-ai) | `regolo-ai/*` | `REGOLO_API_KEY` |
163
165
  | [Requesty](https://mastra.ai/models/providers/requesty) | `requesty/*` | `REQUESTY_API_KEY` |
164
166
  | [routing.run](https://mastra.ai/models/providers/routing-run) | `routing-run/*` | `ROUTING_RUN_API_KEY` |
@@ -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 206 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
 
@@ -78,6 +78,7 @@ ANTHROPIC_API_KEY=ant-...
78
78
  | `deepseek/deepseek-v4-pro-0423` |
79
79
  | `deepseek/deepseek-v4-pro-0813` |
80
80
  | `deepseek/deepseek-v4.1-flash` |
81
+ | `deepseek/deepseek-v4.1-flash-1017` |
81
82
  | `google/gemini-2.5-computer-use-preview-10-2025` |
82
83
  | `google/gemini-2.5-flash` |
83
84
  | `google/gemini-2.5-flash-image` |
@@ -119,6 +120,7 @@ ANTHROPIC_API_KEY=ant-...
119
120
  | `minimax/minimax-m2.7` |
120
121
  | `minimax/minimax-m2.7-highspeed` |
121
122
  | `minimax/minimax-m3` |
123
+ | `minimax/minimax-m3.1-flash` |
122
124
  | `mistral/codestral-latest` |
123
125
  | `mistral/devstral-2512` |
124
126
  | `mistral/devstral-medium-2507` |
@@ -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 284 models through Mastra's model router.
7
+ Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 288 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
 
@@ -133,6 +133,7 @@ ANTHROPIC_API_KEY=ant-...
133
133
  | `openrouter/~deepseek/deepseek-pro-latest` |
134
134
  | `openrouter/~deepseek/deepseek-v4-flash-latest` |
135
135
  | `openrouter/~moonshotai/kimi-latest` |
136
+ | `openrouter/~unbiased/pareto-latest` |
136
137
  | `openrouter/~x-ai/grok-latest` |
137
138
  | `openrouter/~z-ai/glm-flash-latest` |
138
139
  | `openrouter/~z-ai/glm-latest` |
@@ -148,7 +149,6 @@ ANTHROPIC_API_KEY=ant-...
148
149
  | `openrouter/cohere/command-a-plus` |
149
150
  | `openrouter/deepseek/deepseek-chat` |
150
151
  | `openrouter/deepseek/deepseek-chat-v3.1` |
151
- | `openrouter/deepseek/deepseek-r1` |
152
152
  | `openrouter/deepseek/deepseek-r1-0528` |
153
153
  | `openrouter/deepseek/deepseek-v3.2` |
154
154
  | `openrouter/deepseek/deepseek-v4-flash` |
@@ -157,6 +157,8 @@ ANTHROPIC_API_KEY=ant-...
157
157
  | `openrouter/deepseek/deepseek-v4-pro` |
158
158
  | `openrouter/deepseek/deepseek-v4-pro-0813` |
159
159
  | `openrouter/deepseek/deepseek-v4.1-flash` |
160
+ | `openrouter/deepseek/deepseek-v4.1-flash-1017` |
161
+ | `openrouter/elorian/glimpse` |
160
162
  | `openrouter/fireworks/ember-1` |
161
163
  | `openrouter/google/gemma-2-27b-it` |
162
164
  | `openrouter/google/gemma-3-12b-it` |
@@ -169,6 +171,7 @@ ANTHROPIC_API_KEY=ant-...
169
171
  | `openrouter/ibm-granite/granite-4.2-8b` |
170
172
  | `openrouter/inception/mercury-2` |
171
173
  | `openrouter/inception/mercury-2.5` |
174
+ | `openrouter/inception/mercury-3` |
172
175
  | `openrouter/inclusionai/ling-3.0-flash` |
173
176
  | `openrouter/inclusionai/ling-3.0-flash-vl` |
174
177
  | `openrouter/inclusionai/ling-3.1-flash` |
@@ -187,7 +190,6 @@ ANTHROPIC_API_KEY=ant-...
187
190
  | `openrouter/meta/muse-glimmer-30b` |
188
191
  | `openrouter/meta/muse-spark-open` |
189
192
  | `openrouter/microsoft/phi-4` |
190
- | `openrouter/microsoft/wizardlm-2-8x22b` |
191
193
  | `openrouter/minimax/minimax-m1` |
192
194
  | `openrouter/minimax/minimax-m2` |
193
195
  | `openrouter/minimax/minimax-m2.1` |
@@ -272,13 +274,13 @@ ANTHROPIC_API_KEY=ant-...
272
274
  | `openrouter/qwen/qwen3.6-35b-a3b` |
273
275
  | `openrouter/qwen/qwen3.8-2.4t-a95b` |
274
276
  | `openrouter/qwen/qwen3.8-27b` |
277
+ | `openrouter/reflection/beam-1.0-501b-a23b` |
275
278
  | `openrouter/rekaai/reka-edge` |
276
279
  | `openrouter/rekaai/reka-flash-3` |
277
280
  | `openrouter/relace/relace-apply-3` |
278
281
  | `openrouter/relace/relace-search` |
279
282
  | `openrouter/sao10k/l3-lunaris-8b` |
280
283
  | `openrouter/sao10k/l3.1-euryale-70b` |
281
- | `openrouter/sao10k/l3.3-euryale-70b` |
282
284
  | `openrouter/scaledown/extract` |
283
285
  | `openrouter/scaledown/summarize` |
284
286
  | `openrouter/stepfun/step-3.7-flash` |
@@ -294,6 +296,7 @@ ANTHROPIC_API_KEY=ant-...
294
296
  | `openrouter/thinkingmachines/inkling` |
295
297
  | `openrouter/thinkingmachines/inkling-small` |
296
298
  | `openrouter/typesafe/jev-router` |
299
+ | `openrouter/unbiased/pareto-26.10` |
297
300
  | `openrouter/undi95/remm-slerp-l2-13b` |
298
301
  | `openrouter/upstage/solar-mini4` |
299
302
  | `openrouter/upstage/solar-pro4` |
@@ -308,6 +311,7 @@ ANTHROPIC_API_KEY=ant-...
308
311
  | `openrouter/xiaomi/mimo-v2.5-pro` |
309
312
  | `openrouter/xiaomi/mimo-v2.6-flash` |
310
313
  | `openrouter/xiaomi/mimo-v2.6-pro` |
314
+ | `openrouter/xingchen-agi/xing4.0-29b-a4b:free` |
311
315
  | `openrouter/z-ai/glm-4.5-air` |
312
316
  | `openrouter/z-ai/glm-4.5v` |
313
317
  | `openrouter/z-ai/glm-4.6` |