@mastra/mcp-docs-server 1.3.9-alpha.6 → 1.3.9-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.
Files changed (77) hide show
  1. package/.docs/docs/agents/human-in-the-loop.md +2 -1
  2. package/.docs/docs/harness/agent-controller.md +1 -1
  3. package/.docs/docs/harness/durable-agents.md +17 -5
  4. package/.docs/docs/mastra-platform/observability.md +1 -1
  5. package/.docs/docs/memory/observational-memory.md +4 -2
  6. package/.docs/docs/studio/overview.md +8 -0
  7. package/.docs/docs/workflows/control-flow.md +3 -1
  8. package/.docs/docs/workflows/overview.md +2 -0
  9. package/.docs/docs/workflows/time-travel.md +1 -1
  10. package/.docs/integrations/databases/clickhouse.md +1 -1
  11. package/.docs/integrations/voice/google.md +6 -0
  12. package/.docs/models/gateways/merge-gateway.md +3 -1
  13. package/.docs/models/gateways/netlify.md +6 -4
  14. package/.docs/models/gateways/openrouter.md +6 -4
  15. package/.docs/models/gateways/vercel.md +7 -1
  16. package/.docs/models/index.md +1 -1
  17. package/.docs/models/providers/alibaba-token-plan-cn.md +31 -30
  18. package/.docs/models/providers/baseten.md +27 -25
  19. package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
  20. package/.docs/models/providers/coralbricks.md +5 -8
  21. package/.docs/models/providers/cortecs.md +4 -4
  22. package/.docs/models/providers/deepinfra.md +2 -1
  23. package/.docs/models/providers/edenai.md +12 -6
  24. package/.docs/models/providers/empiriolabs.md +3 -1
  25. package/.docs/models/providers/engy.md +12 -11
  26. package/.docs/models/providers/fireworks-ai.md +2 -1
  27. package/.docs/models/providers/huggingface.md +2 -1
  28. package/.docs/models/providers/hyper.md +26 -25
  29. package/.docs/models/providers/kilo.md +21 -19
  30. package/.docs/models/providers/llmgateway-providers.md +9 -5
  31. package/.docs/models/providers/llmgateway.md +3 -1
  32. package/.docs/models/providers/minimax-cn-coding-plan.md +2 -1
  33. package/.docs/models/providers/minimax-cn.md +3 -2
  34. package/.docs/models/providers/minimax-coding-plan.md +2 -1
  35. package/.docs/models/providers/minimax.md +3 -2
  36. package/.docs/models/providers/nano-gpt.md +52 -55
  37. package/.docs/models/providers/nearai.md +1 -1
  38. package/.docs/models/providers/nebius.md +2 -1
  39. package/.docs/models/providers/novita-ai.md +2 -1
  40. package/.docs/models/providers/nvidia.md +2 -1
  41. package/.docs/models/providers/ofox.md +2 -1
  42. package/.docs/models/providers/ollama-cloud.md +31 -29
  43. package/.docs/models/providers/opencode-go.md +2 -2
  44. package/.docs/models/providers/opencode.md +2 -2
  45. package/.docs/models/providers/prime.md +3 -1
  46. package/.docs/models/providers/requesty.md +4 -1
  47. package/.docs/models/providers/standardcompute.md +47 -8
  48. package/.docs/models/providers/togetherai.md +4 -1
  49. package/.docs/models/providers/upstage.md +8 -7
  50. package/.docs/models/providers/zenmux.md +2 -1
  51. package/.docs/reference/agents/channels.md +5 -1
  52. package/.docs/reference/agents/durable-agent.md +11 -6
  53. package/.docs/reference/classifier/classifier.md +29 -5
  54. package/.docs/reference/cli/mastra.md +39 -4
  55. package/.docs/reference/client-js/agent-controller.md +2 -0
  56. package/.docs/reference/client-js/observability.md +121 -6
  57. package/.docs/reference/core/mastra-class.md +7 -1
  58. package/.docs/reference/evals/create-classifier-scorer.md +1 -0
  59. package/.docs/reference/index.md +1 -1
  60. package/.docs/reference/memory/observational-memory.md +2 -2
  61. package/.docs/reference/observability/tracing/{trace-query.md → advanced-queries.md} +477 -158
  62. package/.docs/reference/processors/classifier-processor.md +8 -6
  63. package/.docs/reference/processors/model-selection-processor.md +2 -2
  64. package/.docs/reference/processors/moderation-processor.md +5 -1
  65. package/.docs/reference/processors/system-prompt-scrubber.md +4 -0
  66. package/.docs/reference/signals/create-notification-inbox-tool.md +11 -9
  67. package/.docs/reference/tools/create-tool.md +2 -2
  68. package/.docs/reference/tools/mcp-client.md +2 -2
  69. package/.docs/reference/workflows/dynamic-workflow-definition.md +1 -1
  70. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  71. package/.docs/reference/workflows/run-methods/timeTravel.md +15 -16
  72. package/.docs/reference/workflows/step.md +1 -0
  73. package/.docs/reference/workflows/workflow-methods/classifier.md +1 -0
  74. package/.docs/reference/workspace/factory-sandbox.md +2 -0
  75. package/.docs/reference/workspace/filesystem.md +4 -0
  76. package/.docs/reference/workspace/workspace-class.md +10 -10
  77. package/package.json +8 -9
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Ollama Cloud logo](https://models.dev/logos/ollama-cloud.svg)Ollama Cloud
6
6
 
7
- Access 26 Ollama Cloud models through Mastra's model router. Authentication is handled automatically using the `OLLAMA_API_KEY` environment variable.
7
+ Access 28 Ollama Cloud models through Mastra's model router. Authentication is handled automatically using the `OLLAMA_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Ollama Cloud documentation](https://docs.ollama.com/cloud).
10
10
 
@@ -36,34 +36,36 @@ for await (const chunk of stream) {
36
36
 
37
37
  ## Models
38
38
 
39
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
- | ------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `ollama-cloud/deepseek-v4-flash` | 1.0M | | | | | | $0.22 | $0.66 |
42
- | `ollama-cloud/deepseek-v4-flash:0731` | 1.0M | | | | | | $0.22 | $0.66 |
43
- | `ollama-cloud/deepseek-v4-pro` | 1.0M | | | | | | $0.66 | $2 |
44
- | `ollama-cloud/deepseek-v4-pro:0813` | 1.0M | | | | | | $0.66 | $2 |
45
- | `ollama-cloud/deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
46
- | `ollama-cloud/gemma4:31b` | 262K | | | | | | $0.14 | $0.40 |
47
- | `ollama-cloud/glm-5.1` | 203K | | | | | | $1 | $3 |
48
- | `ollama-cloud/glm-5.2` | 976K | | | | | | $1 | $4 |
49
- | `ollama-cloud/glm-5.3` | 1.0M | | | | | | $1 | $4 |
50
- | `ollama-cloud/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
51
- | `ollama-cloud/gpt-oss:120b` | 131K | | | | | | $0.15 | $0.60 |
52
- | `ollama-cloud/gpt-oss:20b` | 131K | | | | | | $0.07 | $0.30 |
53
- | `ollama-cloud/kimi-k2.5` | 262K | | | | | | — | — |
54
- | `ollama-cloud/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
55
- | `ollama-cloud/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
56
- | `ollama-cloud/kimi-k3` | 1.0M | | | | | | $3 | $15 |
57
- | `ollama-cloud/minimax-m2.5` | 205K | | | | | | — | — |
58
- | `ollama-cloud/minimax-m2.7` | 197K | | | | | | $0.30 | $1 |
59
- | `ollama-cloud/minimax-m3` | 512K | | | | | | $0.60 | $2 |
60
- | `ollama-cloud/mistral-large-3:675b` | 262K | | | | | | $0.50 | $2 |
61
- | `ollama-cloud/mistral-large-4` | 1.0M | | | | | | $1 | $4 |
62
- | `ollama-cloud/muse-spark-open` | 1.0M | | | | | | $1 | $4 |
63
- | `ollama-cloud/nemotron-3-nano:30b` | 1.0M | | | | | | $0.06 | $0.24 |
64
- | `ollama-cloud/nemotron-3-super` | 262K | | | | | | $0.01 | $0.60 |
65
- | `ollama-cloud/nemotron-3-ultra` | 262K | | | | | | $0.10 | $3 |
66
- | `ollama-cloud/qwen3.5:397b` | 262K | | | | | | $0.60 | $4 |
39
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
+ | --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `ollama-cloud/deepseek-v4-flash` | 1.0M | | | | | | $0.22 | $0.66 |
42
+ | `ollama-cloud/deepseek-v4-flash:0731` | 1.0M | | | | | | $0.22 | $0.66 |
43
+ | `ollama-cloud/deepseek-v4-pro` | 1.0M | | | | | | $0.66 | $2 |
44
+ | `ollama-cloud/deepseek-v4-pro:0813` | 1.0M | | | | | | $0.66 | $2 |
45
+ | `ollama-cloud/deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
46
+ | `ollama-cloud/deepseek-v4.1-flash:1017` | 1.0M | | | | | | $0.15 | $0.60 |
47
+ | `ollama-cloud/gemma4:31b` | 262K | | | | | | $0.14 | $0.40 |
48
+ | `ollama-cloud/glm-5.1` | 203K | | | | | | $1 | $3 |
49
+ | `ollama-cloud/glm-5.2` | 976K | | | | | | $1 | $4 |
50
+ | `ollama-cloud/glm-5.3` | 1.0M | | | | | | $1 | $4 |
51
+ | `ollama-cloud/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
52
+ | `ollama-cloud/gpt-oss:120b` | 131K | | | | | | $0.15 | $0.60 |
53
+ | `ollama-cloud/gpt-oss:20b` | 131K | | | | | | $0.07 | $0.30 |
54
+ | `ollama-cloud/kimi-k2.5` | 262K | | | | | | — | — |
55
+ | `ollama-cloud/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
56
+ | `ollama-cloud/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
57
+ | `ollama-cloud/kimi-k3` | 1.0M | | | | | | $3 | $15 |
58
+ | `ollama-cloud/minimax-m2.5` | 205K | | | | | | — | — |
59
+ | `ollama-cloud/minimax-m2.7` | 197K | | | | | | $0.30 | $1 |
60
+ | `ollama-cloud/minimax-m3` | 512K | | | | | | $0.60 | $2 |
61
+ | `ollama-cloud/minimax-m3.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
62
+ | `ollama-cloud/mistral-large-3:675b` | 262K | | | | | | $0.50 | $2 |
63
+ | `ollama-cloud/mistral-large-4` | 1.0M | | | | | | $1 | $4 |
64
+ | `ollama-cloud/muse-spark-open` | 1.0M | | | | | | $1 | $4 |
65
+ | `ollama-cloud/nemotron-3-nano:30b` | 1.0M | | | | | | $0.06 | $0.24 |
66
+ | `ollama-cloud/nemotron-3-super` | 262K | | | | | | $0.01 | $0.60 |
67
+ | `ollama-cloud/nemotron-3-ultra` | 262K | | | | | | $0.10 | $3 |
68
+ | `ollama-cloud/qwen3.5:397b` | 262K | | | | | | $0.60 | $4 |
67
69
 
68
70
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
69
71
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenCode Go logo](https://models.dev/logos/opencode-go.svg)OpenCode Go
6
6
 
7
- Access 32 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
7
+ Access 33 OpenCode Go 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 Go documentation](https://opencode.ai/v2/docs/console/go/).
10
10
 
@@ -60,12 +60,12 @@ for await (const chunk of stream) {
60
60
  | `opencode-go/mimo-v2.6-flash` | 1.0M | | | | | | $0.14 | $0.28 |
61
61
  | `opencode-go/mimo-v2.6-pro` | 1.0M | | | | | | $0.43 | $0.87 |
62
62
  | `opencode-go/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
63
+ | `opencode-go/minimax-m3.1-flash-free` | 1.0M | | | | | | — | — |
63
64
  | `opencode-go/muse-spark-1.2-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
64
65
  | `opencode-go/muse-spark-1.3-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
65
66
  | `opencode-go/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 |
66
67
  | `opencode-go/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
67
68
  | `opencode-go/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
68
- | `opencode-go/space-bunny` | 1.0M | | | | | | $0.15 | $0.60 |
69
69
  | `opencode-go/step-5-preview` | 1.0M | | | | | | $1 | $3 |
70
70
 
71
71
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenCode logo](https://models.dev/logos/opencode.svg)OpenCode
6
6
 
7
- Access 127 OpenCode models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
7
+ Access 128 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
 
@@ -111,6 +111,7 @@ for await (const chunk of stream) {
111
111
  | `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
112
112
  | `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
113
113
  | `opencode/minimax-m3` | 512K | | | | | | $0.30 | $1 |
114
+ | `opencode/minimax-m3.1-flash-free` | 1.0M | | | | | | — | — |
114
115
  | `opencode/mistral-large-4` | 524K | | | | | | $0.68 | $2 |
115
116
  | `opencode/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
116
117
  | `opencode/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
@@ -121,7 +122,6 @@ for await (const chunk of stream) {
121
122
  | `opencode/qwen3.6-plus` | 262K | | | | | | $0.50 | $3 |
122
123
  | `opencode/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
123
124
  | `opencode/qwen3.8-max` | 262K | | | | | | $2 | $6 |
124
- | `opencode/space-bunny-free` | 1.0M | | | | | | — | — |
125
125
 
126
126
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
127
127
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Prime Inference logo](https://models.dev/logos/prime.svg)Prime Inference
6
6
 
7
- Access 66 Prime Inference models through Mastra's model router. Authentication is handled automatically using the `PRIME_API_KEY` environment variable.
7
+ Access 68 Prime Inference models through Mastra's model router. Authentication is handled automatically using the `PRIME_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Prime Inference documentation](https://docs.primeintellect.ai).
10
10
 
@@ -52,6 +52,7 @@ for await (const chunk of stream) {
52
52
  | `prime/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
53
53
  | `prime/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
54
54
  | `prime/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.30 | $1 |
55
+ | `prime/deepseek/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.30 | $1 |
55
56
  | `prime/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
56
57
  | `prime/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
57
58
  | `prime/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
@@ -99,6 +100,7 @@ for await (const chunk of stream) {
99
100
  | `prime/qwen/qwen3-coder-next` | 262K | | | | | | $0.30 | $2 |
100
101
  | `prime/qwen/qwen3-vl-235b-a22b-instruct` | 262K | | | | | | $0.30 | $2 |
101
102
  | `prime/qwen/qwen3-vl-30b-a3b-instruct` | 262K | | | | | | $0.20 | $0.70 |
103
+ | `prime/qwen/qwen3.8-27b` | 1.0M | | | | | | $0.99 | $3 |
102
104
  | `prime/x-ai/grok-4.6` | 500K | | | | | | $2 | $6 |
103
105
  | `prime/x-ai/grok-4.7` | 500K | | | | | | $2 | $5 |
104
106
  | `prime/z-ai/glm-5.2` | 1.0M | | | | | | $2 | $5 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Requesty logo](https://models.dev/logos/requesty.svg)Requesty
6
6
 
7
- Access 177 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
7
+ Access 180 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Requesty documentation](https://requesty.ai/solution/llm-routing/models).
10
10
 
@@ -76,6 +76,8 @@ for await (const chunk of stream) {
76
76
  | `requesty/deepseek-v4-pro-0813@eu` | 1.0M | | | | | | $2 | $4 |
77
77
  | `requesty/deepseek-v4-pro@eu` | 1.0M | | | | | | $2 | $4 |
78
78
  | `requesty/deepseek-v4.1-flash` | 1.0M | | | | | | $0.50 | $2 |
79
+ | `requesty/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.50 | $2 |
80
+ | `requesty/deepseek-v4.1-flash-1017@eu` | 1.0M | | | | | | $0.50 | $2 |
79
81
  | `requesty/deepseek-v4.1-flash@eu` | 1.0M | | | | | | $0.50 | $2 |
80
82
  | `requesty/devstral-latest` | 256K | | | | | | $0.44 | $2 |
81
83
  | `requesty/devstral-latest@eu` | 256K | | | | | | $0.44 | $2 |
@@ -171,6 +173,7 @@ for await (const chunk of stream) {
171
173
  | `requesty/minimax-m2.7` | 200K | | | | | | $0.30 | $1 |
172
174
  | `requesty/minimax-m2.7-highspeed` | 200K | | | | | | $0.60 | $2 |
173
175
  | `requesty/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
176
+ | `requesty/minimax-m3.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
174
177
  | `requesty/minimax-m3@eu` | 1.0M | | | | | | $0.40 | $2 |
175
178
  | `requesty/mistral-large-4` | 524K | | | | | | $0.68 | $2 |
176
179
  | `requesty/mistral-large-4@eu` | 524K | | | | | | $0.68 | $2 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Standard Compute logo](https://models.dev/logos/standardcompute.svg)Standard Compute
6
6
 
7
- Access 1 Standard Compute model through Mastra's model router. Authentication is handled automatically using the `STANDARDCOMPUTE_API_KEY` environment variable.
7
+ Access 40 Standard Compute models through Mastra's model router. Authentication is handled automatically using the `STANDARDCOMPUTE_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Standard Compute documentation](https://docs.standardcompute.com/models).
10
10
 
@@ -19,7 +19,7 @@ const agent = new Agent({
19
19
  id: "my-agent",
20
20
  name: "My Agent",
21
21
  instructions: "You are a helpful assistant",
22
- model: "standardcompute/standardcompute"
22
+ model: "standardcompute/anthropic/claude-fable-5"
23
23
  });
24
24
 
25
25
  // Generate a response
@@ -36,9 +36,48 @@ for await (const chunk of stream) {
36
36
 
37
37
  ## Models
38
38
 
39
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
- | --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `standardcompute/standardcompute` | 1.0M | | | | | | — | — |
39
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
+ | ------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `standardcompute/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
42
+ | `standardcompute/anthropic/claude-fable-5.1` | 1.0M | | | | | | $10 | $50 |
43
+ | `standardcompute/anthropic/claude-haiku-5.5` | 1.0M | | | | | | $0.10 | $0.50 |
44
+ | `standardcompute/anthropic/claude-opus-5` | 1.0M | | | | | | $5 | $25 |
45
+ | `standardcompute/anthropic/claude-opus-5.5` | 1.0M | | | | | | $4 | $20 |
46
+ | `standardcompute/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
47
+ | `standardcompute/anthropic/claude-sonnet-5.5` | 1.0M | | | | | | $2 | $10 |
48
+ | `standardcompute/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.08 | $0.17 |
49
+ | `standardcompute/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
50
+ | `standardcompute/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $1 | $2 |
51
+ | `standardcompute/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $3 |
52
+ | `standardcompute/deepseek/deepseek-v4.1-flash` | 1.0M | | | | | | $0.14 | $0.42 |
53
+ | `standardcompute/google/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
54
+ | `standardcompute/google/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
55
+ | `standardcompute/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
56
+ | `standardcompute/google/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
57
+ | `standardcompute/google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
58
+ | `standardcompute/minimax/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
59
+ | `standardcompute/mistralai/mistral-large-4-0` | 1.0M | | | | | | $0.68 | $2 |
60
+ | `standardcompute/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
61
+ | `standardcompute/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
62
+ | `standardcompute/openai/gpt-5.6-sol` | 1.1M | | | | | | $4 | $20 |
63
+ | `standardcompute/openai/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
64
+ | `standardcompute/openai/gpt-6-astra` | 1.1M | | | | | | $10 | $50 |
65
+ | `standardcompute/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
66
+ | `standardcompute/qwen/qwen3.7-flash` | 1.0M | | | | | | $0.03 | $0.13 |
67
+ | `standardcompute/qwen/qwen3.7-max` | 1.0M | | | | | | $1 | $4 |
68
+ | `standardcompute/qwen/qwen3.7-plus` | 1.0M | | | | | | $0.32 | $1 |
69
+ | `standardcompute/qwen/qwen3.8-27b` | 262K | | | | | | $0.42 | $3 |
70
+ | `standardcompute/qwen/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
71
+ | `standardcompute/qwen/qwen3.8-max-0902` | 1.0M | | | | | | $2 | $6 |
72
+ | `standardcompute/standardcompute` | 1.0M | | | | | | — | — |
73
+ | `standardcompute/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
74
+ | `standardcompute/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.14 | $0.28 |
75
+ | `standardcompute/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $0.43 | $0.87 |
76
+ | `standardcompute/xiaomi/mimo-v2.6-flash` | 1.0M | | | | | | $0.14 | $0.28 |
77
+ | `standardcompute/xiaomi/mimo-v2.6-pro` | 1.0M | | | | | | $0.43 | $0.87 |
78
+ | `standardcompute/z-ai/glm-5.2` | 1.0M | | | | | | $0.56 | $2 |
79
+ | `standardcompute/z-ai/glm-5.3` | 1.0M | | | | | | $1 | $4 |
80
+ | `standardcompute/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.08 | $0.50 |
42
81
 
43
82
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
44
83
 
@@ -52,7 +91,7 @@ const agent = new Agent({
52
91
  name: "custom-agent",
53
92
  model: {
54
93
  url: "https://api.stdcmpt.com/v1",
55
- id: "standardcompute/standardcompute",
94
+ id: "standardcompute/anthropic/claude-fable-5",
56
95
  apiKey: process.env.STANDARDCOMPUTE_API_KEY,
57
96
  headers: {
58
97
  "X-Custom-Header": "value"
@@ -70,8 +109,8 @@ const agent = new Agent({
70
109
  model: ({ requestContext }) => {
71
110
  const useAdvanced = requestContext.task === "complex";
72
111
  return useAdvanced
73
- ? "standardcompute/standardcompute"
74
- : "standardcompute/standardcompute";
112
+ ? "standardcompute/z-ai/glm-5.3-flash"
113
+ : "standardcompute/anthropic/claude-fable-5";
75
114
  }
76
115
  });
77
116
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Together AI logo](https://models.dev/logos/togetherai.svg)Together AI
6
6
 
7
- Access 29 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
7
+ Access 32 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
10
10
 
@@ -41,15 +41,18 @@ for await (const chunk of stream) {
41
41
  | `togetherai/deepseek-ai/DeepSeek-V4.1-Flash` | 1.0M | | | | | | $0.30 | $1 |
42
42
  | `togetherai/LiquidAI/LFM2-24B-A2B` | 33K | | | | | | $0.03 | $0.12 |
43
43
  | `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $1 | $1 |
44
+ | `togetherai/meta-models/Muse-Spark-Open-816B-A42B` | 1.0M | | | | | | $1 | $4 |
44
45
  | `togetherai/MiniMaxAI/MiniMax-M2.7` | 197K | | | | | | $0.30 | $1 |
45
46
  | `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
46
47
  | `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
47
48
  | `togetherai/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.60 | $4 |
49
+ | `togetherai/nvidia/NVIDIA-Nemotron-3.5-Super-VL` | 262K | | | | | | $0.15 | $0.50 |
48
50
  | `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
49
51
  | `togetherai/Qwen/Qwen2.5-7B-Instruct-Turbo` | 33K | | | | | | $0.30 | $0.30 |
50
52
  | `togetherai/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.17 | $0.25 |
51
53
  | `togetherai/Qwen/Qwen3.6-Plus` | 1.0M | | | | | | $0.50 | $3 |
52
54
  | `togetherai/Qwen/Qwen3.7-Max` | 1.0M | | | | | | $1 | $4 |
55
+ | `togetherai/reflection/Beam-1.0-501B-A23B` | 1.0M | | | | | | $0.40 | $1 |
53
56
  | `togetherai/thinkingmachines/Inkling` | 524K | | | | | | $1 | $4 |
54
57
  | `togetherai/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
55
58
  | `togetherai/zai-org/GLM-5.3` | 1.0M | | | | | | $1 | $4 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Upstage logo](https://models.dev/logos/upstage.svg)Upstage
6
6
 
7
- Access 4 Upstage models through Mastra's model router. Authentication is handled automatically using the `UPSTAGE_API_KEY` environment variable.
7
+ Access 5 Upstage models through Mastra's model router. Authentication is handled automatically using the `UPSTAGE_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Upstage documentation](https://developers.upstage.ai).
10
10
 
@@ -36,12 +36,13 @@ for await (const chunk of stream) {
36
36
 
37
37
  ## Models
38
38
 
39
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
- | -------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `upstage/solar-mini` | 33K | | | | | | $0.15 | $0.15 |
42
- | `upstage/solar-pro2` | 66K | | | | | | $0.25 | $0.25 |
43
- | `upstage/solar-pro3` | 131K | | | | | | $0.25 | $0.25 |
44
- | `upstage/solar-pro4` | 524K | | | | | | $0.30 | $1 |
39
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
+ | --------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `upstage/solar-mini` | 33K | | | | | | $0.15 | $0.15 |
42
+ | `upstage/solar-mini4` | 524K | | | | | | $0.10 | $0.40 |
43
+ | `upstage/solar-pro2` | 66K | | | | | | $0.25 | $0.25 |
44
+ | `upstage/solar-pro3` | 131K | | | | | | $0.25 | $0.25 |
45
+ | `upstage/solar-pro4` | 524K | | | | | | $0.30 | $1 |
45
46
 
46
47
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
47
48
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![ZenMux logo](https://models.dev/logos/zenmux.svg)ZenMux
6
6
 
7
- Access 129 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
7
+ Access 130 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [ZenMux documentation](https://docs.zenmux.ai).
10
10
 
@@ -76,6 +76,7 @@ for await (const chunk of stream) {
76
76
  | `zenmux/minimax/minimax-m2.7` | 205K | | | | | | $0.31 | $1 |
77
77
  | `zenmux/minimax/minimax-m2.7-highspeed` | 205K | | | | | | $0.61 | $2 |
78
78
  | `zenmux/minimax/minimax-m3` | 1.0M | | | | | | $0.60 | $2 |
79
+ | `zenmux/minimax/minimax-m3.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
79
80
  | `zenmux/moonshotai/kimi-k2.5` | 262K | | | | | | $0.58 | $3 |
80
81
  | `zenmux/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
81
82
  | `zenmux/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
@@ -120,7 +120,7 @@ const agent = new Agent({
120
120
 
121
121
  Pass a function to `toolDisplay` for fully custom rendering. The function receives a `ToolDisplayEvent` (`running` / `result` / `error` / `approval` / `approved` / `denied`) and a `ToolDisplayContext` (`{ mode, platform }`); return `{ kind: 'post', message }` for a discrete post/edit, `{ kind: 'stream', chunk }` to push into the active streaming widget, or `undefined` to skip rendering that event.
122
122
 
123
- After a user clicks Approve or Deny, Mastra sends an `approved` or `denied` event (`denied` includes `byUser`, which is undefined in DMs). A `post` result replaces the approval card in place. If the function returns nothing, a blank message, or throws, Mastra shows the default "Approved" or "Denied" card.
123
+ After a user clicks Approve or Deny, Mastra sends an `approved` or `denied` event. Both include `byUser`, the name of the user who clicked, which is undefined in DMs. A `post` result replaces the approval card in place. If the function returns nothing, a blank message, or throws, Mastra shows the default "Approved" or "Denied" card, which names the user outside DMs.
124
124
 
125
125
  By default, a stream result opens a streaming session when none is active. Set `openIfEmpty: false` when the chunk only applies to an existing session. Mastra skips the chunk when no session is active. Static channels ignore this option and keep their existing plain-text fallback behavior.
126
126
 
@@ -312,6 +312,8 @@ The `ResolveResourceIdContext` passed to the function:
312
312
 
313
313
  **defaultResourceId** (`string`): The built-in default (${platform}:${message.author.userId}). Return this to keep the current behavior.
314
314
 
315
+ **requestContext** (`RequestContext`): The per-message request context. Values a channel handler sets before calling defaultHandler (for example a tenant id) are readable here, so you don't need to look them up again.
316
+
315
317
  ## Thread ID resolution
316
318
 
317
319
  By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as its session to match the names your app assigns to threads it creates.
@@ -354,6 +356,8 @@ The `ResolveThreadIdContext` passed to the function:
354
356
 
355
357
  **defaultThreadId** (`string`): The built-in default (a random UUID). Return this to keep the current behavior.
356
358
 
359
+ **requestContext** (`RequestContext`): The per-message request context, the same instance passed to resolveResourceId.
360
+
357
361
  ## Inline media
358
362
 
359
363
  Controls which attachment types (images, video, PDFs, etc.) are sent as file parts to the model. Types that don't match are described as text summaries so the agent knows about the file without crashing models that reject unsupported types.
@@ -328,6 +328,10 @@ interface DurableAgentListActiveRunsResult {
328
328
 
329
329
  Discovers runs stuck in `running` status for this agent and re-drives them from the last persisted snapshot. Accepts the same filters and pagination as `listActiveRuns()`, plus `runId`. Returns the outcome for each run.
330
330
 
331
+ Attempts run serially. Each attempt has a single 30-second wait budget covering both `recover()` setup and settlement of the whole recovered workflow. When the budget expires, recovery moves to the next run and returns `status: 'skipped'` with `reason: 'recovery-timeout'` and no `retryAt`. The timeout doesn't cancel setup or execution, release a live claim, or count as success or failure. The attempt continues in the background, and its eventual outcome doesn't change the returned results. Mastra doesn't automatically retry a timed-out attempt.
332
+
333
+ The budget applies only to each run attempt in `recoverActiveRuns()`, not to discovery, a direct `recover()` call, or overridden custom recovery methods. When shutdown begins, recovery stops dispatching new runs. The original attempt remains tracked for Mastra's shared shutdown drain even after the wait times out.
334
+
331
335
  ```typescript
332
336
  const result = await durableAgent.recoverActiveRuns()
333
337
  // {
@@ -348,11 +352,12 @@ await durableAgent.recoverActiveRuns({ runId: 'run-abc-123' })
348
352
 
349
353
  A run that another execution still drives isn't taken over. Its entry has `status: 'skipped'` and a `reason`, and `recoverActiveRuns()` doesn't check it again. For a run held by another process, `retryAt` is the time after which that claim lapses unless renewed. Call `recoverActiveRuns({ runId })` after it to recover the run if its process crashed. [`mastra.recoverAllDurableAgents()`](https://mastra.ai/reference/core/mastra-class) schedules these re-checks itself.
350
354
 
351
- | `reason` | Meaning |
352
- | --------------------- | ------------------------------------------------------------------------------ |
353
- | `run-active` | Another execution, possibly in another process, holds the run. Sets `retryAt`. |
354
- | `run-active-locally` | This process is executing the run. |
355
- | `already-in-progress` | This process is already recovering the run. |
355
+ | `reason` | Meaning |
356
+ | --------------------- | ----------------------------------------------------------------------------------------------------------------- |
357
+ | `run-active` | Another execution, possibly in another process, holds the run. Sets `retryAt`. |
358
+ | `run-active-locally` | This process is executing the run. |
359
+ | `already-in-progress` | This process is already recovering the run. |
360
+ | `recovery-timeout` | The 30-second wait budget expired. The attempt continues in the background, with no `retryAt` or automatic retry. |
356
361
 
357
362
  Returns:
358
363
 
@@ -362,7 +367,7 @@ interface DurableAgentRecoverActiveRunsResult {
362
367
  runId: string
363
368
  status: 'success' | 'failed' | 'skipped'
364
369
  error?: Error
365
- reason?: 'run-active' | 'run-active-locally' | 'already-in-progress'
370
+ reason?: 'run-active' | 'run-active-locally' | 'already-in-progress' | 'recovery-timeout'
366
371
  // Epoch milliseconds
367
372
  retryAt?: number
368
373
  }>
@@ -72,10 +72,12 @@ const result = await classifier.decide({
72
72
  },
73
73
  })
74
74
 
75
- result.answers.route.choice // 'billing' | 'support'
76
- result.answers.urgent.probability // P(true), from 0 to 1
75
+ result.answers.route.choice // 'billing' | 'support' | undefined
76
+ result.answers.urgent.probability // P(true), from 0 to 1, or undefined
77
77
  ```
78
78
 
79
+ A field is `undefined` only when the decision model refused the question. See [refused questions](#refused-questions).
80
+
79
81
  The decision model receives every question with the same `state`. When a question omits `instructions`, its question name is used instead.
80
82
 
81
83
  ## Decision models
@@ -198,6 +200,28 @@ const answer = {
198
200
  }
199
201
  ```
200
202
 
203
+ ### Refused questions
204
+
205
+ A decision model can refuse any question, for example when a safety policy prevents it from answering. A refused question returns a `RefusalAnswer` instead of a choice, score, or boolean answer. The other questions in the same call keep their answers.
206
+
207
+ ```typescript
208
+ const answer = {
209
+ type: 'refusal',
210
+ }
211
+ ```
212
+
213
+ A refusal has no `choice`, `score`, or `probability`. Equality checks such as `answers.route.choice === 'billing'` evaluate to `false`. Check `type` before you read a numeric field, and decide how your application handles the refusal:
214
+
215
+ ```typescript
216
+ const urgent = result.answers.urgent
217
+
218
+ if (urgent.type === 'refusal') {
219
+ // Route to a human, block the input, or apply a default.
220
+ } else if (urgent.probability > 0.8) {
221
+ // Escalate.
222
+ }
223
+ ```
224
+
201
225
  ## Designing questions
202
226
 
203
227
  These rules keep a question answerable from the state:
@@ -205,7 +229,7 @@ These rules keep a question answerable from the state:
205
229
  - Ask for one judgment. A question that moves when either of two fields changes can't be routed on.
206
230
  - Keep criteria exclusive. `strong: 'A good fit'` and `partial: 'Maybe a fit'` leak probability between them.
207
231
  - Give a score enough levels to represent intermediate values.
208
- - Add an escape level when the list isn't closed. Three teams and no `other` forces every input into a team.
232
+ - Add an escape level when the list isn't closed. Without an `other` level, the classifier must assign every input to one of the listed teams.
209
233
  - Put fields in `state`, not in `instructions`. One changed field then moves one answer.
210
234
 
211
235
  To check a question, change one field of the state and confirm one answer moves.
@@ -252,7 +276,7 @@ const result = await classifier.decide({
252
276
  },
253
277
  })
254
278
 
255
- result.answers.tone.choice // 'empathetic' | 'neutral'
279
+ result.answers.tone.choice // 'empathetic' | 'neutral' | undefined
256
280
  ```
257
281
 
258
282
  ## Return value
@@ -300,7 +324,7 @@ Input validation includes:
300
324
  - Every question type must be supported by the decision model.
301
325
  - `maxRetries` must be a non-negative integer.
302
326
 
303
- Provider responses must contain exactly one matching answer for each question. The classifier also rejects invalid choices, out-of-range scores or probabilities, incomplete probability distributions, non-finite token counts, malformed warnings, and invalid response timestamps.
327
+ Provider responses must contain exactly one answer for each question. Each answer must match the question type or be a refusal. The classifier also rejects invalid choices, out-of-range scores or probabilities, incomplete probability distributions, non-finite token counts, malformed warnings, and invalid response timestamps.
304
328
 
305
329
  Only retryable AI SDK `APICallError` failures are retried. Other errors reject immediately. When all retries fail, `decide()` rethrows the last provider error. Aborting the supplied signal rejects with the signal's abort reason, including when cancellation occurs during retry backoff.
306
330
 
@@ -1661,13 +1661,13 @@ Inspect the command with:
1661
1661
  mastra api trace query --help
1662
1662
  ```
1663
1663
 
1664
- For supported fields, operators, and request options, see [Trace queries](https://mastra.ai/reference/observability/tracing/trace-query). For a local Mastra server, you can also inspect its request and response schemas:
1664
+ For supported fields, operators, and request options, see [Query traces](https://mastra.ai/reference/observability/tracing/advanced-queries). For a local Mastra server, you can also inspect its request and response schemas:
1665
1665
 
1666
1666
  ```bash
1667
1667
  mastra api --url http://localhost:4111 trace query --schema
1668
1668
  ```
1669
1669
 
1670
- Mastra Platform doesn't currently expose the schema endpoint used by `--schema`. To find fields and values recorded in your project, use [field and value discovery](https://mastra.ai/reference/observability/tracing/trace-query).
1670
+ Mastra Platform doesn't currently expose the schema endpoint used by `--schema`. To find fields and values recorded in your project, use [field and value discovery](https://mastra.ai/reference/observability/tracing/advanced-queries).
1671
1671
 
1672
1672
  The response remains nested under `data` to preserve cursor pagination:
1673
1673
 
@@ -1680,7 +1680,7 @@ The response remains nested under `data` to preserve cursor pagination:
1680
1680
  }
1681
1681
  ```
1682
1682
 
1683
- Each invocation makes one query. Pass a non-null `data.page.next` value back as `page.after` in the next query. See [Pagination and errors](https://mastra.ai/reference/observability/tracing/trace-query) for pagination modes, cursor handling, and errors.
1683
+ Each invocation makes one query. Pass a non-null `data.page.next` value back as `page.after` in the next query. See [Pagination and errors](https://mastra.ai/reference/observability/tracing/advanced-queries) for pagination modes, cursor handling, and errors.
1684
1684
 
1685
1685
  To load a numbered page and then poll, keep the same time range and predicate in both requests:
1686
1686
 
@@ -1691,7 +1691,42 @@ mastra api trace query '{"timeRange":{"from":"2026-08-01T00:00:00.000Z","to":"20
1691
1691
 
1692
1692
  Replace `CURSOR_FROM_NUMBERED_RESPONSE` with `data.deltaCursor` from the first response. Delta results remain under `data`, with `traces`, `delta: { limit, hasMore }`, and `deltaCursor`. Merge traces by `traceId`, retain each returned cursor, and continue immediately while `data.delta.hasMore` is `true`. Don't combine delta mode with `page`, `pagination`, or `orderBy`.
1693
1693
 
1694
- Omitting `after` establishes a cursor and returns no historical traces. Changing the time range or predicate requires a fresh numbered request. See [Delta polling limitations](https://mastra.ai/reference/observability/tracing/trace-query) before using this workflow to maintain a local trace list.
1694
+ Omitting `after` establishes a cursor and returns no historical traces. Changing the time range or predicate requires a fresh numbered request. See [Delta polling limitations](https://mastra.ai/reference/observability/tracing/advanced-queries) before using this workflow to maintain a local trace list.
1695
+
1696
+ #### `mastra api trace aggregate`
1697
+
1698
+ Groups the traces selected by a time range and optional `where` predicate, and returns one row of measures per group. The inline JSON input is required and accepts the same predicates as `trace query`. Like other observability commands, it targets `https://observability.mastra.ai` by default.
1699
+
1700
+ ```bash
1701
+ mastra api trace aggregate <input>
1702
+ mastra api trace aggregate '{"timeRange":{"from":"2026-08-01T00:00:00.000Z","to":"2026-08-08T00:00:00.000Z"},"groupBy":["entityName"],"measures":["count","errorRate"]}'
1703
+ ```
1704
+
1705
+ Set `interval` to `1m`, `5m`, `15m`, `1h`, or `1d` to split each group into time buckets:
1706
+
1707
+ ```bash
1708
+ mastra api trace aggregate '{"timeRange":{"from":"2026-08-01T00:00:00.000Z","to":"2026-08-08T00:00:00.000Z"},"where":{"op":"eq","left":{"path":"entityName"},"right":{"literal":"weather-agent"}},"interval":"1d","measures":["count","duration.p95"]}'
1709
+ ```
1710
+
1711
+ For dimensions, measures, and request options, see [Aggregate traces](https://mastra.ai/reference/client-js/observability). Run `mastra api trace aggregate --help` for more examples.
1712
+
1713
+ The response stays nested under `data` so `truncated` is preserved. `truncated` is `true` when more groups matched than `limit`:
1714
+
1715
+ ```json
1716
+ {
1717
+ "data": {
1718
+ "rows": [
1719
+ {
1720
+ "dimensions": { "entityName": "weather-agent" },
1721
+ "measures": { "count": 42, "errorRate": 0.05 }
1722
+ }
1723
+ ],
1724
+ "truncated": false
1725
+ }
1726
+ }
1727
+ ```
1728
+
1729
+ Servers whose observability store doesn't support trace aggregation return `501`. The CLI prints it like other request failures, as an `HTTP_ERROR` with the server response in `error.details.body`.
1695
1730
 
1696
1731
  #### `mastra api trace get`
1697
1732
 
@@ -111,6 +111,8 @@ Subscribes to the session's event stream over SSE. The promise resolves once the
111
111
 
112
112
  **reconnect** (`boolean | { maxRetries?: number; delayMs?: number; maxDelayMs?: number }`): Re-establishes the stream after an established stream drops. Retries back off exponentially from delayMs (default 1000) up to maxDelayMs (default 30000). maxRetries (default Infinity) bounds the attempts per outage and resets once a connection is re-established. When retries are exhausted, onError fires. A reconnect request that fails with a 4xx (other than 408 and 429) or 501 stops reconnecting immediately and passes that MastraClientError to onError.
113
113
 
114
+ **idleTimeoutMs** (`number`): Treats the stream as dropped after this many milliseconds without receiving any data. Server heartbeats, sent every 25 seconds, reset the timer, so only a silent connection, such as one left half-open by laptop sleep or a proxy timeout, trips it. A timeout is handled like any other drop: it triggers reconnect and onReconnect when reconnect is enabled, otherwise onError. Also bounds opening the stream: subscribe() rejects, and a reconnect attempt counts as failed, when no response arrives in time. Set to 0 to disable. (Default: `60000`)
115
+
114
116
  Returns: `Promise<AgentControllerSubscription>`, an object with an `unsubscribe()` method that stops reading and releases the stream.
115
117
 
116
118
  ### `sendMessage(message, options?)`