@mastra/mcp-docs-server 1.3.15 → 1.3.16-alpha.0
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/overview.md +1 -1
- package/.docs/docs/agents/processors.md +5 -5
- package/.docs/docs/agents/resumable-streams.md +2 -2
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/connections/mcp.md +3 -1
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/evals/multi-turn.md +2 -2
- package/.docs/docs/guides/build-an-eval-loop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/harness/durable-agents.md +1 -0
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mastra-platform/alerts.md +225 -122
- package/.docs/docs/mastra-platform/api.md +3 -3
- package/.docs/docs/mastra-platform/connect.md +1 -1
- package/.docs/docs/mastra-platform/gateway/api/audio.md +50 -0
- package/.docs/docs/mastra-platform/gateway/api/chat-completions.md +91 -0
- package/.docs/docs/mastra-platform/gateway/api/decisions.md +54 -0
- package/.docs/docs/mastra-platform/gateway/api/embeddings.md +35 -0
- package/.docs/docs/mastra-platform/gateway/api/images.md +52 -0
- package/.docs/docs/mastra-platform/gateway/api/messages.md +50 -0
- package/.docs/docs/mastra-platform/gateway/api/models.md +25 -0
- package/.docs/docs/mastra-platform/gateway/api/rerank.md +33 -0
- package/.docs/docs/mastra-platform/gateway/api/responses.md +48 -0
- package/.docs/docs/mastra-platform/gateway/api/videos.md +86 -0
- package/.docs/docs/mastra-platform/gateway/integrations.md +151 -0
- package/.docs/docs/mastra-platform/gateway/keys-and-byok.md +76 -0
- package/.docs/docs/mastra-platform/gateway/migrate.md +60 -0
- package/.docs/docs/mastra-platform/gateway/models-and-routing.md +40 -0
- package/.docs/docs/mastra-platform/gateway/overview.md +182 -0
- package/.docs/docs/mastra-platform/gateway/quickstart.md +103 -0
- package/.docs/docs/mastra-platform/gateway/usage-and-limits.md +76 -0
- package/.docs/docs/mastra-platform/gateway/web-search.md +46 -0
- package/.docs/docs/memory/observational-memory.md +1 -1
- package/.docs/docs/memory/semantic-recall.md +6 -0
- package/.docs/docs/sandbox/overview.md +5 -5
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/file-storage/amazon-s3.md +1 -1
- package/.docs/integrations/file-storage/archil.md +1 -1
- package/.docs/integrations/file-storage/azure-blob.md +1 -1
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/file-storage/mesa.md +1 -1
- package/.docs/integrations/file-storage/neon.md +1 -1
- package/.docs/integrations/file-storage/vercel-files.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +1 -1
- package/.docs/integrations/sandboxes/blaxel.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +1 -1
- package/.docs/integrations/sandboxes/docker.md +1 -1
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +1 -1
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +1 -1
- package/.docs/integrations/sandboxes/vercel.md +2 -2
- package/.docs/integrations/tools/brightdata.md +1 -1
- package/.docs/integrations/tools/parallel.md +1 -1
- package/.docs/integrations/tools/perplexity.md +1 -1
- package/.docs/integrations/tools/sanity-context.md +226 -0
- package/.docs/integrations/tools/tavily.md +1 -1
- package/.docs/integrations/vectors/mongodb.md +221 -17
- package/.docs/integrations.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +1 -1
- package/.docs/models/gateways/mastra.md +13 -41
- package/.docs/models/gateways/merge-gateway.md +2 -1
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/gateways/requesty.md +8 -1
- package/.docs/models/gateways/vercel.md +3 -1
- package/.docs/models/index.md +4 -4
- package/.docs/models/providers/aimlapi.md +3 -3
- package/.docs/models/providers/ambient.md +1 -1
- package/.docs/models/providers/chutes.md +2 -2
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/cortecs.md +19 -15
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/digitalocean.md +3 -1
- package/.docs/models/providers/edenai.md +9 -3
- package/.docs/models/providers/google.md +2 -1
- package/.docs/models/providers/hostinger-router.md +1 -1
- package/.docs/models/providers/huggingface.md +7 -1
- package/.docs/models/providers/inceptron.md +8 -8
- package/.docs/models/providers/kenari.md +2 -2
- package/.docs/models/providers/kilo.md +85 -82
- package/.docs/models/providers/llmgateway-providers.md +9 -5
- package/.docs/models/providers/llmgateway.md +5 -4
- package/.docs/models/providers/nano-gpt.md +21 -39
- package/.docs/models/providers/nearai.md +1 -2
- package/.docs/models/providers/novita-ai.md +5 -2
- package/.docs/models/providers/obscurify.md +1 -1
- package/.docs/models/providers/ofox.md +4 -1
- package/.docs/models/providers/opencode-go.md +0 -1
- package/.docs/models/providers/opencode.md +3 -5
- package/.docs/models/providers/prime.md +4 -1
- package/.docs/models/providers/vivgrid.md +5 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +1 -1
- package/.docs/reference/agent-controller/session.md +7 -5
- package/.docs/reference/agents/agent.md +2 -2
- package/.docs/reference/agents/durable-agent.md +18 -0
- package/.docs/reference/client-js/agent-controller.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +1 -1
- package/.docs/reference/coding-agent/create-coding-agent.md +7 -7
- package/.docs/reference/core/mastra-model-gateway.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +1 -1
- package/.docs/reference/evals/multi-turn-judge.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/tool-call-accuracy.md +1 -1
- package/.docs/reference/memory/observational-memory.md +2 -2
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/processors/prefill-error-handler.md +2 -2
- package/.docs/reference/processors/processor-interface.md +1 -1
- package/.docs/reference/processors/provider-history-compat.md +1 -1
- package/.docs/reference/processors/response-cache.md +1 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +3 -3
- package/.docs/reference/rag/retrieval.md +29 -1
- package/.docs/reference/workspace/platform-filesystem.md +1 -1
- package/.docs/reference/workspace/platform-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +5 -5
- package/package.json +5 -5
|
@@ -22,7 +22,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
|
|
|
22
22
|
const agent = createCodingAgent({
|
|
23
23
|
id: 'my-coding-agent',
|
|
24
24
|
name: 'My Coding Agent',
|
|
25
|
-
model: 'openai/gpt-5.6',
|
|
25
|
+
model: 'openai/gpt-5.6-sol',
|
|
26
26
|
instructions: 'You are a helpful coding assistant.',
|
|
27
27
|
})
|
|
28
28
|
|
|
@@ -108,7 +108,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
|
|
|
108
108
|
const agent = createCodingAgent({
|
|
109
109
|
id: 'my-coding-agent',
|
|
110
110
|
name: 'My Coding Agent',
|
|
111
|
-
model: 'openai/gpt-5.6',
|
|
111
|
+
model: 'openai/gpt-5.6-sol',
|
|
112
112
|
instructions: 'You are a helpful coding assistant.',
|
|
113
113
|
basePath: '/srv/checkouts/my-app',
|
|
114
114
|
})
|
|
@@ -123,7 +123,7 @@ import { LocalFilesystem, LocalSandbox, Workspace } from '@mastra/core/workspace
|
|
|
123
123
|
const agent = createCodingAgent({
|
|
124
124
|
id: 'my-coding-agent',
|
|
125
125
|
name: 'My Coding Agent',
|
|
126
|
-
model: 'openai/gpt-5.6',
|
|
126
|
+
model: 'openai/gpt-5.6-sol',
|
|
127
127
|
instructions: 'You are a helpful coding assistant.',
|
|
128
128
|
workspace: new Workspace({
|
|
129
129
|
filesystem: new LocalFilesystem({ basePath: '/srv/checkouts/my-app' }),
|
|
@@ -140,7 +140,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
|
|
|
140
140
|
const agent = createCodingAgent({
|
|
141
141
|
id: 'my-coding-agent',
|
|
142
142
|
name: 'My Coding Agent',
|
|
143
|
-
model: 'openai/gpt-5.6',
|
|
143
|
+
model: 'openai/gpt-5.6-sol',
|
|
144
144
|
instructions: 'You are a helpful coding assistant.',
|
|
145
145
|
workspace: undefined, // opt out of the default workspace
|
|
146
146
|
})
|
|
@@ -157,7 +157,7 @@ import { Memory } from '@mastra/memory'
|
|
|
157
157
|
const agent = createCodingAgent({
|
|
158
158
|
id: 'my-coding-agent',
|
|
159
159
|
name: 'My Coding Agent',
|
|
160
|
-
model: 'openai/gpt-5.6',
|
|
160
|
+
model: 'openai/gpt-5.6-sol',
|
|
161
161
|
instructions: 'Plan multi-step work with the task tools, then carry it out.',
|
|
162
162
|
memory: new Memory(),
|
|
163
163
|
})
|
|
@@ -175,7 +175,7 @@ import { Memory } from '@mastra/memory'
|
|
|
175
175
|
const agent = createCodingAgent({
|
|
176
176
|
id: 'my-coding-agent',
|
|
177
177
|
name: 'My Coding Agent',
|
|
178
|
-
model: 'openai/gpt-5.6',
|
|
178
|
+
model: 'openai/gpt-5.6-sol',
|
|
179
179
|
instructions: 'You are a helpful coding assistant.',
|
|
180
180
|
memory: new Memory(),
|
|
181
181
|
signals: [
|
|
@@ -213,7 +213,7 @@ import { Memory } from '@mastra/memory'
|
|
|
213
213
|
const agent = createCodingAgent({
|
|
214
214
|
id: 'my-coding-agent',
|
|
215
215
|
name: 'My Coding Agent',
|
|
216
|
-
model: 'openai/gpt-5.6',
|
|
216
|
+
model: 'openai/gpt-5.6-sol',
|
|
217
217
|
instructions: 'You are a helpful coding assistant.',
|
|
218
218
|
memory: new Memory(),
|
|
219
219
|
goal: {
|
|
@@ -52,7 +52,7 @@ class MyCustomGateway extends MastraModelGateway {
|
|
|
52
52
|
return {
|
|
53
53
|
'my-provider': {
|
|
54
54
|
name: 'My Provider',
|
|
55
|
-
models: ['openai/gpt-6.1-sol', 'anthropic/claude-sonnet-5
|
|
55
|
+
models: ['openai/gpt-6.1-sol', 'anthropic/claude-sonnet-5.5'],
|
|
56
56
|
apiKeyEnvVar: 'MY_API_KEY',
|
|
57
57
|
gateway: this.id,
|
|
58
58
|
},
|
|
@@ -63,7 +63,7 @@ Use `agentModel` to run the same agent against a different model. The registered
|
|
|
63
63
|
const summary = await dataset.startExperiment({
|
|
64
64
|
targetType: 'agent',
|
|
65
65
|
targetId: 'my-agent',
|
|
66
|
-
agentModel: 'anthropic/claude-haiku-5
|
|
66
|
+
agentModel: 'anthropic/claude-haiku-5.5',
|
|
67
67
|
scorers: ['accuracy'],
|
|
68
68
|
})
|
|
69
69
|
```
|
|
@@ -49,7 +49,7 @@ const result = await runEvals({
|
|
|
49
49
|
scorers: [
|
|
50
50
|
{
|
|
51
51
|
scorer: createMultiTurnJudgeScorer({
|
|
52
|
-
model: 'anthropic/claude-haiku-5
|
|
52
|
+
model: 'anthropic/claude-haiku-5.5',
|
|
53
53
|
criterion:
|
|
54
54
|
'The agent provided weather forecasts for London, Paris, and Tokyo, and gave weather-appropriate packing or clothing advice.',
|
|
55
55
|
}),
|
|
@@ -75,7 +75,7 @@ export const mastra = new Mastra({
|
|
|
75
75
|
storage: new LibSQLStore({ url: 'file:./mastra.db' }),
|
|
76
76
|
scorers: {
|
|
77
77
|
'multi-turn-judge-scorer': createMultiTurnJudgeScorer({
|
|
78
|
-
model: 'anthropic/claude-haiku-5
|
|
78
|
+
model: 'anthropic/claude-haiku-5.5',
|
|
79
79
|
criterion: 'placeholder',
|
|
80
80
|
}),
|
|
81
81
|
},
|
|
@@ -559,7 +559,7 @@ async function compareModelRobustness() {
|
|
|
559
559
|
const models = [
|
|
560
560
|
{ name: 'GPT-5.4', model: 'openai/gpt-6.1-sol' },
|
|
561
561
|
{ name: 'GPT-6 Luna', model: 'openai/gpt-6-luna' },
|
|
562
|
-
{ name: 'Claude', model: 'anthropic/claude-opus-5
|
|
562
|
+
{ name: 'Claude', model: 'anthropic/claude-opus-5.5' },
|
|
563
563
|
]
|
|
564
564
|
|
|
565
565
|
const testScenario = {
|
|
@@ -325,7 +325,7 @@ const basicLLMScorer = createLLMScorer({
|
|
|
325
325
|
|
|
326
326
|
// With different model
|
|
327
327
|
const customModelScorer = createLLMScorer({
|
|
328
|
-
model: 'openai/gpt-5.6', // More powerful model for complex evaluations
|
|
328
|
+
model: 'openai/gpt-5.6-sol', // More powerful model for complex evaluations
|
|
329
329
|
availableTools: [...]
|
|
330
330
|
});
|
|
331
331
|
```
|
|
@@ -1010,13 +1010,13 @@ Group IDs in search results include the record that holds them (`groupId@recordI
|
|
|
1010
1010
|
|
|
1011
1011
|
### Parameters
|
|
1012
1012
|
|
|
1013
|
-
**mode** (`'messages' | 'threads' | 'search' | 'observations'`): What to retrieve. "messages" (default) pages through message history. "threads" lists threads for the current user. "search"
|
|
1013
|
+
**mode** (`'messages' | 'threads' | 'search' | 'observations'`): What to retrieve. "messages" (default) pages through message history. "threads" lists threads for the current user. "search" searches observation groups by semantic similarity and returns the matching observations with the ranges of the messages they came from (requires a vector store, plus an embedder unless the store generates embeddings itself). "observations" pages original observation groups around a search hit. (Default: `'messages'`)
|
|
1014
1014
|
|
|
1015
1015
|
**groupId** (`string`): Required for observations mode. Copy the observation group ID exactly from a search result or continuation call. IDs shown as groupId\@recordId let paging read the record directly; a plain group ID also works.
|
|
1016
1016
|
|
|
1017
1017
|
**direction** (`'before' | 'after'`): For observations mode: return groups strictly before or after the anchor group. Omit to include the anchor and following groups.
|
|
1018
1018
|
|
|
1019
|
-
**query** (`string`): Search query for mode: "search". Finds
|
|
1019
|
+
**query** (`string`): Search query for mode: "search". Finds observation groups semantically similar to this text in the threads the tool can reach: every thread of the resource, or only the current thread with retrieval: { scope: 'thread' }.
|
|
1020
1020
|
|
|
1021
1021
|
**cursor** (`string`): A message ID to anchor the recall query. Extract the start or end ID from an observation group range (e.g. from \_range: \startId:endId\\\_, use either startId or endId). If a range string is passed directly, the tool returns a hint explaining how to extract the correct ID. When both cursor and threadId are omitted for mode: "messages", the tool browses the current thread from the position set by anchor.
|
|
1022
1022
|
|
|
@@ -41,7 +41,7 @@ const { messages } = await memory.recall({
|
|
|
41
41
|
|
|
42
42
|
**threadConfig.lastMessages** (`number | false`): Number of most recent messages to retrieve. Set to false to disable. When perPage is not explicitly provided, this value is used as the default.
|
|
43
43
|
|
|
44
|
-
**threadConfig.semanticRecall** (`boolean | { topK: number; messageRange: number | { before: number; after: number }; scope?: 'thread' | 'resource' }`): Enable semantic search in message history. Can be a boolean or an object with configuration options. When enabled, requires
|
|
44
|
+
**threadConfig.semanticRecall** (`boolean | { topK: number; messageRange: number | { before: number; after: number }; scope?: 'thread' | 'resource' }`): Enable semantic search in message history. Can be a boolean or an object with configuration options. When enabled, requires a vector store, and an embedder unless the vector store embeds text itself, such as MongoDB with Automated Embedding.
|
|
45
45
|
|
|
46
46
|
**threadConfig.workingMemory** (`WorkingMemory`): Configuration for working memory feature. Can be { enabled: boolean; template?: string; schema?: ZodObject\<any> | JSONSchema7; scope?: 'thread' | 'resource' } or { enabled: boolean } to disable.
|
|
47
47
|
|
|
@@ -31,7 +31,7 @@ export const agent = new Agent({
|
|
|
31
31
|
id: 'my-agent',
|
|
32
32
|
name: 'my-agent',
|
|
33
33
|
instructions: 'You are a helpful assistant.',
|
|
34
|
-
model: 'anthropic/claude-opus-5
|
|
34
|
+
model: 'anthropic/claude-opus-5.5',
|
|
35
35
|
errorProcessors: [new PrefillErrorHandler()],
|
|
36
36
|
})
|
|
37
37
|
```
|
|
@@ -53,7 +53,7 @@ export const agent = new Agent({
|
|
|
53
53
|
id: 'my-agent',
|
|
54
54
|
name: 'my-agent',
|
|
55
55
|
instructions: 'You are a helpful assistant.',
|
|
56
|
-
model: 'anthropic/claude-opus-5
|
|
56
|
+
model: 'anthropic/claude-opus-5.5',
|
|
57
57
|
errorProcessors: [customErrorHandler],
|
|
58
58
|
})
|
|
59
59
|
```
|
|
@@ -1199,7 +1199,7 @@ import { PrefillErrorHandler } from '@mastra/core/processors'
|
|
|
1199
1199
|
const agent = new Agent({
|
|
1200
1200
|
id: 'support-agent',
|
|
1201
1201
|
name: 'support-agent',
|
|
1202
|
-
model: 'openai/gpt-5.6',
|
|
1202
|
+
model: 'openai/gpt-5.6-sol',
|
|
1203
1203
|
instructions: '...',
|
|
1204
1204
|
inputProcessors: [new ContentFilter(['secret'])],
|
|
1205
1205
|
outputProcessors: [new WordCounter()],
|
|
@@ -61,7 +61,7 @@ Registering in `errorProcessors` alone, as the example above does, covers both h
|
|
|
61
61
|
| `cerebras-strip-reasoning-content` | Cerebras | Preemptive prompt rewrite | Removes assistant `reasoning` parts from the outbound prompt so they're not serialized as unsupported `reasoning_content` fields. |
|
|
62
62
|
| `anthropic-strip-empty-signed-reasoning-content` | Anthropic | Reactive (matches Anthropic's 400 rejecting modified thinking blocks) | Removes assistant `reasoning` parts that carry an Anthropic signature but have empty text, which legacy records can contain, from earlier messages. Runs only after Anthropic rejects the history, because Claude 5.x returns empty-text signed blocks as normal output and they must be replayed unchanged to keep prompt caching. |
|
|
63
63
|
| `anthropic-strip-foreign-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes non-Anthropic assistant `reasoning` parts from the outbound prompt. Anthropic-native thinking history is preserved. |
|
|
64
|
-
| `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-5
|
|
64
|
+
| `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-5.5`), since the receiving provider can't verify another provider's signature. Turns emptied of all content by the drop are removed from the prompt. Unstamped history is left untouched. |
|
|
65
65
|
| `azure-system-reminder-transform` | Azure OpenAI | Preemptive prompt rewrite | Renames `<system-reminder>` wrappers in user text and system instructions to `<memory-context>` for the outbound request. Stored history remains unchanged. |
|
|
66
66
|
| `openai-orphan-item-id` | OpenAI, Azure OpenAI (Responses) | Reactive API error recovery | Recovers history that OpenAI rejects with `Item 'msg_…' of type 'message' was provided without its required 'reasoning' item`. Drops the Responses `itemId` from every item-bearing part of an assistant message that carries one but has no `reasoning` part, and retries. The message then replays by value instead of as an unsatisfiable `item_reference`. The repair is applied to the in-memory list for the current turn. |
|
|
67
67
|
| `anthropic-orphaned-thinking-step` | Anthropic | Reactive API error recovery | Recovers history that Anthropic rejects because `thinking` or `redacted_thinking` blocks in the latest assistant message can't be modified. Removes steps that contain only reasoning when more assistant content follows them, and retries. Covers history saved by older `@mastra/memory` releases ([#22798](https://github.com/mastra-ai/mastra/issues/22798)). |
|
|
@@ -20,7 +20,7 @@ export const agent = new Agent({
|
|
|
20
20
|
id: 'openai-agent',
|
|
21
21
|
name: 'openai-agent',
|
|
22
22
|
instructions: 'You are a helpful assistant.',
|
|
23
|
-
model: 'openai/gpt-5.6',
|
|
23
|
+
model: 'openai/gpt-5.6-sol',
|
|
24
24
|
errorProcessors: [new StreamErrorRetryProcessor({ maxRetries: 5 })],
|
|
25
25
|
maxProcessorRetries: 5,
|
|
26
26
|
})
|
|
@@ -70,7 +70,7 @@ export const agent = new Agent({
|
|
|
70
70
|
id: 'resilient-agent',
|
|
71
71
|
name: 'Resilient agent',
|
|
72
72
|
instructions: 'You are a helpful assistant.',
|
|
73
|
-
model: 'openai/gpt-5.6',
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
74
74
|
errorProcessors: [
|
|
75
75
|
new StreamErrorRetryProcessor({
|
|
76
76
|
retryUnknownErrors: true,
|
|
@@ -103,7 +103,7 @@ export const agent = new Agent({
|
|
|
103
103
|
id: 'resilient-agent',
|
|
104
104
|
name: 'resilient-agent',
|
|
105
105
|
instructions: 'You are a helpful assistant.',
|
|
106
|
-
model: 'openai/gpt-5.6',
|
|
106
|
+
model: 'openai/gpt-5.6-sol',
|
|
107
107
|
errorProcessors: [
|
|
108
108
|
new StreamErrorRetryProcessor({
|
|
109
109
|
maxRetries: 2,
|
|
@@ -665,7 +665,35 @@ const relevanceProvider = new CohereRelevanceScorer('rerank-v3.5')
|
|
|
665
665
|
const relevanceProvider = new ZeroEntropyRelevanceScorer('zerank-1')
|
|
666
666
|
```
|
|
667
667
|
|
|
668
|
-
Voyage AI provides dedicated reranking models
|
|
668
|
+
Voyage AI provides dedicated reranking models. `rerank-2.5` is the default. `rerank-3` and `rerank-3-lite` are out of Preview in the Voyage AI API. `rerank-2.5`, `rerank-2.5-lite`, `rerank-3` and `rerank-3-lite` all allow up to 8,000 tokens for the query, up to 32,000 tokens for the query and any single document combined, and up to 600,000 tokens across a request. The request total counts the query once per document: query tokens × number of documents + tokens in all documents. By default, a query or document longer than its limit is truncated. Keep each request within the 600,000-token total yourself. `VoyageRelevanceScorer` reads `VOYAGE_API_KEY` from the environment, or accepts an `apiKey` in its config.
|
|
669
|
+
|
|
670
|
+
`createVoyageReranker()` creates a `VoyageRelevanceScorer` from a model name or a config object. `voyageReranker()` is an alias for it. The `voyage` export also has preconfigured scorers, which read `VOYAGE_API_KEY` and use the default endpoint:
|
|
671
|
+
|
|
672
|
+
- `voyage.reranker` and `voyage.reranker25`: `rerank-2.5`
|
|
673
|
+
- `voyage.reranker25lite`: `rerank-2.5-lite`
|
|
674
|
+
- `voyage.reranker2`: `rerank-2`
|
|
675
|
+
- `voyage.reranker2lite`: `rerank-2-lite`
|
|
676
|
+
|
|
677
|
+
```ts
|
|
678
|
+
import { voyage, createVoyageReranker } from '@mastra/voyageai'
|
|
679
|
+
|
|
680
|
+
const liteProvider = createVoyageReranker('rerank-2.5-lite')
|
|
681
|
+
const defaultProvider = voyage.reranker
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
The scorer sends requests to the Voyage AI platform endpoint, `https://api.voyageai.com/v1`, by default. A model API key created in MongoDB Atlas only works with the Atlas Embedding and Reranking API, so set `baseUrl` to `https://ai.mongodb.com/v1` when you use one. A key scoped to a geography needs that geography's endpoint, such as `https://eu.ai.mongodb.com/v1`. Geography endpoints don't serve every model: of the Atlas endpoints, only `https://ai.mongodb.com/v1` serves `rerank-2` and `rerank-2-lite`, so use `rerank-2.5` or `rerank-2.5-lite` with a scoped key. See MongoDB's [model lifecycle page](https://www.mongodb.com/docs/voyageai/models/lifecycle/) for which endpoints serve each model.
|
|
685
|
+
|
|
686
|
+
```ts
|
|
687
|
+
import { createVoyageReranker } from '@mastra/voyageai'
|
|
688
|
+
|
|
689
|
+
const relevanceProvider = createVoyageReranker({
|
|
690
|
+
model: 'rerank-2.5',
|
|
691
|
+
apiKey: process.env.VOYAGE_API_KEY,
|
|
692
|
+
baseUrl: 'https://ai.mongodb.com/v1',
|
|
693
|
+
})
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
Use `createVoyageReranker()` or `VoyageRelevanceScorer` to set `apiKey`, `baseUrl`, or `truncation`. `truncation` defaults to `true`, which shortens inputs that exceed the model's context length instead of failing the request.
|
|
669
697
|
|
|
670
698
|
The re-ranked results combine vector similarity with semantic understanding to improve retrieval quality.
|
|
671
699
|
|
|
@@ -509,11 +509,11 @@ const workspace = new Workspace({
|
|
|
509
509
|
|
|
510
510
|
Added when a sandbox is configured:
|
|
511
511
|
|
|
512
|
-
| Tool | Description
|
|
513
|
-
| ------------------------------------- |
|
|
514
|
-
| `mastra_workspace_execute_command` | Execute a shell command. Returns stdout, stderr, and exit code. When the sandbox has a process manager, accepts `background: true` to spawn a long-running process and return a PID.
|
|
515
|
-
| `mastra_workspace_get_process_output` | Get stdout, stderr, and status of a background process by PID. Accepts `tail` to limit output lines and `
|
|
516
|
-
| `mastra_workspace_kill_process` | Kill a background process by PID. Returns the last 50 lines of output. Only available when the sandbox has a process manager.
|
|
512
|
+
| Tool | Description |
|
|
513
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
514
|
+
| `mastra_workspace_execute_command` | Execute a shell command. Returns stdout, stderr, and exit code. When the sandbox has a process manager, accepts `background: true` to spawn a long-running process and return a PID. |
|
|
515
|
+
| `mastra_workspace_get_process_output` | Get stdout, stderr, and status of a background process by PID. Accepts `tail` to limit output lines and `waitSeconds` (1 to 300) to wait for the exit. When the wait runs out first, returns the output so far and says the process is still running. Only available when the sandbox has a process manager. |
|
|
516
|
+
| `mastra_workspace_kill_process` | Kill a background process by PID. Returns the last 50 lines of output. Only available when the sandbox has a process manager. |
|
|
517
517
|
|
|
518
518
|
With a static sandbox, capability checks (`executeCommand`, `processes`) decide which tool variants are exposed. With a [runtime-defined sandbox](https://mastra.ai/docs/sandbox/overview), all sandbox tools are registered and the runtime throws a clear error if the resolved sandbox doesn't implement a requested capability.
|
|
519
519
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
|
|
27
27
|
"local-pkg": "^1.2.1",
|
|
28
28
|
"zod": "^4.6.7",
|
|
29
|
-
"@mastra/core": "1.85.0",
|
|
30
|
-
"@mastra/mcp": "^2.10.0"
|
|
29
|
+
"@mastra/core": "1.85.1-alpha.0",
|
|
30
|
+
"@mastra/mcp": "^2.10.1-alpha.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hono/node-server": "^2.1.3",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"tsx": "^4.23.15",
|
|
43
43
|
"typescript": "^7.0.2",
|
|
44
44
|
"vitest": "5.1.0",
|
|
45
|
-
"@internal/
|
|
46
|
-
"@internal/
|
|
45
|
+
"@internal/types-builder": "0.0.126",
|
|
46
|
+
"@internal/lint": "0.0.151"
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://mastra.ai",
|
|
49
49
|
"repository": {
|