@mastra/mcp-docs-server 1.2.3 → 1.2.4-alpha.5
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/agent-controller/overview.md +1 -0
- package/.docs/docs/agent-controller/subagents.md +1 -0
- package/.docs/docs/agent-controller/threads-and-state.md +1 -0
- package/.docs/docs/agents/background-tasks.md +3 -3
- package/.docs/docs/agents/channels.md +4 -1
- package/.docs/docs/agents/code-mode.md +2 -0
- package/.docs/docs/agents/durable-agents.md +1 -1
- package/.docs/docs/agents/file-based-agents.md +1 -1
- package/.docs/docs/agents/goals.md +2 -0
- package/.docs/docs/agents/heartbeats.md +1 -1
- package/.docs/docs/agents/overview.md +104 -0
- package/.docs/docs/agents/processors.md +8 -2
- package/.docs/docs/agents/supervisor-agents.md +1 -0
- package/.docs/docs/agents/using-tools.md +3 -0
- package/.docs/docs/editor/overview.md +1 -0
- package/.docs/docs/evals/overview.md +1 -0
- package/.docs/docs/evals/quick-checks.md +1 -0
- package/.docs/docs/getting-started/build-with-ai.md +3 -5
- package/.docs/docs/getting-started/manual-install.md +15 -5
- package/.docs/docs/index.md +104 -0
- package/.docs/docs/memory/memory-processors.md +2 -0
- package/.docs/docs/memory/observational-memory.md +4 -0
- package/.docs/docs/memory/overview.md +3 -1
- package/.docs/docs/memory/semantic-recall.md +6 -0
- package/.docs/docs/observability/integrations/exporters/langfuse.md +1 -0
- package/.docs/docs/workspace/filesystem.md +3 -1
- package/.docs/docs/workspace/sandbox.md +2 -0
- package/.docs/guides/getting-started/quickstart.md +2 -0
- package/.docs/guides/migrations/agentnetwork.md +1 -0
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -0
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -0
- package/.docs/models/environment-variables.md +142 -0
- package/.docs/models/gateways/netlify.md +3 -2
- package/.docs/models/gateways/openrouter.md +4 -2
- package/.docs/models/gateways/vercel.md +4 -1
- package/.docs/models/index.md +8 -8
- package/.docs/models/providers/cerebras.md +5 -4
- package/.docs/models/providers/google.md +3 -1
- package/.docs/models/providers/llmgateway.md +2 -1
- package/.docs/models/providers/opencode.md +5 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/reference/agents/agent.md +3 -2
- package/.docs/reference/agents/channels.md +5 -0
- package/.docs/reference/evals/hallucination.md +1 -0
- package/.docs/reference/evals/prompt-alignment.md +1 -0
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/memory/memory-class.md +1 -0
- package/.docs/reference/memory/observational-memory.md +8 -0
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -0
- package/.docs/reference/processors/batch-parts-processor.md +1 -0
- package/.docs/reference/processors/cost-guard-processor.md +1 -0
- package/.docs/reference/processors/message-history-processor.md +1 -0
- package/.docs/reference/processors/moderation-processor.md +2 -0
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prefill-error-handler.md +2 -0
- package/.docs/reference/processors/processor-interface.md +3 -2
- package/.docs/reference/processors/prompt-injection-detector.md +1 -0
- package/.docs/reference/processors/provider-history-compat.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +1 -0
- package/.docs/reference/processors/response-cache.md +1 -0
- package/.docs/reference/processors/semantic-recall-processor.md +1 -0
- package/.docs/reference/processors/skill-search-processor.md +1 -0
- package/.docs/reference/processors/stream-error-retry-processor.md +2 -0
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -0
- package/.docs/reference/processors/token-limiter-processor.md +3 -0
- package/.docs/reference/processors/tool-call-filter.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +2 -0
- package/.docs/reference/processors/working-memory-processor.md +1 -0
- package/.docs/reference/signals/signal-provider.md +1 -0
- package/.docs/reference/signals/task-signal-provider.md +1 -0
- package/.docs/reference/signals/webhook-signal-provider.md +1 -0
- package/.docs/reference/templates/overview.md +1 -0
- package/.docs/reference/tools/create-code-mode.md +1 -0
- package/.docs/reference/tools/create-tool.md +2 -0
- package/.docs/reference/tools/mcp-client.md +1 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -0
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +1 -0
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -0
- package/.docs/reference/workspace/apple-container-sandbox.md +257 -0
- package/.docs/reference/workspace/archil-filesystem.md +1 -0
- package/.docs/reference/workspace/azure-blob-filesystem.md +1 -0
- package/.docs/reference/workspace/docker-sandbox.md +1 -0
- package/.docs/reference/workspace/e2b-sandbox.md +1 -0
- package/.docs/reference/workspace/files-sdk-filesystem.md +1 -0
- package/.docs/reference/workspace/gcs-filesystem.md +1 -0
- package/.docs/reference/workspace/mesa-filesystem.md +319 -0
- package/.docs/reference/workspace/s3-filesystem.md +1 -0
- package/.docs/reference/workspace/vercel.md +1 -0
- package/CHANGELOG.md +22 -0
- package/package.json +5 -5
|
@@ -130,6 +130,7 @@ The following options control semantic recall behavior:
|
|
|
130
130
|
|
|
131
131
|
```typescript
|
|
132
132
|
const agent = new Agent({
|
|
133
|
+
id: 'agent',
|
|
133
134
|
memory: new Memory({
|
|
134
135
|
options: {
|
|
135
136
|
semanticRecall: {
|
|
@@ -151,6 +152,7 @@ The `filter` option restricts semantic recall results to messages with matching
|
|
|
151
152
|
|
|
152
153
|
```typescript
|
|
153
154
|
const agent = new Agent({
|
|
155
|
+
id: 'agent',
|
|
154
156
|
memory: new Memory({
|
|
155
157
|
options: {
|
|
156
158
|
semanticRecall: {
|
|
@@ -217,6 +219,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
217
219
|
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
|
|
218
220
|
|
|
219
221
|
const agent = new Agent({
|
|
222
|
+
id: 'agent',
|
|
220
223
|
memory: new Memory({
|
|
221
224
|
embedder: new ModelRouterEmbeddingModel('openai/text-embedding-3-small'),
|
|
222
225
|
options: {
|
|
@@ -238,6 +241,7 @@ import { Memory } from '@mastra/memory'
|
|
|
238
241
|
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
|
|
239
242
|
|
|
240
243
|
const agent = new Agent({
|
|
244
|
+
id: 'agent',
|
|
241
245
|
memory: new Memory({
|
|
242
246
|
embedder: new ModelRouterEmbeddingModel({
|
|
243
247
|
providerId: 'openrouter',
|
|
@@ -259,6 +263,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
259
263
|
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
|
|
260
264
|
|
|
261
265
|
const agent = new Agent({
|
|
266
|
+
id: 'agent',
|
|
262
267
|
memory: new Memory({
|
|
263
268
|
embedder: new ModelRouterEmbeddingModel('openai/text-embedding-3-small'),
|
|
264
269
|
}),
|
|
@@ -301,6 +306,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
301
306
|
import { fastembed } from '@mastra/fastembed'
|
|
302
307
|
|
|
303
308
|
const agent = new Agent({
|
|
309
|
+
id: 'agent',
|
|
304
310
|
memory: new Memory({
|
|
305
311
|
embedder: fastembed,
|
|
306
312
|
}),
|
|
@@ -237,6 +237,7 @@ const exporter = new LangfuseExporter()
|
|
|
237
237
|
const prompt = await exporter.client.prompt.get('customer-support', { type: 'text' })
|
|
238
238
|
|
|
239
239
|
export const supportAgent = new Agent({
|
|
240
|
+
id: 'support-agent',
|
|
240
241
|
name: 'support-agent',
|
|
241
242
|
instructions: prompt.compile(), // Use the prompt text from Langfuse
|
|
242
243
|
model: 'openai/gpt-5.5',
|
|
@@ -25,8 +25,9 @@ Available providers:
|
|
|
25
25
|
- [`AzureBlobFilesystem`](https://mastra.ai/reference/workspace/azure-blob-filesystem): Stores files in Azure Blob Storage
|
|
26
26
|
- [`FilesSDKFilesystem`](https://mastra.ai/reference/workspace/files-sdk-filesystem): Stores files in any [FilesSDK](https://files-sdk.dev) adapter (S3, R2, GCS, Azure Blob, Vercel Blob, local filesystem, and more) — useful when you want one provider that can target multiple backends
|
|
27
27
|
- [`AgentFSFilesystem`](https://mastra.ai/reference/workspace/agentfs-filesystem): Stores files in a Turso/SQLite database via AgentFS
|
|
28
|
+
- [`MesaFilesystem`](https://mastra.ai/reference/workspace/mesa-filesystem): Stores files in versioned Mesa repos
|
|
28
29
|
|
|
29
|
-
> **Tip:** `LocalFilesystem` is the simplest way to get started as it requires no external services. For cloud storage, use `S3Filesystem`, `GCSFilesystem`, or `AzureBlobFilesystem`. For database-backed storage without external services, use `AgentFSFilesystem`.
|
|
30
|
+
> **Tip:** `LocalFilesystem` is the simplest way to get started as it requires no external services. For cloud storage, use `S3Filesystem`, `GCSFilesystem`, or `AzureBlobFilesystem`. For versioned storage, use `MesaFilesystem`. For database-backed storage without external services, use `AgentFSFilesystem`.
|
|
30
31
|
|
|
31
32
|
## Basic usage
|
|
32
33
|
|
|
@@ -228,5 +229,6 @@ When you configure a filesystem on a workspace, agents receive tools for reading
|
|
|
228
229
|
- [AzureBlobFilesystem reference](https://mastra.ai/reference/workspace/azure-blob-filesystem)
|
|
229
230
|
- [FilesSDKFilesystem reference](https://mastra.ai/reference/workspace/files-sdk-filesystem)
|
|
230
231
|
- [AgentFSFilesystem reference](https://mastra.ai/reference/workspace/agentfs-filesystem)
|
|
232
|
+
- [MesaFilesystem reference](https://mastra.ai/reference/workspace/mesa-filesystem)
|
|
231
233
|
- [Workspace overview](https://mastra.ai/docs/workspace/overview)
|
|
232
234
|
- [Sandbox](https://mastra.ai/docs/workspace/sandbox)
|
|
@@ -17,6 +17,7 @@ A sandbox provider executes commands in a controlled environment:
|
|
|
17
17
|
|
|
18
18
|
- [`LocalSandbox`](https://mastra.ai/reference/workspace/local-sandbox): Executes commands on the local machine
|
|
19
19
|
- [`AgentCoreRuntimeSandbox`](https://mastra.ai/reference/workspace/agentcore-runtime-sandbox): Executes commands in AWS Bedrock AgentCore Runtime sessions
|
|
20
|
+
- [`AppleContainerSandbox`](https://mastra.ai/reference/workspace/apple-container-sandbox): Executes commands in local OCI Linux containers using Apple's `container` CLI
|
|
20
21
|
- [`BlaxelSandbox`](https://mastra.ai/reference/workspace/blaxel-sandbox): Executes commands in isolated Blaxel cloud sandboxes
|
|
21
22
|
- [`DaytonaSandbox`](https://mastra.ai/reference/workspace/daytona-sandbox): Executes commands in isolated Daytona cloud sandboxes
|
|
22
23
|
- [`E2BSandbox`](https://mastra.ai/reference/workspace/e2b-sandbox): Executes commands in isolated E2B cloud sandboxes
|
|
@@ -224,6 +225,7 @@ Use `null` or `false` for cloud sandboxes (for example, E2B, Daytona, or Modal)
|
|
|
224
225
|
|
|
225
226
|
- [`SandboxProcessManager` reference](https://mastra.ai/reference/workspace/process-manager)
|
|
226
227
|
- [`AgentCoreRuntimeSandbox` reference](https://mastra.ai/reference/workspace/agentcore-runtime-sandbox)
|
|
228
|
+
- [`AppleContainerSandbox` reference](https://mastra.ai/reference/workspace/apple-container-sandbox)
|
|
227
229
|
- [`DaytonaSandbox` reference](https://mastra.ai/reference/workspace/daytona-sandbox)
|
|
228
230
|
- [`E2BSandbox` reference](https://mastra.ai/reference/workspace/e2b-sandbox)
|
|
229
231
|
- [`LocalSandbox` reference](https://mastra.ai/reference/workspace/local-sandbox)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Mastra Quickstart
|
|
2
2
|
|
|
3
|
+
**For AI agents:** This page provides information for humans on how to run an interactive CLI to create a boilerplate Mastra project (with agents, workflows, and tools). You can run it non-interactively like so: `npm create mastra@latest <project-name> -- --default`. If you need to build a Mastra project from scratch (e.g. as a Node.js script printing to stdout), navigate to <https://mastra.ai/docs/getting-started/manual-install> instead.
|
|
4
|
+
|
|
3
5
|
The `create mastra` CLI command is the quickest way to get started. It walks you through setup and creates example agents, workflows, and tools for you to run locally or adapt.
|
|
4
6
|
|
|
5
7
|
If you need more control over the setup, see the [manual installation guide](https://mastra.ai/docs/getting-started/manual-install). You can also use [`mastra init`](https://mastra.ai/reference/cli/mastra) for existing projects.
|
|
@@ -273,6 +273,7 @@ To migrate, move processor configuration from Memory to Agent using `inputProces
|
|
|
273
273
|
});
|
|
274
274
|
|
|
275
275
|
const agent = new Agent({
|
|
276
|
+
id: 'agent',
|
|
276
277
|
memory,
|
|
277
278
|
+ inputProcessors: [
|
|
278
279
|
+ new TokenLimiter({ limit: 4000 }), // Limits historical messages to fit context window
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
|
|
3
|
+
List of required environment variables for each model provider and gateway supported by Mastra's [model router](https://mastra.ai/models).
|
|
4
|
+
|
|
5
|
+
| Name | Model prefix | Environment variables |
|
|
6
|
+
| ---------------------------------------------------------------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| [302.AI](https://mastra.ai/models/providers/302ai) | `302ai/*` | `302AI_API_KEY` |
|
|
8
|
+
| [Abacus](https://mastra.ai/models/providers/abacus) | `abacus/*` | `ABACUS_API_KEY` |
|
|
9
|
+
| [abliteration.ai](https://mastra.ai/models/providers/abliteration-ai) | `abliteration-ai/*` | `ABLIT_KEY` |
|
|
10
|
+
| [Alibaba](https://mastra.ai/models/providers/alibaba) | `alibaba/*` | `DASHSCOPE_API_KEY` |
|
|
11
|
+
| [Alibaba (China)](https://mastra.ai/models/providers/alibaba-cn) | `alibaba-cn/*` | `DASHSCOPE_API_KEY` |
|
|
12
|
+
| [Alibaba Coding Plan](https://mastra.ai/models/providers/alibaba-coding-plan) | `alibaba-coding-plan/*` | `ALIBABA_CODING_PLAN_API_KEY` |
|
|
13
|
+
| [Alibaba Coding Plan (China)](https://mastra.ai/models/providers/alibaba-coding-plan-cn) | `alibaba-coding-plan-cn/*` | `ALIBABA_CODING_PLAN_API_KEY` |
|
|
14
|
+
| [Alibaba Token Plan](https://mastra.ai/models/providers/alibaba-token-plan) | `alibaba-token-plan/*` | `ALIBABA_TOKEN_PLAN_API_KEY` |
|
|
15
|
+
| [Alibaba Token Plan (China)](https://mastra.ai/models/providers/alibaba-token-plan-cn) | `alibaba-token-plan-cn/*` | `ALIBABA_TOKEN_PLAN_API_KEY` |
|
|
16
|
+
| [Ambient](https://mastra.ai/models/providers/ambient) | `ambient/*` | `AMBIENT_API_KEY` |
|
|
17
|
+
| [Anthropic](https://mastra.ai/models/providers/anthropic) | `anthropic/*` | `ANTHROPIC_API_KEY` |
|
|
18
|
+
| [AnyAPI](https://mastra.ai/models/providers/anyapi) | `anyapi/*` | `ANYAPI_API_KEY` |
|
|
19
|
+
| [Atomic Chat](https://mastra.ai/models/providers/atomic-chat) | `atomic-chat/*` | `ATOMIC_CHAT_API_KEY` |
|
|
20
|
+
| [Auriko](https://mastra.ai/models/providers/auriko) | `auriko/*` | `AURIKO_API_KEY` |
|
|
21
|
+
| [Bailing](https://mastra.ai/models/providers/bailing) | `bailing/*` | `BAILING_API_TOKEN` |
|
|
22
|
+
| [Baseten](https://mastra.ai/models/providers/baseten) | `baseten/*` | `BASETEN_API_KEY` |
|
|
23
|
+
| [Berget.AI](https://mastra.ai/models/providers/berget) | `berget/*` | `BERGET_API_KEY` |
|
|
24
|
+
| [Cerebras](https://mastra.ai/models/providers/cerebras) | `cerebras/*` | `CEREBRAS_API_KEY` |
|
|
25
|
+
| [Chutes](https://mastra.ai/models/providers/chutes) | `chutes/*` | `CHUTES_API_KEY` |
|
|
26
|
+
| [Clarifai](https://mastra.ai/models/providers/clarifai) | `clarifai/*` | `CLARIFAI_PAT` |
|
|
27
|
+
| [Claudinio](https://mastra.ai/models/providers/claudinio) | `claudinio/*` | `CLAUDINIO_API_KEY` |
|
|
28
|
+
| [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock) | `cloudferro-sherlock/*` | `CLOUDFERRO_SHERLOCK_API_KEY` |
|
|
29
|
+
| [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai) | `cloudflare-workers-ai/*` | `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_KEY` |
|
|
30
|
+
| [Cortecs](https://mastra.ai/models/providers/cortecs) | `cortecs/*` | `CORTECS_API_KEY` |
|
|
31
|
+
| [CrofAI](https://mastra.ai/models/providers/crof) | `crof/*` | `CROF_API_KEY` |
|
|
32
|
+
| [D.Run (China)](https://mastra.ai/models/providers/drun) | `drun/*` | `DRUN_API_KEY` |
|
|
33
|
+
| [Databricks](https://mastra.ai/models/providers/databricks) | `databricks/*` | `DATABRICKS_HOST`, `DATABRICKS_TOKEN` |
|
|
34
|
+
| [Deep Infra](https://mastra.ai/models/providers/deepinfra) | `deepinfra/*` | `DEEPINFRA_API_KEY` |
|
|
35
|
+
| [DeepSeek](https://mastra.ai/models/providers/deepseek) | `deepseek/*` | `DEEPSEEK_API_KEY` |
|
|
36
|
+
| [DigitalOcean](https://mastra.ai/models/providers/digitalocean) | `digitalocean/*` | `DIGITALOCEAN_ACCESS_TOKEN` |
|
|
37
|
+
| [DInference](https://mastra.ai/models/providers/dinference) | `dinference/*` | `DINFERENCE_API_KEY` |
|
|
38
|
+
| [evroc](https://mastra.ai/models/providers/evroc) | `evroc/*` | `EVROC_API_KEY` |
|
|
39
|
+
| [FastRouter](https://mastra.ai/models/providers/fastrouter) | `fastrouter/*` | `FASTROUTER_API_KEY` |
|
|
40
|
+
| [Fireworks AI](https://mastra.ai/models/providers/fireworks-ai) | `fireworks-ai/*` | `FIREWORKS_API_KEY` |
|
|
41
|
+
| [FreeModel](https://mastra.ai/models/providers/freemodel) | `freemodel/*` | `FREEMODEL_API_KEY` |
|
|
42
|
+
| [Friendli](https://mastra.ai/models/providers/friendli) | `friendli/*` | `FRIENDLI_TOKEN` |
|
|
43
|
+
| [FrogBot](https://mastra.ai/models/providers/frogbot) | `frogbot/*` | `FROGBOT_API_KEY` |
|
|
44
|
+
| [GitHub Models](https://mastra.ai/models/providers/github-models) | `github-models/*` | `GITHUB_TOKEN` |
|
|
45
|
+
| [GMI Cloud](https://mastra.ai/models/providers/gmicloud) | `gmicloud/*` | `GMICLOUD_API_KEY` |
|
|
46
|
+
| [Google](https://mastra.ai/models/providers/google) | `google/*` | `GOOGLE_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY` |
|
|
47
|
+
| [Groq](https://mastra.ai/models/providers/groq) | `groq/*` | `GROQ_API_KEY` |
|
|
48
|
+
| [Helicone](https://mastra.ai/models/providers/helicone) | `helicone/*` | `HELICONE_API_KEY` |
|
|
49
|
+
| [HPC-AI](https://mastra.ai/models/providers/hpc-ai) | `hpc-ai/*` | `HPC_AI_API_KEY` |
|
|
50
|
+
| [Hugging Face](https://mastra.ai/models/providers/huggingface) | `huggingface/*` | `HF_TOKEN` |
|
|
51
|
+
| [iFlow](https://mastra.ai/models/providers/iflowcn) | `iflowcn/*` | `IFLOW_API_KEY` |
|
|
52
|
+
| [Inception](https://mastra.ai/models/providers/inception) | `inception/*` | `INCEPTION_API_KEY` |
|
|
53
|
+
| [Inceptron](https://mastra.ai/models/providers/inceptron) | `inceptron/*` | `INCEPTRON_API_KEY` |
|
|
54
|
+
| [Inference](https://mastra.ai/models/providers/inference) | `inference/*` | `INFERENCE_API_KEY` |
|
|
55
|
+
| [IO.NET](https://mastra.ai/models/providers/io-net) | `io-net/*` | `IOINTELLIGENCE_API_KEY` |
|
|
56
|
+
| [Jiekou.AI](https://mastra.ai/models/providers/jiekou) | `jiekou/*` | `JIEKOU_API_KEY` |
|
|
57
|
+
| [Kilo Gateway](https://mastra.ai/models/providers/kilo) | `kilo/*` | `KILO_API_KEY` |
|
|
58
|
+
| [Kimi For Coding](https://mastra.ai/models/providers/kimi-for-coding) | `kimi-for-coding/*` | `KIMI_API_KEY` |
|
|
59
|
+
| [KUAE Cloud Coding Plan](https://mastra.ai/models/providers/kuae-cloud-coding-plan) | `kuae-cloud-coding-plan/*` | `KUAE_API_KEY` |
|
|
60
|
+
| [Lilac](https://mastra.ai/models/providers/lilac) | `lilac/*` | `LILAC_API_KEY` |
|
|
61
|
+
| [Llama](https://mastra.ai/models/providers/llama) | `llama/*` | `LLAMA_API_KEY` |
|
|
62
|
+
| [LLM Gateway](https://mastra.ai/models/providers/llmgateway) | `llmgateway/*` | `LLMGATEWAY_API_KEY` |
|
|
63
|
+
| [LLMTR](https://mastra.ai/models/providers/llmtr) | `llmtr/*` | `LLMTR_API_KEY` |
|
|
64
|
+
| [LMStudio](https://mastra.ai/models/providers/lmstudio) | `lmstudio/*` | `LMSTUDIO_API_KEY` |
|
|
65
|
+
| [LucidQuery](https://mastra.ai/models/providers/lucidquery) | `lucidquery/*` | `LUCIDQUERY_API_KEY` |
|
|
66
|
+
| [Meganova](https://mastra.ai/models/providers/meganova) | `meganova/*` | `MEGANOVA_API_KEY` |
|
|
67
|
+
| [MiniMax (minimax.io)](https://mastra.ai/models/providers/minimax) | `minimax/*` | `MINIMAX_API_KEY` |
|
|
68
|
+
| [MiniMax (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn) | `minimax-cn/*` | `MINIMAX_API_KEY` |
|
|
69
|
+
| [MiniMax Token Plan (minimax.io)](https://mastra.ai/models/providers/minimax-coding-plan) | `minimax-coding-plan/*` | `MINIMAX_API_KEY` |
|
|
70
|
+
| [MiniMax Token Plan (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn-coding-plan) | `minimax-cn-coding-plan/*` | `MINIMAX_API_KEY` |
|
|
71
|
+
| [Mistral](https://mastra.ai/models/providers/mistral) | `mistral/*` | `MISTRAL_API_KEY` |
|
|
72
|
+
| [Mixlayer](https://mastra.ai/models/providers/mixlayer) | `mixlayer/*` | `MIXLAYER_API_KEY` |
|
|
73
|
+
| [Moark](https://mastra.ai/models/providers/moark) | `moark/*` | `MOARK_API_KEY` |
|
|
74
|
+
| [ModelScope](https://mastra.ai/models/providers/modelscope) | `modelscope/*` | `MODELSCOPE_API_KEY` |
|
|
75
|
+
| [Moonshot AI](https://mastra.ai/models/providers/moonshotai) | `moonshotai/*` | `MOONSHOT_API_KEY` |
|
|
76
|
+
| [Moonshot AI (China)](https://mastra.ai/models/providers/moonshotai-cn) | `moonshotai-cn/*` | `MOONSHOT_API_KEY` |
|
|
77
|
+
| [Morph](https://mastra.ai/models/providers/morph) | `morph/*` | `MORPH_API_KEY` |
|
|
78
|
+
| [NanoGPT](https://mastra.ai/models/providers/nano-gpt) | `nano-gpt/*` | `NANO_GPT_API_KEY` |
|
|
79
|
+
| [NEAR AI Cloud](https://mastra.ai/models/providers/nearai) | `nearai/*` | `NEARAI_API_KEY` |
|
|
80
|
+
| [Nebius Token Factory](https://mastra.ai/models/providers/nebius) | `nebius/*` | `NEBIUS_API_KEY` |
|
|
81
|
+
| [Neon](https://mastra.ai/models/providers/neon) | `neon/*` | `NEON_AI_GATEWAY_BASE_URL`, `NEON_AI_GATEWAY_TOKEN` |
|
|
82
|
+
| [Neuralwatt](https://mastra.ai/models/providers/neuralwatt) | `neuralwatt/*` | `NEURALWATT_API_KEY` |
|
|
83
|
+
| [Nova](https://mastra.ai/models/providers/nova) | `nova/*` | `NOVA_API_KEY` |
|
|
84
|
+
| [NovitaAI](https://mastra.ai/models/providers/novita-ai) | `novita-ai/*` | `NOVITA_API_KEY` |
|
|
85
|
+
| [Nvidia](https://mastra.ai/models/providers/nvidia) | `nvidia/*` | `NVIDIA_API_KEY` |
|
|
86
|
+
| [Ollama Cloud](https://mastra.ai/models/providers/ollama-cloud) | `ollama-cloud/*` | `OLLAMA_API_KEY` |
|
|
87
|
+
| [OpenAI](https://mastra.ai/models/providers/openai) | `openai/*` | `OPENAI_API_KEY` |
|
|
88
|
+
| [OpenCode Go](https://mastra.ai/models/providers/opencode-go) | `opencode-go/*` | `OPENCODE_API_KEY` |
|
|
89
|
+
| [OpenCode Zen](https://mastra.ai/models/providers/opencode) | `opencode/*` | `OPENCODE_API_KEY` |
|
|
90
|
+
| [OrcaRouter](https://mastra.ai/models/providers/orcarouter) | `orcarouter/*` | `ORCAROUTER_API_KEY` |
|
|
91
|
+
| [OVHcloud AI Endpoints](https://mastra.ai/models/providers/ovhcloud) | `ovhcloud/*` | `OVHCLOUD_API_KEY` |
|
|
92
|
+
| [Perplexity](https://mastra.ai/models/providers/perplexity) | `perplexity/*` | `PERPLEXITY_API_KEY` |
|
|
93
|
+
| [Perplexity Agent](https://mastra.ai/models/providers/perplexity-agent) | `perplexity-agent/*` | `PERPLEXITY_API_KEY` |
|
|
94
|
+
| [Poe](https://mastra.ai/models/providers/poe) | `poe/*` | `POE_API_KEY` |
|
|
95
|
+
| [Poolside](https://mastra.ai/models/providers/poolside) | `poolside/*` | `POOLSIDE_API_KEY` |
|
|
96
|
+
| [Privatemode AI](https://mastra.ai/models/providers/privatemode-ai) | `privatemode-ai/*` | `PRIVATEMODE_API_KEY` |
|
|
97
|
+
| [QiHang](https://mastra.ai/models/providers/qihang-ai) | `qihang-ai/*` | `QIHANG_API_KEY` |
|
|
98
|
+
| [Qiniu](https://mastra.ai/models/providers/qiniu-ai) | `qiniu-ai/*` | `QINIU_API_KEY` |
|
|
99
|
+
| [Regolo AI](https://mastra.ai/models/providers/regolo-ai) | `regolo-ai/*` | `REGOLO_API_KEY` |
|
|
100
|
+
| [Requesty](https://mastra.ai/models/providers/requesty) | `requesty/*` | `REQUESTY_API_KEY` |
|
|
101
|
+
| [routing.run](https://mastra.ai/models/providers/routing-run) | `routing-run/*` | `ROUTING_RUN_API_KEY` |
|
|
102
|
+
| [Sakana AI](https://mastra.ai/models/providers/sakana) | `sakana/*` | `SAKANA_API_KEY` |
|
|
103
|
+
| [Sarvam AI](https://mastra.ai/models/providers/sarvam) | `sarvam/*` | `SARVAM_API_KEY` |
|
|
104
|
+
| [Scaleway](https://mastra.ai/models/providers/scaleway) | `scaleway/*` | `SCALEWAY_API_KEY` |
|
|
105
|
+
| [SiliconFlow](https://mastra.ai/models/providers/siliconflow) | `siliconflow/*` | `SILICONFLOW_API_KEY` |
|
|
106
|
+
| [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn) | `siliconflow-cn/*` | `SILICONFLOW_CN_API_KEY` |
|
|
107
|
+
| [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex) | `snowflake-cortex/*` | `SNOWFLAKE_ACCOUNT`, `SNOWFLAKE_CORTEX_PAT` |
|
|
108
|
+
| [STACKIT](https://mastra.ai/models/providers/stackit) | `stackit/*` | `STACKIT_API_KEY` |
|
|
109
|
+
| [StepFun](https://mastra.ai/models/providers/stepfun) | `stepfun/*` | `STEPFUN_API_KEY` |
|
|
110
|
+
| [StepFun AI](https://mastra.ai/models/providers/stepfun-ai) | `stepfun-ai/*` | `STEPFUN_API_KEY` |
|
|
111
|
+
| [Subconscious](https://mastra.ai/models/providers/subconscious) | `subconscious/*` | `SUBCONSCIOUS_API_KEY` |
|
|
112
|
+
| [submodel](https://mastra.ai/models/providers/submodel) | `submodel/*` | `SUBMODEL_INSTAGEN_ACCESS_KEY` |
|
|
113
|
+
| [Synthetic](https://mastra.ai/models/providers/synthetic) | `synthetic/*` | `SYNTHETIC_API_KEY` |
|
|
114
|
+
| [Tencent Coding Plan (China)](https://mastra.ai/models/providers/tencent-coding-plan) | `tencent-coding-plan/*` | `TENCENT_CODING_PLAN_API_KEY` |
|
|
115
|
+
| [Tencent TokenHub](https://mastra.ai/models/providers/tencent-tokenhub) | `tencent-tokenhub/*` | `TENCENT_TOKENHUB_API_KEY` |
|
|
116
|
+
| [The Grid AI](https://mastra.ai/models/providers/the-grid-ai) | `the-grid-ai/*` | `THEGRIDAI_API_KEY` |
|
|
117
|
+
| [Tinfoil](https://mastra.ai/models/providers/tinfoil) | `tinfoil/*` | `TINFOIL_API_KEY` |
|
|
118
|
+
| [Together AI](https://mastra.ai/models/providers/togetherai) | `togetherai/*` | `TOGETHER_API_KEY` |
|
|
119
|
+
| [Umans AI](https://mastra.ai/models/providers/umans-ai) | `umans-ai/*` | `UMANS_AI_API_KEY` |
|
|
120
|
+
| [Umans AI Coding Plan](https://mastra.ai/models/providers/umans-ai-coding-plan) | `umans-ai-coding-plan/*` | `UMANS_AI_CODING_PLAN_API_KEY` |
|
|
121
|
+
| [Upstage](https://mastra.ai/models/providers/upstage) | `upstage/*` | `UPSTAGE_API_KEY` |
|
|
122
|
+
| [Vivgrid](https://mastra.ai/models/providers/vivgrid) | `vivgrid/*` | `VIVGRID_API_KEY` |
|
|
123
|
+
| [Vultr](https://mastra.ai/models/providers/vultr) | `vultr/*` | `VULTR_API_KEY` |
|
|
124
|
+
| [Wafer](https://mastra.ai/models/providers/wafer.ai) | `wafer.ai/*` | `WAFER_API_KEY` |
|
|
125
|
+
| [Weights & Biases](https://mastra.ai/models/providers/wandb) | `wandb/*` | `WANDB_API_KEY` |
|
|
126
|
+
| [xAI](https://mastra.ai/models/providers/xai) | `xai/*` | `XAI_API_KEY` |
|
|
127
|
+
| [Xiaomi](https://mastra.ai/models/providers/xiaomi) | `xiaomi/*` | `XIAOMI_API_KEY` |
|
|
128
|
+
| [Xiaomi Token Plan (China)](https://mastra.ai/models/providers/xiaomi-token-plan-cn) | `xiaomi-token-plan-cn/*` | `XIAOMI_API_KEY` |
|
|
129
|
+
| [Xiaomi Token Plan (Europe)](https://mastra.ai/models/providers/xiaomi-token-plan-ams) | `xiaomi-token-plan-ams/*` | `XIAOMI_API_KEY` |
|
|
130
|
+
| [Xiaomi Token Plan (Singapore)](https://mastra.ai/models/providers/xiaomi-token-plan-sgp) | `xiaomi-token-plan-sgp/*` | `XIAOMI_API_KEY` |
|
|
131
|
+
| [Xpersona](https://mastra.ai/models/providers/xpersona) | `xpersona/*` | `XPERSONA_API_KEY` |
|
|
132
|
+
| [Z.AI](https://mastra.ai/models/providers/zai) | `zai/*` | `ZHIPU_API_KEY` |
|
|
133
|
+
| [Z.AI Coding Plan](https://mastra.ai/models/providers/zai-coding-plan) | `zai-coding-plan/*` | `ZHIPU_API_KEY` |
|
|
134
|
+
| [Zeldoc](https://mastra.ai/models/providers/zeldoc) | `zeldoc/*` | `ZELDOC_API_KEY` |
|
|
135
|
+
| [ZenMux](https://mastra.ai/models/providers/zenmux) | `zenmux/*` | `ZENMUX_API_KEY` |
|
|
136
|
+
| [Zhipu AI](https://mastra.ai/models/providers/zhipuai) | `zhipuai/*` | `ZHIPU_API_KEY` |
|
|
137
|
+
| [Zhipu AI Coding Plan](https://mastra.ai/models/providers/zhipuai-coding-plan) | `zhipuai-coding-plan/*` | `ZHIPU_API_KEY` |
|
|
138
|
+
| [Azure OpenAI](https://mastra.ai/models/gateways/azure-openai) (Gateway) | `azure-openai/*` | `AZURE_API_KEY`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID` |
|
|
139
|
+
| [Mastra](https://mastra.ai/models/gateways/mastra) (Gateway) | `mastra/*` | `MASTRA_GATEWAY_API_KEY` |
|
|
140
|
+
| [Netlify](https://mastra.ai/models/gateways/netlify) (Gateway) | `netlify/*` | `NETLIFY_TOKEN`, `NETLIFY_SITE_ID` |
|
|
141
|
+
| [OpenRouter](https://mastra.ai/models/gateways/openrouter) (Gateway) | `openrouter/*` | `OPENROUTER_API_KEY` |
|
|
142
|
+
| [Vercel](https://mastra.ai/models/gateways/vercel) (Gateway) | `vercel/*` | `AI_GATEWAY_API_KEY` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Netlify
|
|
2
2
|
|
|
3
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
3
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 67 models through Mastra's model router.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ const agent = new Agent({
|
|
|
13
13
|
id: "my-agent",
|
|
14
14
|
name: "My Agent",
|
|
15
15
|
instructions: "You are a helpful assistant",
|
|
16
|
-
model: "netlify/anthropic/claude-
|
|
16
|
+
model: "netlify/anthropic/claude-fable-5"
|
|
17
17
|
});
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -35,6 +35,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
35
35
|
|
|
36
36
|
| Model |
|
|
37
37
|
| ------------------------------------------- |
|
|
38
|
+
| `anthropic/claude-fable-5` |
|
|
38
39
|
| `anthropic/claude-haiku-4-5` |
|
|
39
40
|
| `anthropic/claude-haiku-4-5-20251001` |
|
|
40
41
|
| `anthropic/claude-opus-4-1-20250805` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenRouter
|
|
2
2
|
|
|
3
|
-
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
3
|
+
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 337 models through Mastra's model router.
|
|
4
4
|
|
|
5
5
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
6
6
|
|
|
@@ -56,6 +56,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
56
56
|
| `amazon/nova-pro-v1` |
|
|
57
57
|
| `anthracite-org/magnum-v4-72b` |
|
|
58
58
|
| `anthropic/claude-3-haiku` |
|
|
59
|
+
| `anthropic/claude-fable-5` |
|
|
59
60
|
| `anthropic/claude-haiku-4.5` |
|
|
60
61
|
| `anthropic/claude-opus-4` |
|
|
61
62
|
| `anthropic/claude-opus-4.1` |
|
|
@@ -68,6 +69,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
68
69
|
| `anthropic/claude-sonnet-4` |
|
|
69
70
|
| `anthropic/claude-sonnet-4.5` |
|
|
70
71
|
| `anthropic/claude-sonnet-4.6` |
|
|
72
|
+
| `anthropic/claude-sonnet-5` |
|
|
71
73
|
| `arcee-ai/coder-large` |
|
|
72
74
|
| `arcee-ai/trinity-large-thinking` |
|
|
73
75
|
| `arcee-ai/trinity-mini` |
|
|
@@ -109,6 +111,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
109
111
|
| `google/gemini-3.1-flash-image` |
|
|
110
112
|
| `google/gemini-3.1-flash-image-preview` |
|
|
111
113
|
| `google/gemini-3.1-flash-lite` |
|
|
114
|
+
| `google/gemini-3.1-flash-lite-image` |
|
|
112
115
|
| `google/gemini-3.1-flash-lite-preview` |
|
|
113
116
|
| `google/gemini-3.1-pro-preview` |
|
|
114
117
|
| `google/gemini-3.1-pro-preview-customtools` |
|
|
@@ -151,7 +154,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
151
154
|
| `meta-llama/llama-4-scout` |
|
|
152
155
|
| `meta-llama/llama-guard-4-12b` |
|
|
153
156
|
| `microsoft/phi-4` |
|
|
154
|
-
| `microsoft/phi-4-mini-instruct` |
|
|
155
157
|
| `microsoft/wizardlm-2-8x22b` |
|
|
156
158
|
| `minimax/minimax-01` |
|
|
157
159
|
| `minimax/minimax-m1` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vercel
|
|
2
2
|
|
|
3
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
3
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 297 models through Mastra's model router.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
6
6
|
|
|
@@ -73,6 +73,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
73
73
|
| `amazon/nova-pro` |
|
|
74
74
|
| `amazon/titan-embed-text-v2` |
|
|
75
75
|
| `anthropic/claude-3.5-haiku` |
|
|
76
|
+
| `anthropic/claude-fable-5` |
|
|
76
77
|
| `anthropic/claude-haiku-4.5` |
|
|
77
78
|
| `anthropic/claude-opus-4` |
|
|
78
79
|
| `anthropic/claude-opus-4.1` |
|
|
@@ -83,6 +84,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
83
84
|
| `anthropic/claude-sonnet-4` |
|
|
84
85
|
| `anthropic/claude-sonnet-4.5` |
|
|
85
86
|
| `anthropic/claude-sonnet-4.6` |
|
|
87
|
+
| `anthropic/claude-sonnet-5` |
|
|
86
88
|
| `arcee-ai/trinity-large-preview` |
|
|
87
89
|
| `arcee-ai/trinity-large-thinking` |
|
|
88
90
|
| `arcee-ai/trinity-mini` |
|
|
@@ -129,6 +131,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
129
131
|
| `google/gemini-3.1-flash-image` |
|
|
130
132
|
| `google/gemini-3.1-flash-image-preview` |
|
|
131
133
|
| `google/gemini-3.1-flash-lite` |
|
|
134
|
+
| `google/gemini-3.1-flash-lite-image` |
|
|
132
135
|
| `google/gemini-3.1-flash-lite-preview` |
|
|
133
136
|
| `google/gemini-3.1-pro-preview` |
|
|
134
137
|
| `google/gemini-3.5-flash` |
|
package/.docs/models/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Model Providers
|
|
2
2
|
|
|
3
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
3
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4500 models from 136 providers through a single API.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -66,7 +66,7 @@ const agent = new Agent({
|
|
|
66
66
|
id: "my-agent",
|
|
67
67
|
name: "My Agent",
|
|
68
68
|
instructions: "You are a helpful assistant",
|
|
69
|
-
model: "xai/grok-4"
|
|
69
|
+
model: "xai/grok-4.3"
|
|
70
70
|
})
|
|
71
71
|
```
|
|
72
72
|
|
|
@@ -108,7 +108,7 @@ const documentProcessor = new Agent({
|
|
|
108
108
|
id: "document-processor",
|
|
109
109
|
name: "Document Processor",
|
|
110
110
|
instructions: "Extract and summarize key information from documents",
|
|
111
|
-
model: "openai/gpt-
|
|
111
|
+
model: "openai/gpt-5.5"
|
|
112
112
|
})
|
|
113
113
|
|
|
114
114
|
// Use a powerful reasoning model for complex analysis
|
|
@@ -116,7 +116,7 @@ const reasoningAgent = new Agent({
|
|
|
116
116
|
id: "reasoning-agent",
|
|
117
117
|
name: "Reasoning Agent",
|
|
118
118
|
instructions: "Analyze data and provide strategic recommendations",
|
|
119
|
-
model: "anthropic/claude-opus-4-
|
|
119
|
+
model: "anthropic/claude-opus-4-7"
|
|
120
120
|
})
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -158,7 +158,7 @@ const planner = new Agent({
|
|
|
158
158
|
openai: { reasoningEffort: "low" }
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
|
-
model: "openai/
|
|
161
|
+
model: "openai/gpt-5.5",
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
const lowEffort =
|
|
@@ -185,7 +185,7 @@ const agent = new Agent({
|
|
|
185
185
|
id: "custom-agent",
|
|
186
186
|
name: "Custom Agent",
|
|
187
187
|
model: {
|
|
188
|
-
id: "openai/gpt-
|
|
188
|
+
id: "openai/gpt-5.5",
|
|
189
189
|
apiKey: process.env.OPENAI_API_KEY,
|
|
190
190
|
headers: {
|
|
191
191
|
"OpenAI-Organization": "org-abc123"
|
|
@@ -209,11 +209,11 @@ const agent = new Agent({
|
|
|
209
209
|
instructions: 'You are a helpful assistant.',
|
|
210
210
|
model: [
|
|
211
211
|
{
|
|
212
|
-
model: "openai/gpt-5",
|
|
212
|
+
model: "openai/gpt-5.5",
|
|
213
213
|
maxRetries: 3,
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
model: "anthropic/claude-4-
|
|
216
|
+
model: "anthropic/claude-sonnet-4-6",
|
|
217
217
|
maxRetries: 2,
|
|
218
218
|
},
|
|
219
219
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cerebras
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 3 Cerebras models through Mastra's model router. Authentication is handled automatically using the `CEREBRAS_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Cerebras documentation](https://inference-docs.cerebras.ai/models/overview).
|
|
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: "cerebras/
|
|
18
|
+
model: "cerebras/gemma-4-31b"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Generate a response
|
|
@@ -32,6 +32,7 @@ for await (const chunk of stream) {
|
|
|
32
32
|
|
|
33
33
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
34
34
|
| ----------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
35
|
+
| `cerebras/gemma-4-31b` | 131K | | | | | | $0.99 | $1 |
|
|
35
36
|
| `cerebras/gpt-oss-120b` | 131K | | | | | | $0.35 | $0.75 |
|
|
36
37
|
| `cerebras/zai-glm-4.7` | 131K | | | | | | $2 | $3 |
|
|
37
38
|
|
|
@@ -44,7 +45,7 @@ const agent = new Agent({
|
|
|
44
45
|
id: "custom-agent",
|
|
45
46
|
name: "custom-agent",
|
|
46
47
|
model: {
|
|
47
|
-
id: "cerebras/
|
|
48
|
+
id: "cerebras/gemma-4-31b",
|
|
48
49
|
apiKey: process.env.CEREBRAS_API_KEY,
|
|
49
50
|
headers: {
|
|
50
51
|
"X-Custom-Header": "value"
|
|
@@ -63,7 +64,7 @@ const agent = new Agent({
|
|
|
63
64
|
const useAdvanced = requestContext.task === "complex";
|
|
64
65
|
return useAdvanced
|
|
65
66
|
? "cerebras/zai-glm-4.7"
|
|
66
|
-
: "cerebras/
|
|
67
|
+
: "cerebras/gemma-4-31b";
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LLM Gateway
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 179 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
6
6
|
|
|
@@ -49,6 +49,7 @@ for await (const chunk of stream) {
|
|
|
49
49
|
| `llmgateway/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
|
|
50
50
|
| `llmgateway/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
|
|
51
51
|
| `llmgateway/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
52
|
+
| `llmgateway/claude-sonnet-5` | 1.0M | | | | | | $3 | $15 |
|
|
52
53
|
| `llmgateway/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
|
|
53
54
|
| `llmgateway/custom` | 128K | | | | | | — | — |
|
|
54
55
|
| `llmgateway/deepseek-v3.1` | 128K | | | | | | $0.56 | $2 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenCode Zen
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 50 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
6
6
|
|
|
@@ -35,6 +35,7 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `opencode/big-pickle` | 200K | | | | | | — | — |
|
|
38
|
+
| `opencode/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
38
39
|
| `opencode/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
39
40
|
| `opencode/claude-opus-4-1` | 200K | | | | | | $15 | $75 |
|
|
40
41
|
| `opencode/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
|
|
@@ -44,6 +45,7 @@ for await (const chunk of stream) {
|
|
|
44
45
|
| `opencode/claude-sonnet-4` | 1.0M | | | | | | $3 | $15 |
|
|
45
46
|
| `opencode/claude-sonnet-4-5` | 1.0M | | | | | | $3 | $15 |
|
|
46
47
|
| `opencode/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
48
|
+
| `opencode/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
|
|
47
49
|
| `opencode/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
48
50
|
| `opencode/deepseek-v4-flash-free` | 200K | | | | | | — | — |
|
|
49
51
|
| `opencode/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
|
|
@@ -73,9 +75,11 @@ for await (const chunk of stream) {
|
|
|
73
75
|
| `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
74
76
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
75
77
|
| `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
78
|
+
| `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
76
79
|
| `opencode/mimo-v2.5-free` | 200K | | | | | | — | — |
|
|
77
80
|
| `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
78
81
|
| `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
82
|
+
| `opencode/minimax-m3` | 512K | | | | | | $0.30 | $1 |
|
|
79
83
|
| `opencode/nemotron-3-ultra-free` | 1.0M | | | | | | — | — |
|
|
80
84
|
| `opencode/north-mini-code-free` | 256K | | | | | | — | — |
|
|
81
85
|
| `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
|
|
@@ -44,7 +44,7 @@ for await (const chunk of stream) {
|
|
|
44
44
|
| `zhipuai/glm-4.7-flash` | 200K | | | | | | — | — |
|
|
45
45
|
| `zhipuai/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
|
|
46
46
|
| `zhipuai/glm-5` | 205K | | | | | | $1 | $3 |
|
|
47
|
-
| `zhipuai/glm-5.1` | 200K | | | | | | $
|
|
47
|
+
| `zhipuai/glm-5.1` | 200K | | | | | | $1 | $4 |
|
|
48
48
|
| `zhipuai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
49
49
|
| `zhipuai/glm-5v-turbo` | 200K | | | | | | $5 | $22 |
|
|
50
50
|
|
|
@@ -423,9 +423,9 @@ Returns an `AgentThreadSubscription` object with these members:
|
|
|
423
423
|
|
|
424
424
|
## Constructor parameters
|
|
425
425
|
|
|
426
|
-
**id** (`string`): Unique identifier for the agent.
|
|
426
|
+
**id** (`string`): Unique identifier for the agent.
|
|
427
427
|
|
|
428
|
-
**name** (`string`): Display name for the agent.
|
|
428
|
+
**name** (`string`): Display name for the agent.
|
|
429
429
|
|
|
430
430
|
**description** (`string`): Optional description of the agent's purpose and capabilities.
|
|
431
431
|
|
|
@@ -485,6 +485,7 @@ Use `hooks` to run logic around every tool call the agent makes, including assig
|
|
|
485
485
|
import { Agent } from '@mastra/core/agent'
|
|
486
486
|
|
|
487
487
|
export const agent = new Agent({
|
|
488
|
+
id: 'support-agent',
|
|
488
489
|
name: 'support-agent',
|
|
489
490
|
instructions: 'Help users with their questions.',
|
|
490
491
|
model: 'openai/gpt-5.5',
|