@mastra/mcp-docs-server 1.2.7-alpha.21 → 1.2.7-alpha.23
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.
- package/.docs/docs/agents/processors.md +9 -3
- package/.docs/models/gateways/openrouter.md +3 -5
- package/.docs/models/gateways/vercel.md +1 -10
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/ambient.md +2 -1
- package/.docs/models/providers/baseten.md +1 -1
- package/.docs/models/providers/crossmodel.md +4 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/reference/agents/generateLegacy.md +8 -2
- package/.docs/reference/code-sdk/mount-agent-controller.md +2 -0
- package/.docs/reference/evals/create-scorer.md +57 -2
- package/.docs/reference/processors/stream-error-retry-processor.md +14 -2
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -850,10 +850,16 @@ const agent = new Agent({
|
|
|
850
850
|
|
|
851
851
|
The retry mechanism:
|
|
852
852
|
|
|
853
|
-
-
|
|
853
|
+
- Works in `processOutputStep()` and `processInputStep()` methods
|
|
854
854
|
- Replays the step with the abort reason added as context for the LLM
|
|
855
855
|
- Tracks retry count via the `retryCount` parameter
|
|
856
|
-
-
|
|
856
|
+
- Requires an explicit `maxProcessorRetries` limit on the agent or call
|
|
857
|
+
|
|
858
|
+
### Error processor retry limits
|
|
859
|
+
|
|
860
|
+
`processAPIError()` has a separate default: when `errorProcessors` are configured and `maxProcessorRetries` is omitted, the runtime allows up to `10` retries. Set the limit explicitly when you need a bounded retry budget.
|
|
861
|
+
|
|
862
|
+
For `StreamErrorRetryProcessor`, also set its `maxRetries` to the same value. Its own default is `1`, which can otherwise be lower than the agent cap. Keep model retries at `0` when the processor is the only retry mechanism for a request.
|
|
857
863
|
|
|
858
864
|
### Violation callbacks
|
|
859
865
|
|
|
@@ -908,7 +914,7 @@ For `agent.generate()`, the result exposes the same information as `result.tripw
|
|
|
908
914
|
|
|
909
915
|
`abort` accepts a second options argument:
|
|
910
916
|
|
|
911
|
-
- `retry: true` asks the agent to retry instead of ending.
|
|
917
|
+
- `retry: true` asks the agent to retry instead of ending. Input and output processor retries require `maxProcessorRetries` to be set on the agent or call.
|
|
912
918
|
- `metadata` attaches structured data to the `tripwire` chunk so downstream consumers can branch on categories like `pii`, `quality`, or `moderation`.
|
|
913
919
|
|
|
914
920
|
## API error handling
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenRouter
|
|
4
4
|
|
|
5
|
-
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 342 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
8
8
|
|
|
@@ -138,9 +138,9 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
138
138
|
| `inclusionai/ring-2.6-1t` |
|
|
139
139
|
| `inflection/inflection-3-pi` |
|
|
140
140
|
| `inflection/inflection-3-productivity` |
|
|
141
|
+
| `kwaipilot/kat-coder-air-v2.5` |
|
|
141
142
|
| `kwaipilot/kat-coder-pro-v2` |
|
|
142
|
-
| `
|
|
143
|
-
| `liquid/lfm-2.5-1.2b-thinking:free` |
|
|
143
|
+
| `kwaipilot/kat-coder-pro-v2.5` |
|
|
144
144
|
| `mancer/weaver` |
|
|
145
145
|
| `meta-llama/llama-3.1-70b-instruct` |
|
|
146
146
|
| `meta-llama/llama-3.1-8b-instruct` |
|
|
@@ -261,7 +261,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
261
261
|
| `openai/gpt-audio-mini` |
|
|
262
262
|
| `openai/gpt-chat-latest` |
|
|
263
263
|
| `openai/gpt-oss-120b` |
|
|
264
|
-
| `openai/gpt-oss-120b:free` |
|
|
265
264
|
| `openai/gpt-oss-20b` |
|
|
266
265
|
| `openai/gpt-oss-20b:free` |
|
|
267
266
|
| `openai/gpt-oss-safeguard-20b` |
|
|
@@ -345,7 +344,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
345
344
|
| `relace/relace-search` |
|
|
346
345
|
| `sakana/fugu-ultra` |
|
|
347
346
|
| `sao10k/l3-lunaris-8b` |
|
|
348
|
-
| `sao10k/l3.1-70b-hanami-x1` |
|
|
349
347
|
| `sao10k/l3.1-euryale-70b` |
|
|
350
348
|
| `sao10k/l3.3-euryale-70b` |
|
|
351
349
|
| `stepfun/step-3.5-flash` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Vercel
|
|
4
4
|
|
|
5
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 300 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
8
8
|
|
|
@@ -77,7 +77,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
77
77
|
| `amazon/nova-pro` |
|
|
78
78
|
| `amazon/titan-embed-text-v2` |
|
|
79
79
|
| `anthropic/claude-3-haiku` |
|
|
80
|
-
| `anthropic/claude-3.5-haiku` |
|
|
81
80
|
| `anthropic/claude-fable-5` |
|
|
82
81
|
| `anthropic/claude-haiku-4.5` |
|
|
83
82
|
| `anthropic/claude-opus-4` |
|
|
@@ -89,7 +88,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
89
88
|
| `anthropic/claude-sonnet-4.5` |
|
|
90
89
|
| `anthropic/claude-sonnet-4.6` |
|
|
91
90
|
| `anthropic/claude-sonnet-5` |
|
|
92
|
-
| `arcee-ai/trinity-large-preview` |
|
|
93
91
|
| `arcee-ai/trinity-large-thinking` |
|
|
94
92
|
| `arcee-ai/trinity-mini` |
|
|
95
93
|
| `bfl/flux-2-flex` |
|
|
@@ -169,8 +167,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
169
167
|
| `kwaipilot/kat-coder-pro-v1` |
|
|
170
168
|
| `kwaipilot/kat-coder-pro-v2` |
|
|
171
169
|
| `kwaipilot/kat-coder-pro-v2.5` |
|
|
172
|
-
| `meituan/longcat-flash-chat` |
|
|
173
|
-
| `meituan/longcat-flash-thinking-2601` |
|
|
174
170
|
| `meta/llama-3.1-70b` |
|
|
175
171
|
| `meta/llama-3.1-8b` |
|
|
176
172
|
| `meta/llama-3.2-11b` |
|
|
@@ -192,7 +188,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
192
188
|
| `mistral/codestral` |
|
|
193
189
|
| `mistral/codestral-embed` |
|
|
194
190
|
| `mistral/devstral-2` |
|
|
195
|
-
| `mistral/devstral-small` |
|
|
196
191
|
| `mistral/devstral-small-2` |
|
|
197
192
|
| `mistral/magistral-medium` |
|
|
198
193
|
| `mistral/magistral-small` |
|
|
@@ -206,7 +201,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
206
201
|
| `mistral/mistral-nemo` |
|
|
207
202
|
| `mistral/mistral-small` |
|
|
208
203
|
| `mistral/pixtral-12b` |
|
|
209
|
-
| `mistral/pixtral-large` |
|
|
210
204
|
| `moonshotai/kimi-k2` |
|
|
211
205
|
| `moonshotai/kimi-k2-thinking` |
|
|
212
206
|
| `moonshotai/kimi-k2.5` |
|
|
@@ -221,7 +215,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
221
215
|
| `nvidia/nemotron-nano-12b-v2-vl` |
|
|
222
216
|
| `nvidia/nemotron-nano-9b-v2` |
|
|
223
217
|
| `openai/gpt-3.5-turbo` |
|
|
224
|
-
| `openai/gpt-3.5-turbo-instruct` |
|
|
225
218
|
| `openai/gpt-4-turbo` |
|
|
226
219
|
| `openai/gpt-4.1` |
|
|
227
220
|
| `openai/gpt-4.1-mini` |
|
|
@@ -326,8 +319,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
326
319
|
| `xai/grok-stt` |
|
|
327
320
|
| `xai/grok-tts` |
|
|
328
321
|
| `xai/grok-voice-think-fast-1.0` |
|
|
329
|
-
| `xiaomi/mimo-v2-flash` |
|
|
330
|
-
| `xiaomi/mimo-v2-pro` |
|
|
331
322
|
| `xiaomi/mimo-v2.5` |
|
|
332
323
|
| `xiaomi/mimo-v2.5-pro` |
|
|
333
324
|
| `zai/glm-4.5` |
|
package/.docs/models/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Model Providers
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
5
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4867 models from 155 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Ambient
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 7 Ambient models through Mastra's model router. Authentication is handled automatically using the `AMBIENT_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Ambient documentation](https://ambient.xyz).
|
|
8
8
|
|
|
@@ -39,6 +39,7 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `ambient/ambient/large` | 101K | | | | | | $1 | $4 |
|
|
40
40
|
| `ambient/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
41
41
|
| `ambient/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.72 | $3 |
|
|
42
|
+
| `ambient/stepfun/step-3.7-flash` | 262K | | | | | | $0.20 | $1 |
|
|
42
43
|
| `ambient/z-ai/glm-5.2` | 101K | | | | | | $1 | $4 |
|
|
43
44
|
| `ambient/zai-org/GLM-5.1-FP8` | 203K | | | | | | $1 | $4 |
|
|
44
45
|
| `ambient/zai-org/GLM-5.2-FP8` | 203K | | | | | | $1 | $4 |
|
|
@@ -46,7 +46,7 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `baseten/zai-org/GLM-4.7` | 200K | | | | | | $0.60 | $2 |
|
|
47
47
|
| `baseten/zai-org/GLM-5` | 203K | | | | | | $0.95 | $3 |
|
|
48
48
|
| `baseten/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
|
|
49
|
-
| `baseten/zai-org/GLM-5.2` |
|
|
49
|
+
| `baseten/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
50
50
|
|
|
51
51
|
## Advanced configuration
|
|
52
52
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# CrossModel
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 43 CrossModel models through Mastra's model router. Authentication is handled automatically using the `CROSSMODEL_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [CrossModel documentation](https://www.crossmodel.ai/docs).
|
|
8
8
|
|
|
@@ -69,6 +69,9 @@ for await (const chunk of stream) {
|
|
|
69
69
|
| `crossmodel/qwen/qwen3.7-max` | 1.0M | | | | | | $2 | $6 |
|
|
70
70
|
| `crossmodel/qwen/qwen3.7-plus` | 1.0M | | | | | | $0.32 | $1 |
|
|
71
71
|
| `crossmodel/tencent/hy3-preview` | 262K | | | | | | $0.19 | $0.63 |
|
|
72
|
+
| `crossmodel/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
73
|
+
| `crossmodel/x-ai/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
74
|
+
| `crossmodel/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
72
75
|
| `crossmodel/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.16 | $0.32 |
|
|
73
76
|
| `crossmodel/xiaomi/mimo-v2.5-pro` | 1.0M | | | | | | $0.47 | $0.94 |
|
|
74
77
|
| `crossmodel/z-ai/glm-4.7` | 200K | | | | | | $0.47 | $2 |
|
|
@@ -52,7 +52,7 @@ const agent = new Agent({
|
|
|
52
52
|
id: "custom-agent",
|
|
53
53
|
name: "custom-agent",
|
|
54
54
|
model: {
|
|
55
|
-
url: "https://model.inferx.net/v1",
|
|
55
|
+
url: "https://model.inferx.net/endpoints/v1",
|
|
56
56
|
id: "inferx/google/gemma-4-31b-it-fp8",
|
|
57
57
|
apiKey: process.env.INFERX_API_KEY,
|
|
58
58
|
headers: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent.generateLegacy() (Legacy)
|
|
4
4
|
|
|
5
|
-
> **Warning:** **Deprecated**: This method is deprecated and only works with
|
|
5
|
+
> **Warning:** **Deprecated**: This method is deprecated and only works with legacy model adapters. For current model adapters, use [`.generate()`](https://mastra.ai/reference/agents/generate) instead.
|
|
6
6
|
|
|
7
|
-
The `.generateLegacy()` method is the legacy version of the agent generation API, used
|
|
7
|
+
The `.generateLegacy()` method is the legacy version of the agent generation API, used with legacy model adapters to produce text or structured responses. This method accepts messages and optional generation options.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -12,6 +12,12 @@ The `.generateLegacy()` method is the legacy version of the agent generation API
|
|
|
12
12
|
await agent.generateLegacy('message for agent')
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Processor retry support
|
|
16
|
+
|
|
17
|
+
`generateLegacy()` doesn't run error processors or `maxProcessorRetries`. It uses the legacy AI SDK generation path instead.
|
|
18
|
+
|
|
19
|
+
Scorer judges with legacy model adapters call `generateLegacy()`. They don't receive the coordinated `StreamErrorRetryProcessor` budget available to scorer judges that use Mastra’s current generation API. Use a current model adapter when you need error-processor retries. The legacy `maxRetries` option remains separate and defaults to `2`.
|
|
20
|
+
|
|
15
21
|
## Parameters
|
|
16
22
|
|
|
17
23
|
**messages** (`string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[]`): The messages to send to the agent. Can be a single string, array of strings, or structured message objects with multimodal content (text, images, etc.).
|
|
@@ -48,6 +48,8 @@ const { controller } = await mountAgentControllerOnMastra({ mastra })
|
|
|
48
48
|
|
|
49
49
|
**extraTools** (`Record<string, ToolAction> | (ctx) => Record<string, ToolAction>`): Extra tools merged into the dynamic tool set.
|
|
50
50
|
|
|
51
|
+
**postToolObserver** (`(context: ToolAfterHookContext) => void | Promise<void>`): Observes completed tool calls without replacing the tool or changing hook-manager behavior. Observer errors are logged and do not fail successful tool calls.
|
|
52
|
+
|
|
51
53
|
**disabledTools** (`string[]`): Tools removed from the dynamic tool set before exposure to the model.
|
|
52
54
|
|
|
53
55
|
**storage** (`StorageConfig`): Custom storage config instead of the auto-detected default.
|
|
@@ -57,9 +57,9 @@ const scorer = createScorer({
|
|
|
57
57
|
|
|
58
58
|
**judge.outputProcessors** (`Processor[]`): Output processors applied to the internal judge agent's output before it is returned (e.g. moderation, transformation).
|
|
59
59
|
|
|
60
|
-
**judge.errorProcessors** (`Processor[]`): Error processors for
|
|
60
|
+
**judge.errorProcessors** (`Processor[]`): Error processors for judge models that use Mastra’s current generation API. These implement processAPIError and can inspect LLM API rejections and signal a retry, e.g. StreamErrorRetryProcessor. Legacy model adapters use generateLegacy() and do not run error processors.
|
|
61
61
|
|
|
62
|
-
**judge.maxProcessorRetries** (`number`): Maximum number of times processors can
|
|
62
|
+
**judge.maxProcessorRetries** (`number`): Maximum number of times error processors can retry one judge generation. The runtime defaults to 10 when errorProcessors are configured without this value. Set it explicitly to bound the retry budget.
|
|
63
63
|
|
|
64
64
|
**type** (`string`): Type specification for input/output. Use 'agent' for automatic agent types. For custom types, use the generic approach instead.
|
|
65
65
|
|
|
@@ -71,6 +71,61 @@ The judge only runs for steps defined as **prompt objects** (`preprocess`, `anal
|
|
|
71
71
|
|
|
72
72
|
When a prompt-object step runs, its structured LLM output is stored in the corresponding result field (`preprocessStepResult`, `analyzeStepResult`, or the value consumed by `calculateScore` in `generateScore`).
|
|
73
73
|
|
|
74
|
+
## Retry judge requests
|
|
75
|
+
|
|
76
|
+
Use the existing judge `errorProcessors` configuration to retry transient failures inside a failed judge request. This doesn't retry the scorer workflow, trace target, batch item, score write, or a completed scorer step.
|
|
77
|
+
|
|
78
|
+
`@mastra/core` `1.49.0` doesn't include scorer error-processor configuration. Upgrade to a version with scorer processor support, or backport that focused change, before using this configuration.
|
|
79
|
+
|
|
80
|
+
The following example uses one bounded retry budget. Set the processor `maxRetries` and `judge.maxProcessorRetries` to the same value. Keep the internal judge agent's model retries at the default of `0` so model retries don't multiply processor attempts.
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { createScorer } from '@mastra/core/evals'
|
|
84
|
+
import { StreamErrorRetryProcessor } from '@mastra/core/processors'
|
|
85
|
+
|
|
86
|
+
const isTransientNetworkError = (error: unknown) =>
|
|
87
|
+
error instanceof Error && /ECONNRESET|ETIMEDOUT|socket hang up/i.test(error.message)
|
|
88
|
+
|
|
89
|
+
const retryProcessor = new StreamErrorRetryProcessor({
|
|
90
|
+
maxRetries: 2,
|
|
91
|
+
maxRetryAfterMs: 30_000,
|
|
92
|
+
delayMs: ({ retryCount }) => Math.min(1_000 * 2 ** retryCount, 30_000),
|
|
93
|
+
matchers: [isTransientNetworkError],
|
|
94
|
+
retryUnknownErrors: false,
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
export const responseQuality = createScorer({
|
|
98
|
+
id: 'response-quality',
|
|
99
|
+
description: 'Scores response quality',
|
|
100
|
+
judge: {
|
|
101
|
+
model: myModel,
|
|
102
|
+
instructions: 'Return a score and concise reason.',
|
|
103
|
+
errorProcessors: [retryProcessor],
|
|
104
|
+
maxProcessorRetries: 2,
|
|
105
|
+
},
|
|
106
|
+
})
|
|
107
|
+
.generateScore({
|
|
108
|
+
description: 'Score the response quality.',
|
|
109
|
+
createPrompt: ({ run }) => `Score: ${run.output}`,
|
|
110
|
+
})
|
|
111
|
+
.generateReason({
|
|
112
|
+
description: 'Explain the score.',
|
|
113
|
+
createPrompt: () => 'Explain the score.',
|
|
114
|
+
})
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
With this configuration, a failed request has at most three provider attempts: the initial request plus two processor retries. If `generateScore` completes and `generateReason` receives a retryable failure, only `generateReason` retries.
|
|
118
|
+
|
|
119
|
+
`StreamErrorRetryProcessor` honors retryable provider metadata and narrow custom matchers. It keeps `retryUnknownErrors` disabled by default, so authentication, invalid-request, and context-length errors fail immediately unless you explicitly match them. It bounds `Retry-After` values to `30_000` milliseconds by default; use `maxRetryAfterMs` to change that cap.
|
|
120
|
+
|
|
121
|
+
Avoid adding outer scorer or workflow retries. Avoid combining a nonzero model retry setting with this processor unless you intentionally accept additional attempts.
|
|
122
|
+
|
|
123
|
+
### Override retries for one step
|
|
124
|
+
|
|
125
|
+
A step's `judge` configuration overrides scorer-level judge fields. Processor arrays replace the scorer-level arrays. Omit `maxProcessorRetries` in the step configuration to inherit the scorer-level numeric cap.
|
|
126
|
+
|
|
127
|
+
Coordinated processor retries require a judge model that uses Mastra’s current generation API. Legacy model adapters call [`generateLegacy()`](https://mastra.ai/reference/agents/generateLegacy), bypass error processors, and use that API's separate AI SDK `maxRetries` default of `2`.
|
|
128
|
+
|
|
74
129
|
## Type safety
|
|
75
130
|
|
|
76
131
|
You can specify input/output types when creating scorers for better type inference and IntelliSense support:
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# StreamErrorRetryProcessor
|
|
4
4
|
|
|
5
|
-
`StreamErrorRetryProcessor` is an **error processor** that retries transient
|
|
5
|
+
`StreamErrorRetryProcessor` is an **error processor** that retries transient LLM API and stream failures. It includes built-in matching for OpenAI Responses stream errors and supports additional matchers for other provider-specific error shapes.
|
|
6
6
|
|
|
7
|
-
The processor isn't enabled by default in core. Add it to `errorProcessors` for agents that need
|
|
7
|
+
The processor isn't enabled by default in core. Add it to `errorProcessors` for agents that need bounded retry handling.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -35,6 +35,18 @@ When the error is retryable, the processor returns `{ retry: true }`. It doesn't
|
|
|
35
35
|
|
|
36
36
|
When `delayMs` is set, the processor waits before signaling a retry. This is useful for transient network errors like `ECONNRESET` where immediately retrying is likely to fail again. The delay can be a fixed number of milliseconds or a function evaluated with the error args (for example, to implement exponential backoff).
|
|
37
37
|
|
|
38
|
+
### Retry limits
|
|
39
|
+
|
|
40
|
+
`maxRetries` defaults to `1` and limits this processor's retry requests. The agent also limits processor retries with `maxProcessorRetries`. When error processors are configured without an agent limit, the runtime cap is `10`.
|
|
41
|
+
|
|
42
|
+
Set both values explicitly to the same bounded value when you need a single retry budget. Keep model `maxRetries` at `0` for that call to avoid multiplying provider attempts.
|
|
43
|
+
|
|
44
|
+
### `Retry-After` handling
|
|
45
|
+
|
|
46
|
+
For retryable errors with a `Retry-After` response header, the processor reads case-insensitive delta-seconds and HTTP-date values through the error cause chain. It waits for the longer of `delayMs` and the bounded server delay.
|
|
47
|
+
|
|
48
|
+
`maxRetryAfterMs` defaults to `30_000`. It caps only provider-provided wait time. A longer explicit `delayMs` remains unchanged. Invalid or expired headers are ignored.
|
|
49
|
+
|
|
38
50
|
## Retry unknown errors
|
|
39
51
|
|
|
40
52
|
Set `retryUnknownErrors` to retry errors that don't match provider metadata, the built-in OpenAI matcher, or a custom matcher. Unknown-error retries use the processor-level `maxRetries` and `delayMs` values. Known authorization failures, including HTTP `401` and `403` responses, aren't retried:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.7-alpha.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`a99eae8`](https://github.com/mastra-ai/mastra/commit/a99eae8908e500c1b2d12f9d277be616b98617a5), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`f703f87`](https://github.com/mastra-ai/mastra/commit/f703f878de072d51fda557f9c50867d8252bef05), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5)]:
|
|
8
|
+
- @mastra/core@1.51.0-alpha.13
|
|
9
|
+
|
|
10
|
+
## 1.2.7-alpha.22
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`aa38805`](https://github.com/mastra-ai/mastra/commit/aa38805b878b827403be785eb90688d7172f5a40), [`2d22570`](https://github.com/mastra-ai/mastra/commit/2d22570c7dfdd02123d0ecc529efb05ccba2d9fc), [`4378341`](https://github.com/mastra-ai/mastra/commit/43783412df5ea3dd35f5b1f6e4851e79c346fc89)]:
|
|
15
|
+
- @mastra/core@1.51.0-alpha.12
|
|
16
|
+
|
|
3
17
|
## 1.2.7-alpha.21
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.7-alpha.
|
|
3
|
+
"version": "1.2.7-alpha.23",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/core": "1.51.0-alpha.
|
|
31
|
+
"@mastra/core": "1.51.0-alpha.13",
|
|
32
32
|
"@mastra/mcp": "^1.14.0-alpha.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.11",
|
|
36
36
|
"@types/jsdom": "^21.1.7",
|
|
37
|
-
"@types/node": "22.
|
|
37
|
+
"@types/node": "22.20.1",
|
|
38
38
|
"@vitest/coverage-v8": "4.1.10",
|
|
39
39
|
"@vitest/ui": "4.1.10",
|
|
40
40
|
"@wong2/mcp-cli": "^2.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.113",
|
|
49
49
|
"@internal/types-builder": "0.0.88",
|
|
50
|
-
"@mastra/core": "1.51.0-alpha.
|
|
50
|
+
"@mastra/core": "1.51.0-alpha.13"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|