@mastra/mcp-docs-server 1.2.19-alpha.0 → 1.2.19-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.
- package/.docs/docs/deployment/mastra-server.md +19 -0
- package/.docs/docs/deployment/workers.md +2 -2
- package/.docs/docs/evals/built-in-scorers.md +1 -0
- package/.docs/docs/evals/multi-turn.md +84 -1
- package/.docs/docs/evals/overview.md +63 -1
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/mastra-platform/deploy.md +101 -0
- package/.docs/docs/mastra-platform/server.md +6 -11
- package/.docs/docs/mastra-platform/studio.md +8 -10
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +19 -14
- package/.docs/docs/sandbox/filesystem.md +8 -8
- package/.docs/docs/sandbox/overview.md +33 -66
- package/.docs/docs/server/middleware.md +4 -0
- package/.docs/docs/server/server-adapters.md +12 -8
- package/.docs/docs/storage.md +1 -0
- package/.docs/integrations/databases/mongodb.md +1 -1
- package/.docs/integrations/databases/postgresql.md +2 -0
- package/.docs/integrations/databases/valkey.md +99 -0
- package/.docs/integrations/deploy/render.md +47 -61
- package/.docs/integrations/sandboxes/e2b.md +2 -0
- package/.docs/integrations/tools/parallel.md +240 -0
- package/.docs/integrations.md +2 -0
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/merge-gateway.md +2 -1
- package/.docs/models/gateways/netlify.md +9 -5
- package/.docs/models/gateways/openrouter.md +8 -9
- package/.docs/models/gateways/vercel.md +7 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/agentrouter.md +17 -34
- package/.docs/models/providers/aki-io.md +14 -13
- package/.docs/models/providers/chutes.md +2 -2
- package/.docs/models/providers/crof.md +3 -8
- package/.docs/models/providers/crossmodel.md +56 -55
- package/.docs/models/providers/deepseek.md +8 -7
- package/.docs/models/providers/digitalocean.md +8 -8
- package/.docs/models/providers/edenai.md +14 -14
- package/.docs/models/providers/google.md +3 -3
- package/.docs/models/providers/hyper.md +5 -5
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/kilo.md +24 -20
- package/.docs/models/providers/llmgateway-providers.md +11 -8
- package/.docs/models/providers/llmgateway.md +3 -5
- package/.docs/models/providers/nano-gpt.md +12 -6
- package/.docs/models/providers/nvidia.md +3 -1
- package/.docs/models/providers/ofox.md +114 -110
- package/.docs/models/providers/opencode-go.md +26 -23
- package/.docs/models/providers/opencode.md +1 -1
- package/.docs/models/providers/opper.md +112 -0
- package/.docs/models/providers/requesty.md +1 -1
- package/.docs/models/providers/scaleway.md +2 -1
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/ai-sdk/handle-chat-stream.md +11 -0
- package/.docs/reference/ai-sdk/with-sse-heartbeat.md +47 -0
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/evals/checks.md +6 -0
- package/.docs/reference/evals/multi-turn-judge.md +101 -0
- package/.docs/reference/index.md +4 -0
- package/.docs/reference/pubsub/valkey-streams.md +84 -0
- package/.docs/reference/rag/vector-databases.md +4 -4
- package/.docs/reference/server/express-adapter.md +6 -8
- package/.docs/reference/server/hono-adapter.md +19 -6
- package/.docs/reference/storage/turso.md +88 -0
- package/.docs/reference/streaming/ChunkType.md +29 -1
- package/.docs/reference/tools/mcp-client.md +41 -9
- package/.docs/reference/vectors/mongodb.md +11 -11
- package/.docs/reference/vectors/pg.md +2 -0
- package/.docs/reference/workspace/workspace-class.md +15 -3
- package/CHANGELOG.md +59 -0
- package/package.json +4 -4
|
@@ -60,6 +60,8 @@ const agent = new Agent({
|
|
|
60
60
|
|
|
61
61
|
**timeout** (`number`): Execution timeout in milliseconds (Default: `300000 (5 minutes)`)
|
|
62
62
|
|
|
63
|
+
**lifecycle** (`SandboxLifecycle`): Controls what happens when the sandbox timeout is reached. Defaults to pausing the sandbox so the next start resumes it. Pass { onTimeout: 'kill' } to destroy idle sandboxes instead, which suits stateless workspaces whose data is persisted outside the sandbox. An explicit stop() always pauses, regardless of this setting. (Default: `{ onTimeout: 'pause' }`)
|
|
64
|
+
|
|
63
65
|
**template** (`string | TemplateBuilder | function`): Sandbox template specification. Can be a template ID string, a TemplateBuilder, or a function that customizes the default template.
|
|
64
66
|
|
|
65
67
|
**env** (`Record<string, string>`): Environment variables to set in the sandbox
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Parallel
|
|
4
|
+
|
|
5
|
+
The `@mastra/parallel` package exposes [Parallel Search](https://docs.parallel.ai/search/search-quickstart) and [Extract](https://docs.parallel.ai/search/extract-quickstart) as Mastra-compatible tools. Each factory returns a tool created with [`createTool()`](https://mastra.ai/reference/tools/create-tool) and a typed Zod input and output schema.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
**npm**:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @mastra/parallel parallel-web zod
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**pnpm**:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm add @mastra/parallel parallel-web zod
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Yarn**:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn add @mastra/parallel parallel-web zod
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Bun**:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bun add @mastra/parallel parallel-web zod
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Set `PARALLEL_API_KEY` in your environment. You can also pass an API key directly to any factory.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
Use `createParallelTools()` to create both tools with shared client configuration:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { createParallelTools } from '@mastra/parallel'
|
|
41
|
+
|
|
42
|
+
export const parallelTools = createParallelTools()
|
|
43
|
+
// Or pass an explicit API key:
|
|
44
|
+
// export const parallelTools = createParallelTools({ apiKey: 'parallel-api-key' })
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The returned object contains `parallelSearch` and `parallelExtract`.
|
|
48
|
+
|
|
49
|
+
Create either tool separately when an agent doesn't need both:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { createParallelExtractTool, createParallelSearchTool } from '@mastra/parallel'
|
|
53
|
+
|
|
54
|
+
export const searchTool = createParallelSearchTool()
|
|
55
|
+
export const extractTool = createParallelExtractTool({ apiKey: 'parallel-api-key' })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The client isn't initialized until the tool executes. A missing API key therefore fails at execution time with a configuration error.
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
All factories accept `ParallelClientOptions`, an alias of `ClientOptions` from the official `parallel-web` client:
|
|
63
|
+
|
|
64
|
+
**apiKey** (`string`): Parallel API key. Falls back to the PARALLEL\_API\_KEY environment variable.
|
|
65
|
+
|
|
66
|
+
**baseURL** (`string`): Override the Parallel API base URL. The client also reads PARALLEL\_BASE\_URL.
|
|
67
|
+
|
|
68
|
+
**timeout** (`number`): Timeout in milliseconds for one request attempt.
|
|
69
|
+
|
|
70
|
+
**fetch** (`Fetch`): Custom fetch implementation.
|
|
71
|
+
|
|
72
|
+
**fetchOptions** (`RequestInit`): Additional options passed to each fetch call.
|
|
73
|
+
|
|
74
|
+
**maxRetries** (`number`): Maximum retries for temporary failures. (Default: `2`)
|
|
75
|
+
|
|
76
|
+
**defaultHeaders** (`HeadersLike`): Headers included with every request.
|
|
77
|
+
|
|
78
|
+
**defaultQuery** (`Record<string, string | undefined>`): Query parameters included with every request.
|
|
79
|
+
|
|
80
|
+
**logLevel** (`LogLevel`): Client log level. Falls back to PARALLEL\_LOG, then warn.
|
|
81
|
+
|
|
82
|
+
**logger** (`Logger`): Client logger implementation.
|
|
83
|
+
|
|
84
|
+
The package also exports `getParallelClient()` for applications that need the configured official client directly.
|
|
85
|
+
|
|
86
|
+
## `createParallelSearchTool()`
|
|
87
|
+
|
|
88
|
+
Creates the `parallel-search` tool. Search returns ranked URLs and excerpts focused on the supplied queries and objective.
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import { createParallelSearchTool } from '@mastra/parallel'
|
|
92
|
+
|
|
93
|
+
const searchTool = createParallelSearchTool()
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Search input
|
|
97
|
+
|
|
98
|
+
**searchQueries** (`string[]`): One or more concise keyword queries. Parallel recommends 2-3 queries of 3-6 words each.
|
|
99
|
+
|
|
100
|
+
**objective** (`string`): Self-contained description of the goal driving the search.
|
|
101
|
+
|
|
102
|
+
**mode** (`'turbo' | 'fast' | 'basic' | 'advanced'`): Search mode. (Default: `'advanced'`)
|
|
103
|
+
|
|
104
|
+
**clientModel** (`string`): Model that will consume the results. Parallel uses it to tailor response defaults.
|
|
105
|
+
|
|
106
|
+
**maxResults** (`number`): Maximum number of results to return.
|
|
107
|
+
|
|
108
|
+
**excerptMaxCharsPerResult** (`number`): Maximum excerpt characters for each result.
|
|
109
|
+
|
|
110
|
+
**maxCharsTotal** (`number`): Maximum excerpt characters across all results.
|
|
111
|
+
|
|
112
|
+
**location** (`string`): ISO 3166-1 alpha-2 country code for geo-targeted results.
|
|
113
|
+
|
|
114
|
+
**includeDomains** (`string[]`): Only return results from these domains. Include and exclude lists can contain at most 200 domains combined.
|
|
115
|
+
|
|
116
|
+
**excludeDomains** (`string[]`): Exclude results from these domains. Include and exclude lists can contain at most 200 domains combined.
|
|
117
|
+
|
|
118
|
+
**afterDate** (`string`): Only return content published on or after this YYYY-MM-DD date.
|
|
119
|
+
|
|
120
|
+
**fetchPolicy** (`FetchPolicy`): Controls live fetching and cached-content fallback.
|
|
121
|
+
|
|
122
|
+
**fetchPolicy.maxAgeSeconds** (`number`): Maximum cached-content age before a live fetch. The minimum is 600 seconds.
|
|
123
|
+
|
|
124
|
+
**fetchPolicy.timeoutSeconds** (`number`): Timeout for a live fetch.
|
|
125
|
+
|
|
126
|
+
**fetchPolicy.disableCacheFallback** (`boolean`): Return an error instead of older cached content when a live fetch fails.
|
|
127
|
+
|
|
128
|
+
**sessionId** (`string`): Session identifier shared across related Search and Extract calls.
|
|
129
|
+
|
|
130
|
+
### Search output
|
|
131
|
+
|
|
132
|
+
Search returns `searchId`, `sessionId`, and `results`. Optional `usage` and `warnings` arrays preserve metadata from Parallel.
|
|
133
|
+
|
|
134
|
+
**searchId** (`string`): Parallel Search request ID.
|
|
135
|
+
|
|
136
|
+
**sessionId** (`string`): Session ID returned by Parallel.
|
|
137
|
+
|
|
138
|
+
**results** (`SearchResult[]`): Results ordered by decreasing relevance.
|
|
139
|
+
|
|
140
|
+
**results.url** (`string`): Result URL.
|
|
141
|
+
|
|
142
|
+
**results.title** (`string`): Page title.
|
|
143
|
+
|
|
144
|
+
**results.publishDate** (`string`): Page publication date.
|
|
145
|
+
|
|
146
|
+
**results.excerpts** (`string[]`): Relevant Markdown excerpts.
|
|
147
|
+
|
|
148
|
+
**usage** (`UsageItem[]`): SKU names and counts for the request.
|
|
149
|
+
|
|
150
|
+
**warnings** (`Warning[]`): Validation or request warnings from Parallel.
|
|
151
|
+
|
|
152
|
+
## `createParallelExtractTool()`
|
|
153
|
+
|
|
154
|
+
Creates the `parallel-extract` tool. Extract returns relevant excerpts or full content for up to 20 public URLs and reports per-URL failures separately.
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
import { createParallelExtractTool } from '@mastra/parallel'
|
|
158
|
+
|
|
159
|
+
const extractTool = createParallelExtractTool()
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Extract input
|
|
163
|
+
|
|
164
|
+
**urls** (`string[]`): One to 20 URLs to extract.
|
|
165
|
+
|
|
166
|
+
**objective** (`string`): Information to focus on while extracting.
|
|
167
|
+
|
|
168
|
+
**searchQueries** (`string[]`): Keyword queries used with the objective to focus excerpts.
|
|
169
|
+
|
|
170
|
+
**clientModel** (`string`): Model that will consume the results. Parallel uses it to tailor response defaults.
|
|
171
|
+
|
|
172
|
+
**excerptMaxCharsPerResult** (`number`): Maximum excerpt characters for each URL.
|
|
173
|
+
|
|
174
|
+
**fullContent** (`boolean | number`): Return full page content. Pass a number to cap characters for each URL.
|
|
175
|
+
|
|
176
|
+
**maxCharsTotal** (`number`): Maximum excerpt characters across all results.
|
|
177
|
+
|
|
178
|
+
**fetchPolicy** (`FetchPolicy`): Controls live fetching and cached-content fallback.
|
|
179
|
+
|
|
180
|
+
**fetchPolicy.maxAgeSeconds** (`number`): Maximum cached-content age before a live fetch. The minimum is 600 seconds.
|
|
181
|
+
|
|
182
|
+
**fetchPolicy.timeoutSeconds** (`number`): Timeout for a live fetch.
|
|
183
|
+
|
|
184
|
+
**fetchPolicy.disableCacheFallback** (`boolean`): Return an error instead of older cached content when a live fetch fails.
|
|
185
|
+
|
|
186
|
+
**sessionId** (`string`): Session identifier shared across related Search and Extract calls.
|
|
187
|
+
|
|
188
|
+
### Extract output
|
|
189
|
+
|
|
190
|
+
**extractId** (`string`): Parallel Extract request ID.
|
|
191
|
+
|
|
192
|
+
**sessionId** (`string`): Session ID returned by Parallel.
|
|
193
|
+
|
|
194
|
+
**results** (`ExtractResult[]`): Successful URL results.
|
|
195
|
+
|
|
196
|
+
**results.url** (`string`): Extracted URL.
|
|
197
|
+
|
|
198
|
+
**results.title** (`string`): Page title.
|
|
199
|
+
|
|
200
|
+
**results.publishDate** (`string`): Page publication date.
|
|
201
|
+
|
|
202
|
+
**results.excerpts** (`string[]`): Relevant Markdown excerpts.
|
|
203
|
+
|
|
204
|
+
**results.fullContent** (`string`): Full Markdown content when requested.
|
|
205
|
+
|
|
206
|
+
**errors** (`ExtractError[]`): Requested URLs that weren't returned as results.
|
|
207
|
+
|
|
208
|
+
**errors.url** (`string`): URL that failed.
|
|
209
|
+
|
|
210
|
+
**errors.errorType** (`string`): Parallel error type.
|
|
211
|
+
|
|
212
|
+
**errors.httpStatusCode** (`number`): HTTP status code when available.
|
|
213
|
+
|
|
214
|
+
**errors.content** (`string`): Response content when available.
|
|
215
|
+
|
|
216
|
+
**usage** (`UsageItem[]`): SKU names and counts for the request.
|
|
217
|
+
|
|
218
|
+
**warnings** (`Warning[]`): Validation or request warnings from Parallel.
|
|
219
|
+
|
|
220
|
+
## Use the tools with an agent
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import { Agent } from '@mastra/core/agent'
|
|
224
|
+
import { createParallelTools } from '@mastra/parallel'
|
|
225
|
+
|
|
226
|
+
export const researchAgent = new Agent({
|
|
227
|
+
id: 'research-agent',
|
|
228
|
+
name: 'Research Agent',
|
|
229
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
230
|
+
instructions:
|
|
231
|
+
'Search the web for current sources, then extract relevant content from the best pages.',
|
|
232
|
+
tools: createParallelTools(),
|
|
233
|
+
})
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Related
|
|
237
|
+
|
|
238
|
+
- [Parallel Search documentation](https://docs.parallel.ai/search/search-quickstart)
|
|
239
|
+
- [Parallel Extract documentation](https://docs.parallel.ai/search/extract-quickstart)
|
|
240
|
+
- [`createTool()` reference](https://mastra.ai/reference/tools/create-tool)
|
package/.docs/integrations.md
CHANGED
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
- [OracleDB](https://mastra.ai/integrations/databases/oracledb)
|
|
80
80
|
- [PostgreSQL](https://mastra.ai/integrations/databases/postgresql)
|
|
81
81
|
- [Redis](https://mastra.ai/integrations/databases/redis)
|
|
82
|
+
- [Valkey](https://mastra.ai/integrations/databases/valkey)
|
|
82
83
|
- [Upstash](https://mastra.ai/integrations/databases/upstash)
|
|
83
84
|
|
|
84
85
|
## Deploy
|
|
@@ -101,6 +102,7 @@
|
|
|
101
102
|
|
|
102
103
|
- [Bright Data](https://mastra.ai/integrations/tools/brightdata)
|
|
103
104
|
- [Firecrawl](https://mastra.ai/integrations/tools/firecrawl)
|
|
105
|
+
- [Parallel](https://mastra.ai/integrations/tools/parallel)
|
|
104
106
|
- [Perplexity](https://mastra.ai/integrations/tools/perplexity)
|
|
105
107
|
- [Tavily](https://mastra.ai/integrations/tools/tavily)
|
|
106
108
|
|
|
@@ -9,6 +9,7 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
9
9
|
| [302.AI](https://mastra.ai/models/providers/302ai) | `302ai/*` | `302AI_API_KEY` |
|
|
10
10
|
| [Abacus](https://mastra.ai/models/providers/abacus) | `abacus/*` | `ABACUS_API_KEY` |
|
|
11
11
|
| [abliteration.ai](https://mastra.ai/models/providers/abliteration-ai) | `abliteration-ai/*` | `ABLIT_KEY` |
|
|
12
|
+
| [AgentRouter](https://mastra.ai/models/providers/agentrouter) | `agentrouter/*` | `AGENTROUTER_API_KEY` |
|
|
12
13
|
| [AI-ROUTER](https://mastra.ai/models/providers/ai-router) | `ai-router/*` | `AI_ROUTER_API_KEY` |
|
|
13
14
|
| [ai&](https://mastra.ai/models/providers/aiand) | `aiand/*` | `AIAND_API_KEY` |
|
|
14
15
|
| [AKI.IO](https://mastra.ai/models/providers/aki-io) | `aki-io/*` | `AKI_IO_API_KEY` |
|
|
@@ -119,6 +120,7 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
119
120
|
| [OpenAI](https://mastra.ai/models/providers/openai) | `openai/*` | `OPENAI_API_KEY` |
|
|
120
121
|
| [OpenCode Go](https://mastra.ai/models/providers/opencode-go) | `opencode-go/*` | `OPENCODE_API_KEY` |
|
|
121
122
|
| [OpenCode Zen](https://mastra.ai/models/providers/opencode) | `opencode/*` | `OPENCODE_API_KEY` |
|
|
123
|
+
| [Opper](https://mastra.ai/models/providers/opper) | `opper/*` | `OPPER_API_KEY` |
|
|
122
124
|
| [OrcaRouter](https://mastra.ai/models/providers/orcarouter) | `orcarouter/*` | `ORCAROUTER_API_KEY` |
|
|
123
125
|
| [OVHcloud AI Endpoints](https://mastra.ai/models/providers/ovhcloud) | `ovhcloud/*` | `OVHCLOUD_API_KEY` |
|
|
124
126
|
| [Perplexity](https://mastra.ai/models/providers/perplexity) | `perplexity/*` | `PERPLEXITY_API_KEY` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Merge Gateway
|
|
4
4
|
|
|
5
|
-
Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 175 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway).
|
|
8
8
|
|
|
@@ -66,6 +66,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
66
66
|
| `deepseek/deepseek-v4-flash` |
|
|
67
67
|
| `deepseek/deepseek-v4-flash-0731` |
|
|
68
68
|
| `deepseek/deepseek-v4-pro` |
|
|
69
|
+
| `deepseek/deepseek-v4-pro-0423` |
|
|
69
70
|
| `deepseek/deepseek-v4-pro-0813` |
|
|
70
71
|
| `google/gemini-2.5-computer-use-preview-10-2025` |
|
|
71
72
|
| `google/gemini-2.5-flash` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Netlify
|
|
4
4
|
|
|
5
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
5
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 232 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
8
8
|
|
|
@@ -120,7 +120,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
120
120
|
| `openrouter/bytedance-seed/seed-2.0-mini` |
|
|
121
121
|
| `openrouter/bytedance/ui-tars-1.5-7b` |
|
|
122
122
|
| `openrouter/cognitivecomputations/dolphin-mistral-24b-venice-edition` |
|
|
123
|
-
| `openrouter/deepcogito/cogito-v2.1-671b` |
|
|
124
123
|
| `openrouter/deepseek/deepseek-chat` |
|
|
125
124
|
| `openrouter/deepseek/deepseek-chat-v3-0324` |
|
|
126
125
|
| `openrouter/deepseek/deepseek-chat-v3.1` |
|
|
@@ -144,10 +143,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
144
143
|
| `openrouter/gryphe/mythomax-l2-13b` |
|
|
145
144
|
| `openrouter/ibm-granite/granite-4.1-8b` |
|
|
146
145
|
| `openrouter/inception/mercury-2` |
|
|
147
|
-
| `openrouter/inclusionai/ling-2.6-1t` |
|
|
148
|
-
| `openrouter/inclusionai/ling-2.6-flash` |
|
|
149
146
|
| `openrouter/inclusionai/ling-3.0-flash` |
|
|
150
|
-
| `openrouter/inclusionai/ring-2.6-1t` |
|
|
151
147
|
| `openrouter/mancer/weaver` |
|
|
152
148
|
| `openrouter/meta-llama/llama-3.1-70b-instruct` |
|
|
153
149
|
| `openrouter/meta-llama/llama-3.1-8b-instruct` |
|
|
@@ -165,7 +161,14 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
165
161
|
| `openrouter/minimax/minimax-m2.5` |
|
|
166
162
|
| `openrouter/minimax/minimax-m2.7` |
|
|
167
163
|
| `openrouter/minimax/minimax-m3` |
|
|
164
|
+
| `openrouter/mistralai/devstral-2512` |
|
|
165
|
+
| `openrouter/mistralai/ministral-14b-2512` |
|
|
166
|
+
| `openrouter/mistralai/ministral-3b-2512` |
|
|
168
167
|
| `openrouter/mistralai/ministral-8b` |
|
|
168
|
+
| `openrouter/mistralai/ministral-8b-2512` |
|
|
169
|
+
| `openrouter/mistralai/mistral-large-2512` |
|
|
170
|
+
| `openrouter/mistralai/mistral-medium-3` |
|
|
171
|
+
| `openrouter/mistralai/mistral-medium-3.1` |
|
|
169
172
|
| `openrouter/mistralai/mistral-nemo` |
|
|
170
173
|
| `openrouter/mistralai/mistral-small-24b-instruct-2501` |
|
|
171
174
|
| `openrouter/mistralai/mistral-small-2603` |
|
|
@@ -239,6 +242,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
239
242
|
| `openrouter/stepfun/step-3.7-flash` |
|
|
240
243
|
| `openrouter/tencent/hy-mt2-1.8b` |
|
|
241
244
|
| `openrouter/tencent/hy-mt2-30b-a3b` |
|
|
245
|
+
| `openrouter/tencent/hy-mt2-7b` |
|
|
242
246
|
| `openrouter/tencent/hy3` |
|
|
243
247
|
| `openrouter/thedrummer/cydonia-24b-v4.1` |
|
|
244
248
|
| `openrouter/thedrummer/rocinante-12b` |
|
|
@@ -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 355 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
8
8
|
|
|
@@ -92,7 +92,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
92
92
|
| `cohere/command-r-plus-08-2024` |
|
|
93
93
|
| `cohere/command-r7b-12-2024` |
|
|
94
94
|
| `cohere/north-mini-code:free` |
|
|
95
|
-
| `deepcogito/cogito-v2.1-671b` |
|
|
96
95
|
| `deepseek/deepseek-chat` |
|
|
97
96
|
| `deepseek/deepseek-chat-v3-0324` |
|
|
98
97
|
| `deepseek/deepseek-chat-v3.1` |
|
|
@@ -104,6 +103,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
104
103
|
| `deepseek/deepseek-v3.2-exp` |
|
|
105
104
|
| `deepseek/deepseek-v4-flash` |
|
|
106
105
|
| `deepseek/deepseek-v4-flash-0731` |
|
|
106
|
+
| `deepseek/deepseek-v4-flash-vision-exp` |
|
|
107
107
|
| `deepseek/deepseek-v4-pro` |
|
|
108
108
|
| `deepseek/deepseek-v4-pro-0813` |
|
|
109
109
|
| `dots-studio/dots-3-note-preview:free` |
|
|
@@ -142,14 +142,12 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
142
142
|
| `ibm-granite/granite-4.0-h-micro` |
|
|
143
143
|
| `ibm-granite/granite-4.1-8b` |
|
|
144
144
|
| `inception/mercury-2` |
|
|
145
|
-
| `inclusionai/ling-2.6-1t` |
|
|
146
|
-
| `inclusionai/ling-2.6-flash` |
|
|
147
145
|
| `inclusionai/ling-3.0-flash` |
|
|
148
|
-
| `inclusionai/ring-2.6-1t` |
|
|
149
146
|
| `kwaipilot/kat-coder-air-v2.5` |
|
|
150
147
|
| `kwaipilot/kat-coder-pro-v2` |
|
|
151
148
|
| `kwaipilot/kat-coder-pro-v2.5` |
|
|
152
149
|
| `liquid/lfm-2.5-2.6b:free` |
|
|
150
|
+
| `mancer/weaver` |
|
|
153
151
|
| `meituan/longcat-2.0` |
|
|
154
152
|
| `meta-llama/llama-3.1-70b-instruct` |
|
|
155
153
|
| `meta-llama/llama-3.1-8b-instruct` |
|
|
@@ -162,6 +160,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
162
160
|
| `meta/muse-glimmer-30b` |
|
|
163
161
|
| `meta/muse-spark-1.1` |
|
|
164
162
|
| `meta/muse-spark-1.2` |
|
|
163
|
+
| `meta/muse-spark-1.2-contributor` |
|
|
165
164
|
| `microsoft/phi-4` |
|
|
166
165
|
| `microsoft/wizardlm-2-8x22b` |
|
|
167
166
|
| `minimax/minimax-01` |
|
|
@@ -173,6 +172,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
173
172
|
| `minimax/minimax-m2.7` |
|
|
174
173
|
| `minimax/minimax-m3` |
|
|
175
174
|
| `mistralai/codestral-2508` |
|
|
175
|
+
| `mistralai/devstral-2512` |
|
|
176
176
|
| `mistralai/ministral-14b-2512` |
|
|
177
177
|
| `mistralai/ministral-3b-2512` |
|
|
178
178
|
| `mistralai/ministral-8b` |
|
|
@@ -207,7 +207,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
207
207
|
| `nousresearch/hermes-4-405b` |
|
|
208
208
|
| `nousresearch/hermes-4-70b` |
|
|
209
209
|
| `nvidia/nemotron-3-nano-30b-a3b` |
|
|
210
|
-
| `nvidia/nemotron-3-nano-30b-a3b:free` |
|
|
211
210
|
| `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` |
|
|
212
211
|
| `nvidia/nemotron-3-super-120b-a12b` |
|
|
213
212
|
| `nvidia/nemotron-3-super-120b-a12b:free` |
|
|
@@ -216,8 +215,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
216
215
|
| `nvidia/nemotron-3.5-content-safety:free` |
|
|
217
216
|
| `nvidia/nemotron-3.5-lightning` |
|
|
218
217
|
| `nvidia/nemotron-3.5-lightning:free` |
|
|
219
|
-
| `nvidia/nemotron-nano-12b-v2-vl:free` |
|
|
220
|
-
| `nvidia/nemotron-nano-9b-v2:free` |
|
|
221
218
|
| `openai/gpt-3.5-turbo` |
|
|
222
219
|
| `openai/gpt-3.5-turbo-0613` |
|
|
223
220
|
| `openai/gpt-3.5-turbo-16k` |
|
|
@@ -267,7 +264,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
267
264
|
| `openai/gpt-chat-latest` |
|
|
268
265
|
| `openai/gpt-oss-120b` |
|
|
269
266
|
| `openai/gpt-oss-20b` |
|
|
270
|
-
| `openai/gpt-oss-20b:free` |
|
|
271
267
|
| `openai/gpt-oss-safeguard-20b` |
|
|
272
268
|
| `openai/o1` |
|
|
273
269
|
| `openai/o1-pro` |
|
|
@@ -358,6 +354,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
358
354
|
| `tencent/hunyuan-a13b-instruct` |
|
|
359
355
|
| `tencent/hy-mt2-1.8b` |
|
|
360
356
|
| `tencent/hy-mt2-30b-a3b` |
|
|
357
|
+
| `tencent/hy-mt2-7b` |
|
|
361
358
|
| `tencent/hy3` |
|
|
362
359
|
| `tencent/hy3-preview` |
|
|
363
360
|
| `thedrummer/cydonia-24b-v4.1` |
|
|
@@ -366,6 +363,8 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
366
363
|
| `thedrummer/unslopnemo-12b` |
|
|
367
364
|
| `thinkingmachines/inkling` |
|
|
368
365
|
| `thinkingmachines/inkling-small` |
|
|
366
|
+
| `thinkingmachines/inkling-small:free` |
|
|
367
|
+
| `thinkingmachines/inkling:free` |
|
|
369
368
|
| `undi95/remm-slerp-l2-13b` |
|
|
370
369
|
| `upstage/solar-pro-3` |
|
|
371
370
|
| `upstage/solar-pro4` |
|
|
@@ -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 353 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
|
|
|
@@ -112,6 +112,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
112
112
|
| `bytedance/seed-1.8` |
|
|
113
113
|
| `bytedance/seedance-2.0` |
|
|
114
114
|
| `bytedance/seedance-2.0-fast` |
|
|
115
|
+
| `bytedance/seedance-2.0-mini` |
|
|
115
116
|
| `bytedance/seedance-2.5` |
|
|
116
117
|
| `bytedance/seedance-v1.0-pro` |
|
|
117
118
|
| `bytedance/seedance-v1.0-pro-fast` |
|
|
@@ -133,6 +134,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
133
134
|
| `deepseek/deepseek-v3.2-thinking` |
|
|
134
135
|
| `deepseek/deepseek-v4-flash` |
|
|
135
136
|
| `deepseek/deepseek-v4-flash-0731` |
|
|
137
|
+
| `deepseek/deepseek-v4-flash-vision-exp` |
|
|
136
138
|
| `deepseek/deepseek-v4-pro` |
|
|
137
139
|
| `deepseek/deepseek-v4-pro-0813` |
|
|
138
140
|
| `fish-audio/s1` |
|
|
@@ -234,6 +236,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
234
236
|
| `nvidia/nemotron-3-super-120b-a12b` |
|
|
235
237
|
| `nvidia/nemotron-3-ultra-550b-a55b` |
|
|
236
238
|
| `nvidia/nemotron-3.5-lightning` |
|
|
239
|
+
| `nvidia/nemotron-3.5-lightning-free` |
|
|
237
240
|
| `nvidia/nemotron-nano-12b-v2-vl` |
|
|
238
241
|
| `nvidia/nemotron-nano-9b-v2` |
|
|
239
242
|
| `openai/gpt-3.5-turbo` |
|
|
@@ -352,6 +355,9 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
352
355
|
| `spacexai/grok-voice-think-fast-2.0` |
|
|
353
356
|
| `stepfun/step-3.5-flash` |
|
|
354
357
|
| `stepfun/step-3.7-flash` |
|
|
358
|
+
| `tencent/hy-mt2-lite` |
|
|
359
|
+
| `tencent/hy-mt2-plus` |
|
|
360
|
+
| `tencent/hy-mt2-pro` |
|
|
355
361
|
| `tencent/hy3` |
|
|
356
362
|
| `thinkingmachines/inkling` |
|
|
357
363
|
| `thinkingmachines/inkling-small` |
|
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 6812 models from 182 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# AgentRouter
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 3 AgentRouter models through Mastra's model router. Authentication is handled automatically using the `AGENTROUTER_API_KEY` environment variable.
|
|
6
6
|
|
|
7
|
-
Learn more in the [AgentRouter documentation](https://
|
|
7
|
+
Learn more in the [AgentRouter documentation](https://agentrouter.org/docs/opencode.html).
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
AGENTROUTER_API_KEY=your-api-key
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "agentrouter/claude-
|
|
20
|
+
model: "agentrouter/claude-opus-4-8"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -30,36 +30,19 @@ for await (const chunk of stream) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [AgentRouter documentation](https://
|
|
33
|
+
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [AgentRouter documentation](https://agentrouter.org/docs/opencode.html) for details.
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `agentrouter/claude-
|
|
40
|
-
| `agentrouter/claude-
|
|
41
|
-
| `agentrouter/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| `agentrouter/claude-opus-4-20250514-thinking` | 200K | | | | | | $2 | $10 |
|
|
47
|
-
| `agentrouter/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
|
|
48
|
-
| `agentrouter/claude-sonnet-4-20250514-thinking` | 200K | | | | | | $2 | $10 |
|
|
49
|
-
| `agentrouter/claude-sonnet-4-5-20250929` | 1.0M | | | | | | $6 | $30 |
|
|
50
|
-
| `agentrouter/deepseek-r1-0528` | 128K | | | | | | $0.30 | $0.04 |
|
|
51
|
-
| `agentrouter/deepseek-v3.1` | 128K | | | | | | $0.30 | $0.04 |
|
|
52
|
-
| `agentrouter/deepseek-v3.2` | 128K | | | | | | $0.30 | $0.04 |
|
|
53
|
-
| `agentrouter/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $8 |
|
|
54
|
-
| `agentrouter/glm-4.5` | 131K | | | | | | $0.00 | — |
|
|
55
|
-
| `agentrouter/glm-4.6` | 205K | | | | | | $0.00 | — |
|
|
56
|
-
| `agentrouter/gpt-5` | 1.3M | | | | | | — | — |
|
|
57
|
-
| `agentrouter/gpt-5.1` | 400K | | | | | | $2 | $2 |
|
|
58
|
-
| `agentrouter/kimi-k2-thinking` | 262K | | | | | | $0.00 | — |
|
|
59
|
-
|
|
60
|
-
## Advanced Configuration
|
|
61
|
-
|
|
62
|
-
### Custom Headers
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| ----------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `agentrouter/claude-opus-4-8` | 1.0M | | | | | | — | — |
|
|
40
|
+
| `agentrouter/claude-opus-5` | 1.0M | | | | | | — | — |
|
|
41
|
+
| `agentrouter/gpt-5.6-sol` | 1.1M | | | | | | — | — |
|
|
42
|
+
|
|
43
|
+
## Advanced configuration
|
|
44
|
+
|
|
45
|
+
### Custom headers
|
|
63
46
|
|
|
64
47
|
```typescript
|
|
65
48
|
const agent = new Agent({
|
|
@@ -67,7 +50,7 @@ const agent = new Agent({
|
|
|
67
50
|
name: "custom-agent",
|
|
68
51
|
model: {
|
|
69
52
|
url: "https://agentrouter.org/v1",
|
|
70
|
-
id: "agentrouter/claude-
|
|
53
|
+
id: "agentrouter/claude-opus-4-8",
|
|
71
54
|
apiKey: process.env.AGENTROUTER_API_KEY,
|
|
72
55
|
headers: {
|
|
73
56
|
"X-Custom-Header": "value"
|
|
@@ -76,7 +59,7 @@ const agent = new Agent({
|
|
|
76
59
|
});
|
|
77
60
|
```
|
|
78
61
|
|
|
79
|
-
### Dynamic
|
|
62
|
+
### Dynamic model selection
|
|
80
63
|
|
|
81
64
|
```typescript
|
|
82
65
|
const agent = new Agent({
|
|
@@ -85,8 +68,8 @@ const agent = new Agent({
|
|
|
85
68
|
model: ({ requestContext }) => {
|
|
86
69
|
const useAdvanced = requestContext.task === "complex";
|
|
87
70
|
return useAdvanced
|
|
88
|
-
? "agentrouter/
|
|
89
|
-
: "agentrouter/claude-
|
|
71
|
+
? "agentrouter/gpt-5.6-sol"
|
|
72
|
+
: "agentrouter/claude-opus-4-8";
|
|
90
73
|
}
|
|
91
74
|
});
|
|
92
75
|
```
|