@mastra/mcp-docs-server 1.1.17-alpha.1 → 1.1.17-alpha.13

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 (48) hide show
  1. package/.docs/docs/evals/built-in-scorers.md +1 -0
  2. package/.docs/docs/memory/observational-memory.md +56 -9
  3. package/.docs/docs/observability/tracing/bridges/otel.md +3 -3
  4. package/.docs/docs/observability/tracing/exporters/sentry.md +1 -1
  5. package/.docs/docs/server/auth/okta.md +225 -0
  6. package/.docs/docs/server/auth.md +1 -0
  7. package/.docs/docs/server/mastra-client.md +17 -0
  8. package/.docs/docs/workspace/lsp.md +116 -0
  9. package/.docs/docs/workspace/overview.md +15 -1
  10. package/.docs/guides/agent-frameworks/ai-sdk.md +3 -3
  11. package/.docs/models/gateways/openrouter.md +2 -1
  12. package/.docs/models/index.md +1 -1
  13. package/.docs/models/providers/groq.md +24 -16
  14. package/.docs/models/providers/llmgateway.md +269 -0
  15. package/.docs/models/providers/poe.md +3 -1
  16. package/.docs/models/providers/zai-coding-plan.md +3 -2
  17. package/.docs/models/providers/zai.md +14 -13
  18. package/.docs/models/providers/zhipuai-coding-plan.md +5 -2
  19. package/.docs/models/providers/zhipuai.md +13 -12
  20. package/.docs/models/providers.md +1 -0
  21. package/.docs/reference/ai-sdk/handle-chat-stream.md +2 -0
  22. package/.docs/reference/ai-sdk/with-mastra.md +2 -2
  23. package/.docs/reference/auth/okta.md +162 -0
  24. package/.docs/reference/client-js/agents.md +13 -8
  25. package/.docs/reference/client-js/mastra-client.md +1 -1
  26. package/.docs/reference/client-js/memory.md +1 -1
  27. package/.docs/reference/deployer/cloudflare.md +31 -1
  28. package/.docs/reference/evals/noise-sensitivity.md +3 -3
  29. package/.docs/reference/evals/run-evals.md +78 -3
  30. package/.docs/reference/evals/scorer-utils.md +188 -0
  31. package/.docs/reference/evals/trajectory-accuracy.md +627 -0
  32. package/.docs/reference/harness/harness-class.md +2 -0
  33. package/.docs/reference/index.md +3 -2
  34. package/.docs/reference/logging/pino-logger.md +58 -0
  35. package/.docs/reference/memory/observational-memory.md +34 -8
  36. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  37. package/.docs/reference/processors/message-history-processor.md +1 -1
  38. package/.docs/reference/processors/processor-interface.md +3 -3
  39. package/.docs/reference/processors/semantic-recall-processor.md +1 -1
  40. package/.docs/reference/processors/skill-search-processor.md +93 -0
  41. package/.docs/reference/processors/tool-call-filter.md +2 -2
  42. package/.docs/reference/processors/working-memory-processor.md +1 -1
  43. package/.docs/reference/streaming/agents/stream.md +1 -1
  44. package/.docs/reference/tools/mcp-client.md +1 -1
  45. package/CHANGELOG.md +42 -0
  46. package/package.json +4 -4
  47. package/.docs/reference/core/getStoredAgentById.md +0 -87
  48. package/.docs/reference/core/listStoredAgents.md +0 -91
@@ -1,6 +1,6 @@
1
1
  # ![Groq logo](https://models.dev/logos/groq.svg)Groq
2
2
 
3
- Access 9 Groq models through Mastra's model router. Authentication is handled automatically using the `GROQ_API_KEY` environment variable.
3
+ Access 17 Groq models through Mastra's model router. Authentication is handled automatically using the `GROQ_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Groq documentation](https://console.groq.com/docs/models).
6
6
 
@@ -15,7 +15,7 @@ const agent = new Agent({
15
15
  id: "my-agent",
16
16
  name: "My Agent",
17
17
  instructions: "You are a helpful assistant",
18
- model: "groq/llama-3.1-8b-instant"
18
+ model: "groq/allam-2-7b"
19
19
  });
20
20
 
21
21
  // Generate a response
@@ -30,17 +30,25 @@ for await (const chunk of stream) {
30
30
 
31
31
  ## Models
32
32
 
33
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
34
- | ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
35
- | `groq/llama-3.1-8b-instant` | 131K | | | | | | $0.05 | $0.08 |
36
- | `groq/llama-3.3-70b-versatile` | 131K | | | | | | $0.59 | $0.79 |
37
- | `groq/meta-llama/llama-4-maverick-17b-128e-instruct` | 131K | | | | | | $0.20 | $0.60 |
38
- | `groq/meta-llama/llama-4-scout-17b-16e-instruct` | 131K | | | | | | $0.11 | $0.34 |
39
- | `groq/meta-llama/llama-guard-4-12b` | 131K | | | | | | $0.20 | $0.20 |
40
- | `groq/moonshotai/kimi-k2-instruct-0905` | 262K | | | | | | $1 | $3 |
41
- | `groq/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
42
- | `groq/openai/gpt-oss-20b` | 131K | | | | | | $0.07 | $0.30 |
43
- | `groq/qwen/qwen3-32b` | 131K | | | | | | $0.29 | $0.59 |
33
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
34
+ | ------------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
35
+ | `groq/allam-2-7b` | 4K | | | | | | | |
36
+ | `groq/canopylabs/orpheus-arabic-saudi` | 4K | | | | | | $40 | |
37
+ | `groq/canopylabs/orpheus-v1-english` | 4K | | | | | | | |
38
+ | `groq/groq/compound` | 131K | | | | | | | |
39
+ | `groq/groq/compound-mini` | 131K | | | | | | | |
40
+ | `groq/llama-3.1-8b-instant` | 131K | | | | | | $0.05 | $0.08 |
41
+ | `groq/llama-3.3-70b-versatile` | 131K | | | | | | $0.59 | $0.79 |
42
+ | `groq/meta-llama/llama-4-scout-17b-16e-instruct` | 131K | | | | | | $0.11 | $0.34 |
43
+ | `groq/meta-llama/llama-prompt-guard-2-22m` | 512 | | | | | | $0.03 | $0.03 |
44
+ | `groq/meta-llama/llama-prompt-guard-2-86m` | 512 | | | | | | $0.04 | $0.04 |
45
+ | `groq/moonshotai/kimi-k2-instruct-0905` | 262K | | | | | | $1 | $3 |
46
+ | `groq/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
47
+ | `groq/openai/gpt-oss-20b` | 131K | | | | | | $0.07 | $0.30 |
48
+ | `groq/openai/gpt-oss-safeguard-20b` | 131K | | | | | | $0.07 | $0.30 |
49
+ | `groq/qwen/qwen3-32b` | 131K | | | | | | $0.29 | $0.59 |
50
+ | `groq/whisper-large-v3` | 448 | | | | | | — | — |
51
+ | `groq/whisper-large-v3-turbo` | 448 | | | | | | — | — |
44
52
 
45
53
  ## Advanced configuration
46
54
 
@@ -52,7 +60,7 @@ const agent = new Agent({
52
60
  name: "custom-agent",
53
61
  model: {
54
62
  url: "https://api.groq.com/openai/v1",
55
- id: "groq/llama-3.1-8b-instant",
63
+ id: "groq/allam-2-7b",
56
64
  apiKey: process.env.GROQ_API_KEY,
57
65
  headers: {
58
66
  "X-Custom-Header": "value"
@@ -70,8 +78,8 @@ const agent = new Agent({
70
78
  model: ({ requestContext }) => {
71
79
  const useAdvanced = requestContext.task === "complex";
72
80
  return useAdvanced
73
- ? "groq/qwen/qwen3-32b"
74
- : "groq/llama-3.1-8b-instant";
81
+ ? "groq/whisper-large-v3-turbo"
82
+ : "groq/allam-2-7b";
75
83
  }
76
84
  });
77
85
  ```
@@ -0,0 +1,269 @@
1
+ # ![LLM Gateway logo](https://models.dev/logos/llmgateway.svg)LLM Gateway
2
+
3
+ Access 199 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
4
+
5
+ Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
6
+
7
+ ```bash
8
+ LLMGATEWAY_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "llmgateway/auto"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [LLM Gateway documentation](https://llmgateway.io/docs) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | -------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `llmgateway/auto` | 128K | | | | | | — | — |
38
+ | `llmgateway/claude-3-5-sonnet` | 200K | | | | | | $3 | $15 |
39
+ | `llmgateway/claude-3-7-sonnet` | 200K | | | | | | $3 | $15 |
40
+ | `llmgateway/claude-3-7-sonnet-20250219` | 200K | | | | | | $3 | $15 |
41
+ | `llmgateway/claude-3-haiku` | 200K | | | | | | $0.25 | $1 |
42
+ | `llmgateway/claude-3-haiku-20240307` | 200K | | | | | | $0.25 | $1 |
43
+ | `llmgateway/claude-3-opus` | 200K | | | | | | $15 | $75 |
44
+ | `llmgateway/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
45
+ | `llmgateway/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
46
+ | `llmgateway/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
47
+ | `llmgateway/claude-opus-4-20250514` | 200K | | | | | | $15 | $75 |
48
+ | `llmgateway/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
49
+ | `llmgateway/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
50
+ | `llmgateway/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
51
+ | `llmgateway/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
52
+ | `llmgateway/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
53
+ | `llmgateway/claude-sonnet-4-6` | 200K | | | | | | $3 | $15 |
54
+ | `llmgateway/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
55
+ | `llmgateway/cogview-4` | 2K | | | | | | — | — |
56
+ | `llmgateway/custom` | 128K | | | | | | — | — |
57
+ | `llmgateway/deepseek-r1-0528` | 64K | | | | | | $0.80 | $2 |
58
+ | `llmgateway/deepseek-v3.1` | 128K | | | | | | $0.56 | $2 |
59
+ | `llmgateway/deepseek-v3.2` | 164K | | | | | | $0.28 | $0.42 |
60
+ | `llmgateway/devstral-2512` | 262K | | | | | | $0.40 | $2 |
61
+ | `llmgateway/devstral-small-2507` | 131K | | | | | | $0.10 | $0.30 |
62
+ | `llmgateway/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
63
+ | `llmgateway/gemini-2.5-flash-image` | 33K | | | | | | $0.30 | $30 |
64
+ | `llmgateway/gemini-2.5-flash-image-preview` | 33K | | | | | | $0.30 | $3 |
65
+ | `llmgateway/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
66
+ | `llmgateway/gemini-2.5-flash-lite-preview-09-2025` | 1.0M | | | | | | $0.10 | $0.40 |
67
+ | `llmgateway/gemini-2.5-pro` | 1.0M | | | | | | $1 | $10 |
68
+ | `llmgateway/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
69
+ | `llmgateway/gemini-3-pro-image-preview` | 66K | | | | | | $2 | $12 |
70
+ | `llmgateway/gemini-3.1-flash-image-preview` | 66K | | | | | | $0.25 | $2 |
71
+ | `llmgateway/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
72
+ | `llmgateway/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
73
+ | `llmgateway/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
74
+ | `llmgateway/gemma-2-27b-it-together` | 8K | | | | | | $0.08 | $0.08 |
75
+ | `llmgateway/gemma-3-12b-it` | 1.0M | | | | | | $0.08 | $0.30 |
76
+ | `llmgateway/gemma-3-1b-it` | 1.0M | | | | | | $0.08 | $0.30 |
77
+ | `llmgateway/gemma-3-27b` | 128K | | | | | | $0.27 | $0.27 |
78
+ | `llmgateway/gemma-3-4b-it` | 1.0M | | | | | | $0.08 | $0.30 |
79
+ | `llmgateway/gemma-3n-e2b-it` | 1.0M | | | | | | $0.08 | $0.30 |
80
+ | `llmgateway/gemma-3n-e4b-it` | 1.0M | | | | | | $0.08 | $0.30 |
81
+ | `llmgateway/glm-4-32b-0414-128k` | 128K | | | | | | $0.10 | $0.10 |
82
+ | `llmgateway/glm-4.5` | 128K | | | | | | $0.60 | $2 |
83
+ | `llmgateway/glm-4.5-air` | 128K | | | | | | $0.20 | $1 |
84
+ | `llmgateway/glm-4.5-airx` | 128K | | | | | | $1 | $5 |
85
+ | `llmgateway/glm-4.5-flash` | 128K | | | | | | — | — |
86
+ | `llmgateway/glm-4.5-x` | 128K | | | | | | $2 | $9 |
87
+ | `llmgateway/glm-4.5v` | 128K | | | | | | $0.60 | $2 |
88
+ | `llmgateway/glm-4.6` | 200K | | | | | | $0.60 | $2 |
89
+ | `llmgateway/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
90
+ | `llmgateway/glm-4.6v-flash` | 128K | | | | | | — | — |
91
+ | `llmgateway/glm-4.6v-flashx` | 128K | | | | | | $0.04 | $0.40 |
92
+ | `llmgateway/glm-4.7` | 200K | | | | | | $0.60 | $2 |
93
+ | `llmgateway/glm-4.7-flash` | 200K | | | | | | — | — |
94
+ | `llmgateway/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
95
+ | `llmgateway/glm-5` | 203K | | | | | | $1 | $3 |
96
+ | `llmgateway/glm-image` | 2K | | | | | | — | — |
97
+ | `llmgateway/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
98
+ | `llmgateway/gpt-4` | 8K | | | | | | $30 | $60 |
99
+ | `llmgateway/gpt-4-turbo` | 128K | | | | | | $10 | $30 |
100
+ | `llmgateway/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
101
+ | `llmgateway/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
102
+ | `llmgateway/gpt-4.1-nano` | 1.0M | | | | | | $0.10 | $0.40 |
103
+ | `llmgateway/gpt-4o` | 128K | | | | | | $3 | $10 |
104
+ | `llmgateway/gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 |
105
+ | `llmgateway/gpt-4o-mini-search-preview` | 128K | | | | | | $0.15 | $0.60 |
106
+ | `llmgateway/gpt-4o-search-preview` | 128K | | | | | | $3 | $10 |
107
+ | `llmgateway/gpt-5` | 400K | | | | | | $1 | $10 |
108
+ | `llmgateway/gpt-5-chat-latest` | 400K | | | | | | $1 | $10 |
109
+ | `llmgateway/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
110
+ | `llmgateway/gpt-5-nano` | 400K | | | | | | $0.05 | $0.40 |
111
+ | `llmgateway/gpt-5-pro` | 400K | | | | | | $15 | $120 |
112
+ | `llmgateway/gpt-5.1` | 400K | | | | | | $1 | $10 |
113
+ | `llmgateway/gpt-5.1-codex` | 400K | | | | | | $1 | $10 |
114
+ | `llmgateway/gpt-5.1-codex-mini` | 400K | | | | | | $0.25 | $2 |
115
+ | `llmgateway/gpt-5.2` | 400K | | | | | | $2 | $14 |
116
+ | `llmgateway/gpt-5.2-chat-latest` | 128K | | | | | | $2 | $14 |
117
+ | `llmgateway/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
118
+ | `llmgateway/gpt-5.2-pro` | 400K | | | | | | $21 | $168 |
119
+ | `llmgateway/gpt-5.3-chat-latest` | 128K | | | | | | $2 | $14 |
120
+ | `llmgateway/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
121
+ | `llmgateway/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
122
+ | `llmgateway/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
123
+ | `llmgateway/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
124
+ | `llmgateway/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
125
+ | `llmgateway/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.75 |
126
+ | `llmgateway/gpt-oss-20b` | 131K | | | | | | $0.10 | $0.50 |
127
+ | `llmgateway/grok-3` | 131K | | | | | | $3 | $15 |
128
+ | `llmgateway/grok-4` | 256K | | | | | | $3 | $15 |
129
+ | `llmgateway/grok-4-0709` | 256K | | | | | | $3 | $15 |
130
+ | `llmgateway/grok-4-1-fast` | 2.0M | | | | | | $0.20 | $0.50 |
131
+ | `llmgateway/grok-4-1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
132
+ | `llmgateway/grok-4-1-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
133
+ | `llmgateway/grok-4-20-beta-0309-non-reasoning` | 2.0M | | | | | | $2 | $6 |
134
+ | `llmgateway/grok-4-20-beta-0309-reasoning` | 2.0M | | | | | | $2 | $6 |
135
+ | `llmgateway/grok-4-20-multi-agent-beta-0309` | 2.0M | | | | | | $2 | $6 |
136
+ | `llmgateway/grok-4-fast` | 2.0M | | | | | | $0.20 | $0.50 |
137
+ | `llmgateway/grok-4-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
138
+ | `llmgateway/grok-4-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
139
+ | `llmgateway/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
140
+ | `llmgateway/grok-imagine-image` | 2K | | | | | | — | — |
141
+ | `llmgateway/grok-imagine-image-pro` | 2K | | | | | | — | — |
142
+ | `llmgateway/hermes-2-pro-llama-3-8b` | 8K | | | | | | $0.14 | $0.14 |
143
+ | `llmgateway/kimi-k2` | 131K | | | | | | $1 | $3 |
144
+ | `llmgateway/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
145
+ | `llmgateway/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 |
146
+ | `llmgateway/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
147
+ | `llmgateway/llama-3-70b-instruct` | 8K | | | | | | $0.51 | $0.74 |
148
+ | `llmgateway/llama-3-8b-instruct` | 8K | | | | | | $0.04 | $0.04 |
149
+ | `llmgateway/llama-3.1-70b-instruct` | 128K | | | | | | $0.72 | $0.72 |
150
+ | `llmgateway/llama-3.1-8b-instruct` | 128K | | | | | | $0.22 | $0.22 |
151
+ | `llmgateway/llama-3.1-nemotron-ultra-253b` | 128K | | | | | | $0.60 | $2 |
152
+ | `llmgateway/llama-3.2-11b-instruct` | 128K | | | | | | $0.07 | $0.33 |
153
+ | `llmgateway/llama-3.2-3b-instruct` | 33K | | | | | | $0.03 | $0.05 |
154
+ | `llmgateway/llama-3.3-70b-instruct` | 128K | | | | | | $0.13 | $0.40 |
155
+ | `llmgateway/llama-4-maverick-17b-instruct` | 8K | | | | | | $0.24 | $0.97 |
156
+ | `llmgateway/llama-4-scout` | 33K | | | | | | $0.18 | $0.59 |
157
+ | `llmgateway/llama-4-scout-17b-instruct` | 8K | | | | | | $0.17 | $0.66 |
158
+ | `llmgateway/llama-guard-4-12b` | 131K | | | | | | $0.20 | $0.20 |
159
+ | `llmgateway/minimax-m2` | 197K | | | | | | $0.20 | $1 |
160
+ | `llmgateway/minimax-m2.1` | 197K | | | | | | $0.27 | $1 |
161
+ | `llmgateway/minimax-m2.1-lightning` | 197K | | | | | | $0.12 | $0.48 |
162
+ | `llmgateway/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
163
+ | `llmgateway/minimax-m2.5-highspeed` | 205K | | | | | | $0.60 | $2 |
164
+ | `llmgateway/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
165
+ | `llmgateway/minimax-m2.7-highspeed` | 205K | | | | | | $0.60 | $2 |
166
+ | `llmgateway/minimax-text-01` | 1.0M | | | | | | $0.20 | $1 |
167
+ | `llmgateway/ministral-14b-2512` | 262K | | | | | | $0.20 | $0.20 |
168
+ | `llmgateway/ministral-3b-2512` | 131K | | | | | | $0.10 | $0.10 |
169
+ | `llmgateway/ministral-8b-2512` | 262K | | | | | | $0.15 | $0.15 |
170
+ | `llmgateway/mistral-large-2512` | 262K | | | | | | $0.50 | $2 |
171
+ | `llmgateway/mistral-large-latest` | 128K | | | | | | $4 | $12 |
172
+ | `llmgateway/mistral-small-2506` | 128K | | | | | | $0.10 | $0.30 |
173
+ | `llmgateway/mixtral-8x7b-instruct-together` | 33K | | | | | | $0.06 | $0.06 |
174
+ | `llmgateway/o1` | 200K | | | | | | $15 | $60 |
175
+ | `llmgateway/o3` | 200K | | | | | | $2 | $8 |
176
+ | `llmgateway/o3-mini` | 200K | | | | | | $1 | $4 |
177
+ | `llmgateway/o4-mini` | 200K | | | | | | $1 | $4 |
178
+ | `llmgateway/pixtral-large-latest` | 128K | | | | | | $4 | $12 |
179
+ | `llmgateway/qwen-coder-plus` | 131K | | | | | | $1 | $5 |
180
+ | `llmgateway/qwen-flash` | 1.0M | | | | | | $0.05 | $0.40 |
181
+ | `llmgateway/qwen-image` | 2K | | | | | | — | — |
182
+ | `llmgateway/qwen-image-edit-max` | 2K | | | | | | — | — |
183
+ | `llmgateway/qwen-image-edit-plus` | 2K | | | | | | — | — |
184
+ | `llmgateway/qwen-image-max` | 2K | | | | | | — | — |
185
+ | `llmgateway/qwen-image-max-2025-12-30` | 2K | | | | | | — | — |
186
+ | `llmgateway/qwen-image-plus` | 2K | | | | | | — | — |
187
+ | `llmgateway/qwen-max` | 131K | | | | | | $2 | $6 |
188
+ | `llmgateway/qwen-max-latest` | 131K | | | | | | $2 | $6 |
189
+ | `llmgateway/qwen-omni-turbo` | 33K | | | | | | $0.20 | $0.80 |
190
+ | `llmgateway/qwen-plus` | 131K | | | | | | $0.40 | $1 |
191
+ | `llmgateway/qwen-plus-latest` | 1.0M | | | | | | $0.40 | $1 |
192
+ | `llmgateway/qwen-turbo` | 1.0M | | | | | | $0.05 | $0.20 |
193
+ | `llmgateway/qwen-vl-max` | 131K | | | | | | $0.80 | $3 |
194
+ | `llmgateway/qwen-vl-plus` | 131K | | | | | | $0.21 | $0.64 |
195
+ | `llmgateway/qwen2-5-vl-32b-instruct` | 131K | | | | | | $1 | $4 |
196
+ | `llmgateway/qwen2-5-vl-72b-instruct` | 33K | | | | | | $0.13 | $0.40 |
197
+ | `llmgateway/qwen25-coder-7b` | 33K | | | | | | $0.01 | $0.03 |
198
+ | `llmgateway/qwen3-235b-a22b-fp8` | 41K | | | | | | $0.20 | $0.80 |
199
+ | `llmgateway/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.20 | $0.60 |
200
+ | `llmgateway/qwen3-235b-a22b-thinking-2507` | 262K | | | | | | $0.20 | $0.60 |
201
+ | `llmgateway/qwen3-30b-a3b-fp8` | 41K | | | | | | $0.09 | $0.45 |
202
+ | `llmgateway/qwen3-30b-a3b-instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
203
+ | `llmgateway/qwen3-30b-a3b-thinking-2507` | 262K | | | | | | $0.10 | $0.30 |
204
+ | `llmgateway/qwen3-32b` | 33K | | | | | | $0.10 | $0.30 |
205
+ | `llmgateway/qwen3-32b-fp8` | 41K | | | | | | $0.10 | $0.45 |
206
+ | `llmgateway/qwen3-4b-fp8` | 128K | | | | | | $0.03 | $0.03 |
207
+ | `llmgateway/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.10 | $0.30 |
208
+ | `llmgateway/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.40 | $2 |
209
+ | `llmgateway/qwen3-coder-flash` | 1.0M | | | | | | $0.30 | $2 |
210
+ | `llmgateway/qwen3-coder-next` | 262K | | | | | | $0.11 | $0.68 |
211
+ | `llmgateway/qwen3-coder-plus` | 1.0M | | | | | | $6 | $60 |
212
+ | `llmgateway/qwen3-max` | 256K | | | | | | $3 | $15 |
213
+ | `llmgateway/qwen3-max-2026-01-23` | 262K | | | | | | $1 | $6 |
214
+ | `llmgateway/qwen3-next-80b-a3b-instruct` | 129K | | | | | | $0.50 | $2 |
215
+ | `llmgateway/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.50 | $6 |
216
+ | `llmgateway/qwen3-vl-235b-a22b-instruct` | 131K | | | | | | $0.50 | $2 |
217
+ | `llmgateway/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.50 | $2 |
218
+ | `llmgateway/qwen3-vl-30b-a3b-instruct` | 131K | | | | | | $0.20 | $0.70 |
219
+ | `llmgateway/qwen3-vl-30b-a3b-thinking` | 131K | | | | | | $0.20 | $1 |
220
+ | `llmgateway/qwen3-vl-8b-instruct` | 131K | | | | | | $0.08 | $0.50 |
221
+ | `llmgateway/qwen3-vl-flash` | 262K | | | | | | $0.05 | $0.40 |
222
+ | `llmgateway/qwen3-vl-plus` | 262K | | | | | | $0.20 | $2 |
223
+ | `llmgateway/qwen35-397b-a17b` | 262K | | | | | | $0.60 | $4 |
224
+ | `llmgateway/qwq-plus` | 131K | | | | | | $0.80 | $2 |
225
+ | `llmgateway/seed-1-6-250615` | 256K | | | | | | $0.25 | $2 |
226
+ | `llmgateway/seed-1-6-250915` | 256K | | | | | | $0.25 | $2 |
227
+ | `llmgateway/seed-1-6-flash-250715` | 256K | | | | | | $0.07 | $0.30 |
228
+ | `llmgateway/seed-1-8-251228` | 256K | | | | | | $0.25 | $2 |
229
+ | `llmgateway/seedream-4-0` | 2K | | | | | | — | — |
230
+ | `llmgateway/seedream-4-5` | 2K | | | | | | — | — |
231
+ | `llmgateway/sonar` | 130K | | | | | | $1 | $1 |
232
+ | `llmgateway/sonar-pro` | 200K | | | | | | $3 | $15 |
233
+ | `llmgateway/sonar-reasoning-pro` | 128K | | | | | | $2 | $8 |
234
+ | `llmgateway/veo-3.1-fast-generate-preview` | 33K | | | | | | — | — |
235
+ | `llmgateway/veo-3.1-generate-preview` | 33K | | | | | | — | — |
236
+
237
+ ## Advanced configuration
238
+
239
+ ### Custom headers
240
+
241
+ ```typescript
242
+ const agent = new Agent({
243
+ id: "custom-agent",
244
+ name: "custom-agent",
245
+ model: {
246
+ url: "https://api.llmgateway.io/v1",
247
+ id: "llmgateway/auto",
248
+ apiKey: process.env.LLMGATEWAY_API_KEY,
249
+ headers: {
250
+ "X-Custom-Header": "value"
251
+ }
252
+ }
253
+ });
254
+ ```
255
+
256
+ ### Dynamic model selection
257
+
258
+ ```typescript
259
+ const agent = new Agent({
260
+ id: "dynamic-agent",
261
+ name: "Dynamic Agent",
262
+ model: ({ requestContext }) => {
263
+ const useAdvanced = requestContext.task === "complex";
264
+ return useAdvanced
265
+ ? "llmgateway/veo-3.1-generate-preview"
266
+ : "llmgateway/auto";
267
+ }
268
+ });
269
+ ```
@@ -1,6 +1,6 @@
1
1
  # ![Poe logo](https://models.dev/logos/poe.svg)Poe
2
2
 
3
- Access 122 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
3
+ Access 124 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Poe documentation](https://creator.poe.com/docs/external-applications/openai-compatible-api).
6
6
 
@@ -83,6 +83,7 @@ for await (const chunk of stream) {
83
83
  | `poe/ideogramai/ideogram-v2a` | 150 | | | | | | — | — |
84
84
  | `poe/ideogramai/ideogram-v2a-turbo` | 150 | | | | | | — | — |
85
85
  | `poe/lumalabs/ray2` | 5K | | | | | | — | — |
86
+ | `poe/novita/deepseek-v3.2` | 128K | | | | | | $0.27 | $0.40 |
86
87
  | `poe/novita/glm-4.6` | — | | | | | | — | — |
87
88
  | `poe/novita/glm-4.6v` | 131K | | | | | | — | — |
88
89
  | `poe/novita/glm-4.7` | 205K | | | | | | — | — |
@@ -155,6 +156,7 @@ for await (const chunk of stream) {
155
156
  | `poe/xai/grok-4-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
156
157
  | `poe/xai/grok-4.1-fast-non-reasoning` | 2.0M | | | | | | — | — |
157
158
  | `poe/xai/grok-4.1-fast-reasoning` | 2.0M | | | | | | — | — |
159
+ | `poe/xai/grok-4.20-multi-agent` | 128K | | | | | | $2 | $6 |
158
160
  | `poe/xai/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
159
161
 
160
162
  ## Advanced configuration
@@ -1,6 +1,6 @@
1
1
  # ![Z.AI Coding Plan logo](https://models.dev/logos/zai-coding-plan.svg)Z.AI Coding Plan
2
2
 
3
- Access 11 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
3
+ Access 12 Z.AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview).
6
6
 
@@ -45,6 +45,7 @@ for await (const chunk of stream) {
45
45
  | `zai-coding-plan/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
46
46
  | `zai-coding-plan/glm-5` | 205K | | | | | | — | — |
47
47
  | `zai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
48
+ | `zai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
48
49
 
49
50
  ## Advanced configuration
50
51
 
@@ -74,7 +75,7 @@ const agent = new Agent({
74
75
  model: ({ requestContext }) => {
75
76
  const useAdvanced = requestContext.task === "complex";
76
77
  return useAdvanced
77
- ? "zai-coding-plan/glm-5-turbo"
78
+ ? "zai-coding-plan/glm-5.1"
78
79
  : "zai-coding-plan/glm-4.5";
79
80
  }
80
81
  });
@@ -1,6 +1,6 @@
1
1
  # ![Z.AI logo](https://models.dev/logos/zai.svg)Z.AI
2
2
 
3
- Access 10 Z.AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
3
+ Access 11 Z.AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Z.AI documentation](https://docs.z.ai/guides/overview/pricing).
6
6
 
@@ -32,18 +32,19 @@ for await (const chunk of stream) {
32
32
 
33
33
  ## Models
34
34
 
35
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
- | ------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `zai/glm-4.5` | 131K | | | | | | $0.60 | $2 |
38
- | `zai/glm-4.5-air` | 131K | | | | | | $0.20 | $1 |
39
- | `zai/glm-4.5-flash` | 131K | | | | | | — | — |
40
- | `zai/glm-4.5v` | 64K | | | | | | $0.60 | $2 |
41
- | `zai/glm-4.6` | 205K | | | | | | $0.60 | $2 |
42
- | `zai/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
43
- | `zai/glm-4.7` | 205K | | | | | | $0.60 | $2 |
44
- | `zai/glm-4.7-flash` | 200K | | | | | | — | — |
45
- | `zai/glm-5` | 205K | | | | | | $1 | $3 |
46
- | `zai/glm-5-turbo` | 200K | | | | | | $1 | $4 |
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | -------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `zai/glm-4.5` | 131K | | | | | | $0.60 | $2 |
38
+ | `zai/glm-4.5-air` | 131K | | | | | | $0.20 | $1 |
39
+ | `zai/glm-4.5-flash` | 131K | | | | | | — | — |
40
+ | `zai/glm-4.5v` | 64K | | | | | | $0.60 | $2 |
41
+ | `zai/glm-4.6` | 205K | | | | | | $0.60 | $2 |
42
+ | `zai/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
43
+ | `zai/glm-4.7` | 205K | | | | | | $0.60 | $2 |
44
+ | `zai/glm-4.7-flash` | 200K | | | | | | — | — |
45
+ | `zai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
46
+ | `zai/glm-5` | 205K | | | | | | $1 | $3 |
47
+ | `zai/glm-5-turbo` | 200K | | | | | | $1 | $4 |
47
48
 
48
49
  ## Advanced configuration
49
50
 
@@ -1,6 +1,6 @@
1
1
  # ![Zhipu AI Coding Plan logo](https://models.dev/logos/zhipuai-coding-plan.svg)Zhipu AI Coding Plan
2
2
 
3
- Access 10 Zhipu AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
3
+ Access 13 Zhipu AI Coding Plan models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Zhipu AI Coding Plan documentation](https://docs.bigmodel.cn/cn/coding-plan/overview).
6
6
 
@@ -42,8 +42,11 @@ for await (const chunk of stream) {
42
42
  | `zhipuai-coding-plan/glm-4.6v` | 128K | | | | | | — | — |
43
43
  | `zhipuai-coding-plan/glm-4.6v-flash` | 128K | | | | | | — | — |
44
44
  | `zhipuai-coding-plan/glm-4.7` | 205K | | | | | | — | — |
45
+ | `zhipuai-coding-plan/glm-4.7-flash` | 200K | | | | | | — | — |
46
+ | `zhipuai-coding-plan/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
45
47
  | `zhipuai-coding-plan/glm-5` | 205K | | | | | | — | — |
46
48
  | `zhipuai-coding-plan/glm-5-turbo` | 200K | | | | | | — | — |
49
+ | `zhipuai-coding-plan/glm-5.1` | 200K | | | | | | — | — |
47
50
 
48
51
  ## Advanced configuration
49
52
 
@@ -73,7 +76,7 @@ const agent = new Agent({
73
76
  model: ({ requestContext }) => {
74
77
  const useAdvanced = requestContext.task === "complex";
75
78
  return useAdvanced
76
- ? "zhipuai-coding-plan/glm-5-turbo"
79
+ ? "zhipuai-coding-plan/glm-5.1"
77
80
  : "zhipuai-coding-plan/glm-4.5";
78
81
  }
79
82
  });
@@ -1,6 +1,6 @@
1
1
  # ![Zhipu AI logo](https://models.dev/logos/zhipuai.svg)Zhipu AI
2
2
 
3
- Access 9 Zhipu AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
3
+ Access 10 Zhipu AI models through Mastra's model router. Authentication is handled automatically using the `ZHIPU_API_KEY` environment variable.
4
4
 
5
5
  Learn more in the [Zhipu AI documentation](https://docs.z.ai/guides/overview/pricing).
6
6
 
@@ -32,17 +32,18 @@ for await (const chunk of stream) {
32
32
 
33
33
  ## Models
34
34
 
35
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
- | ----------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
- | `zhipuai/glm-4.5` | 131K | | | | | | $0.60 | $2 |
38
- | `zhipuai/glm-4.5-air` | 131K | | | | | | $0.20 | $1 |
39
- | `zhipuai/glm-4.5-flash` | 131K | | | | | | — | — |
40
- | `zhipuai/glm-4.5v` | 64K | | | | | | $0.60 | $2 |
41
- | `zhipuai/glm-4.6` | 205K | | | | | | $0.60 | $2 |
42
- | `zhipuai/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
43
- | `zhipuai/glm-4.7` | 205K | | | | | | $0.60 | $2 |
44
- | `zhipuai/glm-4.7-flash` | 200K | | | | | | — | — |
45
- | `zhipuai/glm-5` | 205K | | | | | | $1 | $3 |
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `zhipuai/glm-4.5` | 131K | | | | | | $0.60 | $2 |
38
+ | `zhipuai/glm-4.5-air` | 131K | | | | | | $0.20 | $1 |
39
+ | `zhipuai/glm-4.5-flash` | 131K | | | | | | — | — |
40
+ | `zhipuai/glm-4.5v` | 64K | | | | | | $0.60 | $2 |
41
+ | `zhipuai/glm-4.6` | 205K | | | | | | $0.60 | $2 |
42
+ | `zhipuai/glm-4.6v` | 128K | | | | | | $0.30 | $0.90 |
43
+ | `zhipuai/glm-4.7` | 205K | | | | | | $0.60 | $2 |
44
+ | `zhipuai/glm-4.7-flash` | 200K | | | | | | — | — |
45
+ | `zhipuai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
46
+ | `zhipuai/glm-5` | 205K | | | | | | $1 | $3 |
46
47
 
47
48
  ## Advanced configuration
48
49
 
@@ -45,6 +45,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
45
45
  - [Kimi For Coding](https://mastra.ai/models/providers/kimi-for-coding)
46
46
  - [KUAE Cloud Coding Plan](https://mastra.ai/models/providers/kuae-cloud-coding-plan)
47
47
  - [Llama](https://mastra.ai/models/providers/llama)
48
+ - [LLM Gateway](https://mastra.ai/models/providers/llmgateway)
48
49
  - [LMStudio](https://mastra.ai/models/providers/lmstudio)
49
50
  - [LucidQuery AI](https://mastra.ai/models/providers/lucidquery)
50
51
  - [Meganova](https://mastra.ai/models/providers/meganova)
@@ -59,4 +59,6 @@ export async function POST(req: Request) {
59
59
 
60
60
  **sendSources** (`boolean`): Whether to include source citations in the stream. (Default: `false`)
61
61
 
62
+ **onError** (`(error: unknown) => string`): Called when the stream encounters an error. Return the string that will be sent to the client as the error message. Use this to sanitize errors before they reach the client — for example, to prevent internal infrastructure details from leaking to end users.
63
+
62
64
  **messageMetadata** (`(options: { part: UIMessageStreamPart }) => Record<string, unknown> | undefined`): A function that receives the current stream part and returns metadata to attach to start and finish chunks. See the \[AI SDK message metadata docs]\(https\://ai-sdk.dev/docs/ai-sdk-ui/message-metadata) for details.
@@ -18,7 +18,7 @@ const loggingProcessor: Processor<'logger'> = {
18
18
  },
19
19
  }
20
20
 
21
- const model = withMastra(openai('gpt-4o'), {
21
+ const model = withMastra(openai('gpt-5.4'), {
22
22
  inputProcessors: [loggingProcessor],
23
23
  })
24
24
 
@@ -30,7 +30,7 @@ const { text } = await generateText({
30
30
 
31
31
  ## Parameters
32
32
 
33
- **model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., \`openai('gpt-4o')\`, \`anthropic('claude-3-opus')\`).
33
+ **model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., \`openai('gpt-5.4')\`, \`anthropic('claude-opus-4-6')\`).
34
34
 
35
35
  **options** (`WithMastraOptions`): Configuration object for processors and memory.
36
36