@mastra/mcp-docs-server 1.2.19-alpha.3 → 1.2.19

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 (107) hide show
  1. package/.docs/docs/channels.md +28 -1
  2. package/.docs/docs/deployment/cloud-providers.md +1 -0
  3. package/.docs/docs/deployment/mastra-server.md +19 -0
  4. package/.docs/docs/deployment/overview.md +1 -0
  5. package/.docs/docs/deployment/workers.md +2 -2
  6. package/.docs/docs/evals/overview.md +33 -1
  7. package/.docs/docs/harness/durable-agents.md +1 -1
  8. package/.docs/docs/mastra-platform/api.md +54 -0
  9. package/.docs/docs/mastra-platform/deploy.md +101 -0
  10. package/.docs/docs/mastra-platform/observability.md +3 -1
  11. package/.docs/docs/mastra-platform/server.md +6 -11
  12. package/.docs/docs/mastra-platform/studio.md +8 -10
  13. package/.docs/docs/memory/semantic-recall.md +19 -0
  14. package/.docs/docs/observability/feedback.md +14 -0
  15. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +19 -14
  16. package/.docs/docs/observability/metrics/overview.md +31 -44
  17. package/.docs/docs/sandbox/overview.md +43 -0
  18. package/.docs/docs/server/middleware.md +30 -0
  19. package/.docs/docs/server/server-adapters.md +109 -34
  20. package/.docs/docs/storage.md +2 -0
  21. package/.docs/docs/subagents.md +6 -6
  22. package/.docs/integrations/channels/github.md +56 -9
  23. package/.docs/integrations/channels/imessage.md +150 -8
  24. package/.docs/integrations/databases/elasticsearch.md +156 -0
  25. package/.docs/integrations/databases/libsql.md +16 -0
  26. package/.docs/integrations/databases/mongodb.md +1 -1
  27. package/.docs/integrations/databases/postgresql.md +26 -0
  28. package/.docs/integrations/databases/valkey.md +99 -0
  29. package/.docs/integrations/deploy/kubernetes-helm.md +332 -0
  30. package/.docs/integrations/deploy/kubernetes.md +1 -1
  31. package/.docs/integrations/deploy/render.md +47 -61
  32. package/.docs/integrations/sandboxes/daytona.md +52 -0
  33. package/.docs/integrations/sandboxes/e2b-desktop.md +128 -0
  34. package/.docs/integrations/sandboxes/e2b.md +6 -0
  35. package/.docs/integrations/sandboxes/vercel.md +2 -2
  36. package/.docs/integrations/tools/parallel.md +240 -0
  37. package/.docs/integrations.md +5 -0
  38. package/.docs/models/environment-variables.md +9 -0
  39. package/.docs/models/gateways/merge-gateway.md +2 -1
  40. package/.docs/models/gateways/netlify.md +12 -6
  41. package/.docs/models/gateways/openrouter.md +9 -11
  42. package/.docs/models/gateways/vercel.md +7 -6
  43. package/.docs/models/index.md +1 -1
  44. package/.docs/models/providers/agentrouter.md +17 -34
  45. package/.docs/models/providers/agnes.md +75 -0
  46. package/.docs/models/providers/aixy.md +73 -0
  47. package/.docs/models/providers/aki-io.md +14 -13
  48. package/.docs/models/providers/chutes.md +2 -2
  49. package/.docs/models/providers/cline-pass.md +4 -2
  50. package/.docs/models/providers/crof.md +3 -8
  51. package/.docs/models/providers/crossmodel.md +56 -55
  52. package/.docs/models/providers/deepseek.md +9 -10
  53. package/.docs/models/providers/digitalocean.md +1 -1
  54. package/.docs/models/providers/edenai.md +14 -13
  55. package/.docs/models/providers/evroc.md +3 -2
  56. package/.docs/models/providers/gmicloud.md +6 -4
  57. package/.docs/models/providers/huggingface.md +2 -1
  58. package/.docs/models/providers/hyper.md +6 -6
  59. package/.docs/models/providers/inceptron.md +2 -2
  60. package/.docs/models/providers/iteracompute.md +73 -0
  61. package/.docs/models/providers/kilo.md +31 -28
  62. package/.docs/models/providers/llmgateway-providers.md +20 -9
  63. package/.docs/models/providers/llmgateway.md +3 -5
  64. package/.docs/models/providers/llmtech.md +73 -0
  65. package/.docs/models/providers/nano-gpt.md +24 -13
  66. package/.docs/models/providers/neosmith.md +104 -0
  67. package/.docs/models/providers/nvidia.md +3 -1
  68. package/.docs/models/providers/ofox.md +114 -110
  69. package/.docs/models/providers/openai.md +2 -2
  70. package/.docs/models/providers/opencode-go.md +26 -24
  71. package/.docs/models/providers/opencode.md +1 -1
  72. package/.docs/models/providers/opper.md +112 -0
  73. package/.docs/models/providers/pendra.md +78 -0
  74. package/.docs/models/providers/requesty.md +1 -1
  75. package/.docs/models/providers/scaleway.md +2 -1
  76. package/.docs/models/providers/standardcompute.md +73 -0
  77. package/.docs/models/providers/vivgrid.md +2 -1
  78. package/.docs/models/providers/wandb.md +2 -1
  79. package/.docs/models/providers/zai.md +2 -1
  80. package/.docs/models/providers.md +9 -0
  81. package/.docs/reference/agents/channels.md +1 -1
  82. package/.docs/reference/ai-sdk/handle-chat-stream.md +11 -0
  83. package/.docs/reference/ai-sdk/with-sse-heartbeat.md +47 -0
  84. package/.docs/reference/cli/mastra.md +10 -4
  85. package/.docs/reference/client-js/observability.md +1 -1
  86. package/.docs/reference/index.md +5 -0
  87. package/.docs/reference/observability/feedback.md +4 -0
  88. package/.docs/reference/observability/metrics/automatic-metrics.md +1 -1
  89. package/.docs/reference/observability/metrics/queries.md +462 -0
  90. package/.docs/reference/pubsub/valkey-streams.md +84 -0
  91. package/.docs/reference/rag/vector-databases.md +4 -4
  92. package/.docs/reference/server/elysia-adapter.md +184 -0
  93. package/.docs/reference/server/express-adapter.md +6 -8
  94. package/.docs/reference/server/hono-adapter.md +19 -6
  95. package/.docs/reference/storage/turso.md +88 -0
  96. package/.docs/reference/streaming/ChunkType.md +29 -1
  97. package/.docs/reference/streaming/agents/stream.md +1 -3
  98. package/.docs/reference/tools/mcp-client.md +41 -9
  99. package/.docs/reference/vectors/mongodb.md +11 -11
  100. package/.docs/reference/vectors/pg.md +2 -0
  101. package/.docs/reference/workspace/local-sandbox.md +2 -0
  102. package/.docs/reference/workspace/platform-sandbox.md +3 -1
  103. package/.docs/reference/workspace/sandbox.md +143 -3
  104. package/.docs/reference/workspace/workspace-class.md +13 -1
  105. package/CHANGELOG.md +88 -0
  106. package/package.json +6 -6
  107. package/.docs/docs/observability/metrics/querying.md +0 -314
@@ -0,0 +1,112 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![Opper logo](https://models.dev/logos/opper.svg)Opper
4
+
5
+ Access 40 Opper models through Mastra's model router. Authentication is handled automatically using the `OPPER_API_KEY` environment variable.
6
+
7
+ Learn more in the [Opper documentation](https://opper.ai/models).
8
+
9
+ ```bash
10
+ OPPER_API_KEY=your-api-key
11
+ ```
12
+
13
+ ```typescript
14
+ import { Agent } from "@mastra/core/agent";
15
+
16
+ const agent = new Agent({
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "opper/anthropic/claude-fable-5"
21
+ });
22
+
23
+ // Generate a response
24
+ const response = await agent.generate("Hello!");
25
+
26
+ // Stream a response
27
+ const stream = await agent.stream("Tell me a story");
28
+ for await (const chunk of stream) {
29
+ console.log(chunk);
30
+ }
31
+ ```
32
+
33
+ > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Opper documentation](https://opper.ai/models) for details.
34
+
35
+ ## Models
36
+
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `opper/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
40
+ | `opper/anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
41
+ | `opper/anthropic/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
42
+ | `opper/anthropic/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
43
+ | `opper/anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
44
+ | `opper/anthropic/claude-opus-4-8` | 1.0M | | | | | | $5 | $25 |
45
+ | `opper/anthropic/claude-opus-5` | 1.0M | | | | | | $5 | $25 |
46
+ | `opper/anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
47
+ | `opper/anthropic/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
48
+ | `opper/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
49
+ | `opper/gemini/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
50
+ | `opper/gemini/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
51
+ | `opper/gemini/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
52
+ | `opper/gemini/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
53
+ | `opper/meta/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
54
+ | `opper/minimax/m3` | 1.0M | | | | | | $0.60 | $2 |
55
+ | `opper/mistral/devstral-2512` | 262K | | | | | | $0.40 | $2 |
56
+ | `opper/mistral/mistral-large-2512` | 262K | | | | | | $0.50 | $2 |
57
+ | `opper/mistral/mistral-small-2603` | 256K | | | | | | $0.15 | $0.60 |
58
+ | `opper/moonshot/kimi-k3` | 1.0M | | | | | | $3 | $15 |
59
+ | `opper/openai/gpt-5.3-chat-latest` | 128K | | | | | | $2 | $14 |
60
+ | `opper/openai/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
61
+ | `opper/openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
62
+ | `opper/openai/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
63
+ | `opper/openai/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
64
+ | `opper/openai/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
65
+ | `opper/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
66
+ | `opper/openai/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
67
+ | `opper/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
68
+ | `opper/openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
69
+ | `opper/openai/gpt-5.6-terra` | 1.1M | | | | | | $2 | $12 |
70
+ | `opper/perplexity/sonar` | 128K | | | | | | $1 | $1 |
71
+ | `opper/perplexity/sonar-pro` | 200K | | | | | | $3 | $15 |
72
+ | `opper/perplexity/sonar-reasoning-pro` | 128K | | | | | | $2 | $8 |
73
+ | `opper/vertexai/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
74
+ | `opper/vertexai/gemini-3.7-flash-eu` | 1.0M | | | | | | $0.75 | $4 |
75
+ | `opper/xai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
76
+ | `opper/xai/grok-4.5` | 500K | | | | | | $2 | $6 |
77
+ | `opper/xai/grok-4.6` | 500K | | | | | | $2 | $6 |
78
+ | `opper/xai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
79
+
80
+ ## Advanced configuration
81
+
82
+ ### Custom headers
83
+
84
+ ```typescript
85
+ const agent = new Agent({
86
+ id: "custom-agent",
87
+ name: "custom-agent",
88
+ model: {
89
+ url: "https://api.opper.ai/v3/compat",
90
+ id: "opper/anthropic/claude-fable-5",
91
+ apiKey: process.env.OPPER_API_KEY,
92
+ headers: {
93
+ "X-Custom-Header": "value"
94
+ }
95
+ }
96
+ });
97
+ ```
98
+
99
+ ### Dynamic model selection
100
+
101
+ ```typescript
102
+ const agent = new Agent({
103
+ id: "dynamic-agent",
104
+ name: "Dynamic Agent",
105
+ model: ({ requestContext }) => {
106
+ const useAdvanced = requestContext.task === "complex";
107
+ return useAdvanced
108
+ ? "opper/xai/grok-build-0.1"
109
+ : "opper/anthropic/claude-fable-5";
110
+ }
111
+ });
112
+ ```
@@ -0,0 +1,78 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![Pendra logo](https://models.dev/logos/pendra.svg)Pendra
4
+
5
+ Access 6 Pendra models through Mastra's model router. Authentication is handled automatically using the `PENDRA_API_KEY` environment variable.
6
+
7
+ Learn more in the [Pendra documentation](https://pendra.ai/docs/integrations/opencode).
8
+
9
+ ```bash
10
+ PENDRA_API_KEY=your-api-key
11
+ ```
12
+
13
+ ```typescript
14
+ import { Agent } from "@mastra/core/agent";
15
+
16
+ const agent = new Agent({
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "pendra/deepseek-v4-flash"
21
+ });
22
+
23
+ // Generate a response
24
+ const response = await agent.generate("Hello!");
25
+
26
+ // Stream a response
27
+ const stream = await agent.stream("Tell me a story");
28
+ for await (const chunk of stream) {
29
+ console.log(chunk);
30
+ }
31
+ ```
32
+
33
+ > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Pendra documentation](https://pendra.ai/docs/integrations/opencode) for details.
34
+
35
+ ## Models
36
+
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | -------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `pendra/deepseek-v4-flash` | 1.0M | | | | | | — | — |
40
+ | `pendra/glm-4.7-flash` | 200K | | | | | | — | — |
41
+ | `pendra/gpt-oss:120b` | 131K | | | | | | — | — |
42
+ | `pendra/llama3.3:70b` | 128K | | | | | | — | — |
43
+ | `pendra/qwen3-coder:30b` | 262K | | | | | | — | — |
44
+ | `pendra/qwen3.6:27b` | 262K | | | | | | — | — |
45
+
46
+ ## Advanced configuration
47
+
48
+ ### Custom headers
49
+
50
+ ```typescript
51
+ const agent = new Agent({
52
+ id: "custom-agent",
53
+ name: "custom-agent",
54
+ model: {
55
+ url: "https://api.pendra.ai/api/v1",
56
+ id: "pendra/deepseek-v4-flash",
57
+ apiKey: process.env.PENDRA_API_KEY,
58
+ headers: {
59
+ "X-Custom-Header": "value"
60
+ }
61
+ }
62
+ });
63
+ ```
64
+
65
+ ### Dynamic model selection
66
+
67
+ ```typescript
68
+ const agent = new Agent({
69
+ id: "dynamic-agent",
70
+ name: "Dynamic Agent",
71
+ model: ({ requestContext }) => {
72
+ const useAdvanced = requestContext.task === "complex";
73
+ return useAdvanced
74
+ ? "pendra/qwen3.6:27b"
75
+ : "pendra/deepseek-v4-flash";
76
+ }
77
+ });
78
+ ```
@@ -107,7 +107,7 @@ for await (const chunk of stream) {
107
107
  | `requesty/gpt-5.5@eu` | 1.1M | | | | | | $5 | $27 |
108
108
  | `requesty/gpt-5.6-luna` | 1.1M | | | | | | $0.18 | $1 |
109
109
  | `requesty/gpt-5.6-luna@eu` | 1.1M | | | | | | $0.20 | $1 |
110
- | `requesty/gpt-5.6-sol` | 1.1M | | | | | | $5 | $27 |
110
+ | `requesty/gpt-5.6-sol` | 1.1M | | | | | | $4 | $18 |
111
111
  | `requesty/gpt-5.6-sol@eu` | 1.1M | | | | | | $5 | $30 |
112
112
  | `requesty/gpt-5.6-terra` | 1.1M | | | | | | $2 | $11 |
113
113
  | `requesty/gpt-5.6-terra@eu` | 1.1M | | | | | | $2 | $12 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Scaleway logo](https://models.dev/logos/scaleway.svg)Scaleway
4
4
 
5
- Access 14 Scaleway models through Mastra's model router. Authentication is handled automatically using the `SCALEWAY_API_KEY` environment variable.
5
+ Access 15 Scaleway models through Mastra's model router. Authentication is handled automatically using the `SCALEWAY_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Scaleway documentation](https://www.scaleway.com/en/docs/generative-apis/).
8
8
 
@@ -37,6 +37,7 @@ for await (const chunk of stream) {
37
37
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
38
  | ---------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
39
  | `scaleway/bge-multilingual-gemma2` | 8K | | | | | | $0.10 | — |
40
+ | `scaleway/deepseek-v4-flash-0731` | 256K | | | | | | $0.47 | $0.94 |
40
41
  | `scaleway/gemma-4-26b-a4b-it` | 256K | | | | | | $0.25 | $0.50 |
41
42
  | `scaleway/glm-5.2` | 256K | | | | | | $2 | $6 |
42
43
  | `scaleway/gpt-oss-120b` | 128K | | | | | | $0.15 | $0.60 |
@@ -0,0 +1,73 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![Standard Compute logo](https://models.dev/logos/standardcompute.svg)Standard Compute
4
+
5
+ Access 1 Standard Compute model through Mastra's model router. Authentication is handled automatically using the `STANDARDCOMPUTE_API_KEY` environment variable.
6
+
7
+ Learn more in the [Standard Compute documentation](https://standardcompute.com/models).
8
+
9
+ ```bash
10
+ STANDARDCOMPUTE_API_KEY=your-api-key
11
+ ```
12
+
13
+ ```typescript
14
+ import { Agent } from "@mastra/core/agent";
15
+
16
+ const agent = new Agent({
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "standardcompute/standardcompute"
21
+ });
22
+
23
+ // Generate a response
24
+ const response = await agent.generate("Hello!");
25
+
26
+ // Stream a response
27
+ const stream = await agent.stream("Tell me a story");
28
+ for await (const chunk of stream) {
29
+ console.log(chunk);
30
+ }
31
+ ```
32
+
33
+ > **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Standard Compute documentation](https://standardcompute.com/models) for details.
34
+
35
+ ## Models
36
+
37
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
38
+ | --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
39
+ | `standardcompute/standardcompute` | 1.0M | | | | | | — | — |
40
+
41
+ ## Advanced configuration
42
+
43
+ ### Custom headers
44
+
45
+ ```typescript
46
+ const agent = new Agent({
47
+ id: "custom-agent",
48
+ name: "custom-agent",
49
+ model: {
50
+ url: "https://api.stdcmpt.com/v1",
51
+ id: "standardcompute/standardcompute",
52
+ apiKey: process.env.STANDARDCOMPUTE_API_KEY,
53
+ headers: {
54
+ "X-Custom-Header": "value"
55
+ }
56
+ }
57
+ });
58
+ ```
59
+
60
+ ### Dynamic model selection
61
+
62
+ ```typescript
63
+ const agent = new Agent({
64
+ id: "dynamic-agent",
65
+ name: "Dynamic Agent",
66
+ model: ({ requestContext }) => {
67
+ const useAdvanced = requestContext.task === "complex";
68
+ return useAdvanced
69
+ ? "standardcompute/standardcompute"
70
+ : "standardcompute/standardcompute";
71
+ }
72
+ });
73
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Vivgrid logo](https://models.dev/logos/vivgrid.svg)Vivgrid
4
4
 
5
- Access 20 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
5
+ Access 21 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Vivgrid documentation](https://docs.vivgrid.com/models).
8
8
 
@@ -41,6 +41,7 @@ for await (const chunk of stream) {
41
41
  | `vivgrid/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
42
42
  | `vivgrid/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
43
43
  | `vivgrid/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
44
+ | `vivgrid/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
44
45
  | `vivgrid/glm-5.2` | 1.0M | | | | | | $1 | $4 |
45
46
  | `vivgrid/glm-5.3` | 1.0M | | | | | | $1 | $4 |
46
47
  | `vivgrid/gpt-5-mini` | 272K | | | | | | $0.25 | $2 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Weights & Biases logo](https://models.dev/logos/wandb.svg)Weights & Biases
4
4
 
5
- Access 29 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
5
+ Access 30 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
8
8
 
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
42
42
  | `wandb/deepseek-ai/DeepSeek-V4-Pro` | 1.0M | | | | | | $1 | $3 |
43
43
  | `wandb/google/gemma-4-31B-it` | 262K | | | | | | $0.10 | $0.34 |
44
44
  | `wandb/ibm-granite/granite-4.1-8b` | 131K | | | | | | $0.05 | $0.10 |
45
+ | `wandb/ibm-granite/granite-4.2-8b` | 131K | | | | | | $0.10 | $0.15 |
45
46
  | `wandb/JetBrains/Mellum2-12B-A2.5B-Instruct` | 131K | | | | | | $0.05 | $0.10 |
46
47
  | `wandb/meta-llama/Llama-3.1-70B-Instruct` | 128K | | | | | | $0.80 | $0.80 |
47
48
  | `wandb/meta-llama/Llama-3.1-8B-Instruct` | 128K | | | | | | $0.22 | $0.22 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Z.AI logo](https://models.dev/logos/zai.svg)Z.AI
4
4
 
5
- Access 14 Z.AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
5
+ Access 15 Z.AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
6
6
 
7
7
  Learn more in the [Z.AI documentation](https://docs.z.ai/guides/overview/pricing).
8
8
 
@@ -49,6 +49,7 @@ for await (const chunk of stream) {
49
49
  | `zai/glm-5-turbo` | 200K | | | | | | $1 | $4 |
50
50
  | `zai/glm-5.1` | 200K | | | | | | $1 | $4 |
51
51
  | `zai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
52
+ | `zai/glm-5.3` | 1.0M | | | | | | $1 | $4 |
52
53
  | `zai/glm-5v-turbo` | 200K | | | | | | $1 | $4 |
53
54
 
54
55
  ## Advanced configuration
@@ -14,8 +14,11 @@ Direct access to individual AI model providers. Each provider offers unique mode
14
14
  - [302.AI](https://mastra.ai/models/providers/302ai)
15
15
  - [Abacus](https://mastra.ai/models/providers/abacus)
16
16
  - [abliteration.ai](https://mastra.ai/models/providers/abliteration-ai)
17
+ - [AgentRouter](https://mastra.ai/models/providers/agentrouter)
18
+ - [Agnes AI](https://mastra.ai/models/providers/agnes)
17
19
  - [AI-ROUTER](https://mastra.ai/models/providers/ai-router)
18
20
  - [ai&](https://mastra.ai/models/providers/aiand)
21
+ - [Aixy](https://mastra.ai/models/providers/aixy)
19
22
  - [AKI.IO](https://mastra.ai/models/providers/aki-io)
20
23
  - [Alibaba](https://mastra.ai/models/providers/alibaba)
21
24
  - [Alibaba (China)](https://mastra.ai/models/providers/alibaba-cn)
@@ -77,6 +80,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
77
80
  - [InferX](https://mastra.ai/models/providers/inferx)
78
81
  - [Infomaniak](https://mastra.ai/models/providers/infomaniak)
79
82
  - [IO.NET](https://mastra.ai/models/providers/io-net)
83
+ - [IteraCompute](https://mastra.ai/models/providers/iteracompute)
80
84
  - [Jalapeno Cloud](https://mastra.ai/models/providers/jalapeno)
81
85
  - [Jiekou.AI](https://mastra.ai/models/providers/jiekou)
82
86
  - [Kenari](https://mastra.ai/models/providers/kenari)
@@ -87,6 +91,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
87
91
  - [Lilac](https://mastra.ai/models/providers/lilac)
88
92
  - [Llama](https://mastra.ai/models/providers/llama)
89
93
  - [LLM Gateway](https://mastra.ai/models/providers/llmgateway-providers)
94
+ - [LLM Tech](https://mastra.ai/models/providers/llmtech)
90
95
  - [LLMTR](https://mastra.ai/models/providers/llmtr)
91
96
  - [LMStudio](https://mastra.ai/models/providers/lmstudio)
92
97
  - [LongCat](https://mastra.ai/models/providers/longcat)
@@ -110,6 +115,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
110
115
  - [NanoGPT](https://mastra.ai/models/providers/nano-gpt)
111
116
  - [NEAR AI Cloud](https://mastra.ai/models/providers/nearai)
112
117
  - [Nebius Token Factory](https://mastra.ai/models/providers/nebius)
118
+ - [NeoSmith](https://mastra.ai/models/providers/neosmith)
113
119
  - [Neuralwatt](https://mastra.ai/models/providers/neuralwatt)
114
120
  - [Nova](https://mastra.ai/models/providers/nova)
115
121
  - [NovitaAI](https://mastra.ai/models/providers/novita-ai)
@@ -118,8 +124,10 @@ Direct access to individual AI model providers. Each provider offers unique mode
118
124
  - [Ollama Cloud](https://mastra.ai/models/providers/ollama-cloud)
119
125
  - [OpenCode Go](https://mastra.ai/models/providers/opencode-go)
120
126
  - [OpenCode Zen](https://mastra.ai/models/providers/opencode)
127
+ - [Opper](https://mastra.ai/models/providers/opper)
121
128
  - [OrcaRouter](https://mastra.ai/models/providers/orcarouter)
122
129
  - [OVHcloud AI Endpoints](https://mastra.ai/models/providers/ovhcloud)
130
+ - [Pendra](https://mastra.ai/models/providers/pendra)
123
131
  - [Perplexity](https://mastra.ai/models/providers/perplexity)
124
132
  - [Perplexity Agent](https://mastra.ai/models/providers/perplexity-agent)
125
133
  - [Pioneer](https://mastra.ai/models/providers/pioneer)
@@ -141,6 +149,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
141
149
  - [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn)
142
150
  - [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex)
143
151
  - [STACKIT](https://mastra.ai/models/providers/stackit)
152
+ - [Standard Compute](https://mastra.ai/models/providers/standardcompute)
144
153
  - [StepFun (China)](https://mastra.ai/models/providers/stepfun)
145
154
  - [StepFun (Global)](https://mastra.ai/models/providers/stepfun-ai)
146
155
  - [StepFun Step Plan (China)](https://mastra.ai/models/providers/stepfun-step-plan)
@@ -162,7 +162,7 @@ const agent = new Agent({
162
162
 
163
163
  ## Custom typing status
164
164
 
165
- Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes.
165
+ Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes. When the run ends, any status it set is cleared automatically so runs that finish without posting a message don't leave a stale status on the thread.
166
166
 
167
167
  `defaultTypingStatus` is exported from `@mastra/core/channels` so you can fall back to the built-in defaults for chunks you don't handle.
168
168
 
@@ -49,6 +49,17 @@ export async function POST(req: Request) {
49
49
  }
50
50
  ```
51
51
 
52
+ ## Keeping connections alive
53
+
54
+ Proxies and load balancers often close a connection that sends no bytes for a while, which drops the response during long reasoning bursts or slow tool calls. Wrap the encoded response with [`withSseHeartbeat()`](https://mastra.ai/reference/ai-sdk/with-sse-heartbeat) to emit periodic SSE comments while the stream is idle:
55
+
56
+ ```typescript
57
+ import { handleChatStream, withSseHeartbeat } from '@mastra/ai-sdk'
58
+ import { createUIMessageStreamResponse } from 'ai'
59
+
60
+ return withSseHeartbeat(createUIMessageStreamResponse({ stream }), 15000)
61
+ ```
62
+
52
63
  ## Parameters
53
64
 
54
65
  **version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
@@ -0,0 +1,47 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # withSseHeartbeat()
4
+
5
+ Wraps a server-sent events `Response` so it emits periodic `: heartbeat` comments while the underlying stream is idle. Proxies and load balancers often close connections that send no bytes for a while, which drops responses during long reasoning bursts or slow tool calls.
6
+
7
+ Use this when you build the response yourself with [`handleChatStream()`](https://mastra.ai/reference/ai-sdk/handle-chat-stream), [`handleWorkflowStream()`](https://mastra.ai/reference/ai-sdk/handle-workflow-stream), or [`handleNetworkStream()`](https://mastra.ai/reference/ai-sdk/handle-network-stream). [`chatRoute()`](https://mastra.ai/reference/ai-sdk/chat-route) applies the same wrapper internally through its `heartbeatMs` option.
8
+
9
+ ## Usage example
10
+
11
+ Next.js App Router example:
12
+
13
+ ```typescript
14
+ import { handleChatStream, withSseHeartbeat } from '@mastra/ai-sdk'
15
+ import { createUIMessageStreamResponse } from 'ai'
16
+ import { mastra } from '@/src/mastra'
17
+
18
+ export async function POST(req: Request) {
19
+ const params = await req.json()
20
+ const stream = await handleChatStream({
21
+ mastra,
22
+ agentId: 'weatherAgent',
23
+ version: 'v7',
24
+ params,
25
+ })
26
+ return withSseHeartbeat(createUIMessageStreamResponse({ stream }), 15000)
27
+ }
28
+ ```
29
+
30
+ Wrap the response after it has been encoded. `handleChatStream()` returns a stream of UI message chunks, and heartbeats are raw SSE comments that only exist once those chunks are serialized to the wire format.
31
+
32
+ ## Parameters
33
+
34
+ **response** (`Response`): The server-sent events response to wrap. Status, status text, and headers are preserved.
35
+
36
+ **heartbeatMs** (`number`): Interval in milliseconds between heartbeats. Omit it or pass a value of 0 or less to disable heartbeats.
37
+
38
+ ## Returns
39
+
40
+ A `Response` that streams the source body with heartbeat comments inserted during idle periods. The input response is returned unchanged when `heartbeatMs` is omitted, is `0` or less, or the response has no body.
41
+
42
+ ## Behavior
43
+
44
+ - Heartbeats are only inserted between complete SSE frames, so a partially delivered frame is never split.
45
+ - Source data, stream completion, and stream errors always take priority over a due heartbeat.
46
+ - Canceling the wrapped response cancels the source stream and clears the pending heartbeat timer.
47
+ - A `RangeError` is thrown when heartbeats are enabled with a value that can't be scheduled with a timer, meaning a non-finite number or a value greater than `2147483647`. Use `assertValidHeartbeatMs()` to apply the same check to user-supplied configuration before you start streaming.
@@ -1100,9 +1100,9 @@ For runtime commands, the command resolves the target server in this order:
1100
1100
  2. `http://localhost:4111` for a local `mastra dev` server.
1101
1101
  3. `.mastra-project.json` for a Mastra platform project.
1102
1102
 
1103
- Automatic platform auth is only used when the CLI resolves a Mastra platform target from `.mastra-project.json`. Localhost targets and explicit `--url` targets don't receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
1103
+ Automatic Platform authentication is used when the CLI resolves a project from `.mastra-project.json` or recognizes an explicit Mastra-hosted Studio, Factory, or observability URL. Localhost and arbitrary explicit `--url` targets don't receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
1104
1104
 
1105
- For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`. Both resolve credentials in this order:
1105
+ For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets the United States endpoint at `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`. When the CLI selects either hosted target automatically, it resolves credentials in this order:
1106
1106
 
1107
1107
  1. Explicit `Authorization` and `X-Mastra-Project-Id` headers passed with `--header`.
1108
1108
  2. `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` from your environment.
@@ -1111,7 +1111,13 @@ For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targ
1111
1111
 
1112
1112
  Learning commands also send `X-Mastra-Organization-Id`, resolved from an explicit `--header`, `MASTRA_ORGANIZATION_ID` in your environment, or `.mastra-project.json`, in that order.
1113
1113
 
1114
- Use `--url` and `--header` when you need to override the default hosted observability target or credentials.
1114
+ European Union observability data is stored at `https://observability.eu.mastra.ai`. Pass that trusted host with `--url`; it uses the same Platform credential resolution as the default United States endpoint:
1115
+
1116
+ ```bash
1117
+ mastra api --url https://observability.eu.mastra.ai trace list
1118
+ ```
1119
+
1120
+ Use `--url` and `--header` when you need to override another target or its credentials.
1115
1121
 
1116
1122
  ### Flags
1117
1123
 
@@ -1527,7 +1533,7 @@ mastra api metric label-values '{"metricName":"latency_ms","labelKey":"model","p
1527
1533
 
1528
1534
  #### Observability with `curl`
1529
1535
 
1530
- You can call the hosted observability API directly with your platform access token and project ID:
1536
+ You can call the hosted observability API directly with your platform access token and project ID. The examples below use the United States host. Substitute `https://observability.eu.mastra.ai` for a European Union environment. The [hosted feedback query API](https://mastra.ai/docs/mastra-platform/api) documents feedback endpoints that don't have CLI commands:
1531
1537
 
1532
1538
  ```bash
1533
1539
  curl -sS "https://observability.mastra.ai/api/observability/traces?page=0&perPage=20" \
@@ -92,7 +92,7 @@ const scores = await mastraClient.listScoresBySpan({
92
92
 
93
93
  ## Feedback
94
94
 
95
- Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections. See the [feedback guide](https://mastra.ai/docs/observability/feedback) for examples and the [feedback reference](https://mastra.ai/reference/observability/feedback) for full schemas.
95
+ Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections through the target Mastra runtime and its configured observability storage. They don't call the hosted Mastra Platform feedback query API. See the [feedback guide](https://mastra.ai/docs/observability/feedback) for examples and the [feedback reference](https://mastra.ai/reference/observability/feedback) for full schemas.
96
96
 
97
97
  ### Creating feedback
98
98
 
@@ -45,6 +45,7 @@ The Reference section provides documentation of Mastra's API, including paramete
45
45
  - [toAISdkV4Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v4-messages)
46
46
  - [toAISdkV5Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v5-messages)
47
47
  - [withMastra()](https://mastra.ai/reference/ai-sdk/with-mastra)
48
+ - [withSseHeartbeat()](https://mastra.ai/reference/ai-sdk/with-sse-heartbeat)
48
49
  - [workflowRoute()](https://mastra.ai/reference/ai-sdk/workflow-route)
49
50
  - [workflowSnapshotToStream()](https://mastra.ai/reference/ai-sdk/workflow-snapshot-to-stream)
50
51
  - [Auth0](https://mastra.ai/reference/auth/auth0)
@@ -244,6 +245,7 @@ The Reference section provides documentation of Mastra's API, including paramete
244
245
  - [Feedback](https://mastra.ai/reference/observability/feedback)
245
246
  - [PinoLogger](https://mastra.ai/reference/logging/pino-logger)
246
247
  - [Automatic Metrics](https://mastra.ai/reference/observability/metrics/automatic-metrics)
248
+ - [Metric queries](https://mastra.ai/reference/observability/metrics/queries)
247
249
  - [Configuration](https://mastra.ai/reference/observability/tracing/configuration)
248
250
  - [Instances](https://mastra.ai/reference/observability/tracing/instances)
249
251
  - [Interfaces](https://mastra.ai/reference/observability/tracing/interfaces)
@@ -277,6 +279,7 @@ The Reference section provides documentation of Mastra's API, including paramete
277
279
  - [PubSub](https://mastra.ai/reference/pubsub/base)
278
280
  - [RedisStreamsPubSub](https://mastra.ai/reference/pubsub/redis-streams)
279
281
  - [UnixSocketPubSub](https://mastra.ai/reference/pubsub/unix-socket-pubsub)
282
+ - [ValkeyStreamsPubSub](https://mastra.ai/reference/pubsub/valkey-streams)
280
283
  - [Overview](https://mastra.ai/reference/rag/overview)
281
284
  - [Chunking and Embedding](https://mastra.ai/reference/rag/chunking-and-embedding)
282
285
  - [DatabaseConfig](https://mastra.ai/reference/rag/database-config)
@@ -293,6 +296,7 @@ The Reference section provides documentation of Mastra's API, including paramete
293
296
  - [.chunk()](https://mastra.ai/reference/rag/chunk)
294
297
  - [Overview](https://mastra.ai/reference/schedules/overview)
295
298
  - [createRoute()](https://mastra.ai/reference/server/create-route)
299
+ - [Elysia Adapter](https://mastra.ai/reference/server/elysia-adapter)
296
300
  - [Express Adapter](https://mastra.ai/reference/server/express-adapter)
297
301
  - [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter)
298
302
  - [Hono Adapter](https://mastra.ai/reference/server/hono-adapter)
@@ -308,6 +312,7 @@ The Reference section provides documentation of Mastra's API, including paramete
308
312
  - [Overview](https://mastra.ai/reference/storage/overview)
309
313
  - [Composite Storage](https://mastra.ai/reference/storage/composite)
310
314
  - [Retention (prune)](https://mastra.ai/reference/storage/retention)
315
+ - [Turso Storage](https://mastra.ai/reference/storage/turso)
311
316
  - [ChunkType](https://mastra.ai/reference/streaming/ChunkType)
312
317
  - [smoothStream()](https://mastra.ai/reference/streaming/smoothStream)
313
318
  - [MastraModelOutput](https://mastra.ai/reference/streaming/agents/MastraModelOutput)
@@ -54,6 +54,8 @@ await mastra.observability.addFeedback?.({
54
54
 
55
55
  **feedback** (`FeedbackInput`): Feedback payload to add.
56
56
 
57
+ Without `correlationContext`, the method looks up `traceId` in configured observability storage. If the trace or requested span isn't found, Mastra logs a warning and drops the feedback event. Configure `MastraStorageExporter` when adding feedback by ID after execution, including when `MastraPlatformExporter` handles remote export.
58
+
57
59
  ### `createFeedback(args)`
58
60
 
59
61
  Creates one feedback record through the observability storage domain. Storage-level calls write directly to the store, so include `timestamp`.
@@ -375,6 +377,8 @@ Use `FeedbackFilter` in `listFeedback()` and OLAP query `filters`.
375
377
 
376
378
  ## HTTP routes
377
379
 
380
+ These routes belong to a Mastra runtime and use its configured observability storage. They're separate from the [unversioned Mastra Platform feedback query API](https://mastra.ai/docs/mastra-platform/api), which doesn't provide a feedback creation route.
381
+
378
382
  | Method | Path | Purpose | Permission |
379
383
  | ------ | ----------------------------------------- | ---------------------------- | -------------------- |
380
384
  | `GET` | `/api/observability/feedback` | List feedback records | None derived |
@@ -136,5 +136,5 @@ When you spot a spike in latency or token usage on the Metrics dashboard, correl
136
136
  ## Related
137
137
 
138
138
  - [Metrics overview](https://mastra.ai/docs/observability/metrics/overview)
139
- - [Querying metrics](https://mastra.ai/docs/observability/metrics/querying)
139
+ - [Metric queries](https://mastra.ai/reference/observability/metrics/queries)
140
140
  - [Studio observability](https://mastra.ai/docs/studio/observability)