@mastra/mcp-docs-server 0.0.0-studio-deploy-20260404182525 → 0.0.0-studio-cli-20260504022012
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/adding-voice.md +18 -17
- package/.docs/docs/agents/background-tasks.md +242 -0
- package/.docs/docs/agents/channels.md +2 -1
- package/.docs/docs/agents/overview.md +4 -0
- package/.docs/docs/agents/processors.md +177 -5
- package/.docs/docs/agents/structured-output.md +66 -1
- package/.docs/docs/agents/supervisor-agents.md +65 -0
- package/.docs/docs/agents/using-tools.md +73 -0
- package/.docs/docs/browser/agent-browser.md +78 -0
- package/.docs/docs/browser/browser-viewer.md +144 -0
- package/.docs/docs/browser/overview.md +168 -0
- package/.docs/docs/browser/stagehand.md +129 -0
- package/.docs/docs/deployment/cloud-providers.md +5 -1
- package/.docs/docs/deployment/mastra-server.md +4 -4
- package/.docs/docs/deployment/monorepo.md +3 -3
- package/.docs/docs/deployment/overview.md +11 -8
- package/.docs/docs/editor/overview.md +290 -0
- package/.docs/docs/editor/prompts.md +134 -0
- package/.docs/docs/editor/tools.md +152 -0
- package/.docs/docs/evals/custom-scorers.md +63 -3
- package/.docs/docs/evals/datasets/overview.md +1 -1
- package/.docs/docs/index.md +2 -2
- package/.docs/docs/mastra-platform/configuration.md +36 -0
- package/.docs/docs/mastra-platform/overview.md +78 -0
- package/.docs/docs/mcp/overview.md +17 -0
- package/.docs/docs/memory/memory-processors.md +3 -3
- package/.docs/docs/memory/message-history.md +8 -2
- package/.docs/docs/memory/observational-memory.md +65 -8
- package/.docs/docs/memory/storage.md +1 -2
- package/.docs/docs/memory/working-memory.md +2 -2
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +2 -2
- package/.docs/docs/observability/overview.md +1 -1
- package/.docs/docs/observability/tracing/bridges/datadog.md +217 -0
- package/.docs/docs/observability/tracing/bridges/otel.md +2 -2
- package/.docs/docs/observability/tracing/exporters/arthur.md +163 -0
- package/.docs/docs/observability/tracing/exporters/cloud.md +135 -63
- package/.docs/docs/observability/tracing/exporters/datadog.md +3 -1
- package/.docs/docs/observability/tracing/exporters/default.md +5 -5
- package/.docs/docs/observability/tracing/exporters/laminar.md +22 -14
- package/.docs/docs/observability/tracing/exporters/langfuse.md +50 -33
- package/.docs/docs/observability/tracing/overview.md +87 -20
- package/.docs/docs/server/custom-adapters.md +5 -5
- package/.docs/docs/server/custom-api-routes.md +3 -3
- package/.docs/docs/server/mastra-client.md +2 -2
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/middleware.md +46 -42
- package/.docs/docs/server/request-context.md +13 -2
- package/.docs/docs/server/server-adapters.md +91 -8
- package/.docs/docs/streaming/background-task-streaming.md +80 -0
- package/.docs/docs/streaming/overview.md +3 -0
- package/.docs/docs/studio/deployment.md +24 -6
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/studio/overview.md +4 -4
- package/.docs/docs/voice/overview.md +74 -5
- package/.docs/docs/voice/speech-to-speech.md +45 -1
- package/.docs/docs/voice/speech-to-text.md +7 -7
- package/.docs/docs/voice/text-to-speech.md +10 -10
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/overview.md +105 -4
- package/.docs/docs/workflows/scheduled-workflows.md +181 -0
- package/.docs/docs/workspace/filesystem.md +64 -6
- package/.docs/docs/workspace/lsp.md +76 -4
- package/.docs/docs/workspace/overview.md +62 -15
- package/.docs/docs/workspace/sandbox.md +3 -1
- package/.docs/docs/workspace/search.md +41 -2
- package/.docs/docs/workspace/skills.md +19 -19
- package/.docs/guides/agent-frameworks/ai-sdk.md +4 -4
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +56 -9
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/deployment/mastra-platform.md +191 -0
- package/.docs/guides/deployment/netlify.md +16 -1
- package/.docs/guides/getting-started/nestjs.md +238 -0
- package/.docs/guides/getting-started/next-js.md +0 -4
- package/.docs/guides/guide/code-review-bot.md +2 -2
- package/.docs/guides/guide/dev-assistant.md +4 -4
- package/.docs/{docs/mcp → guides/guide}/publishing-mcp-server.md +21 -1
- package/.docs/guides/guide/slack-assistant.md +191 -0
- package/.docs/guides/migrations/mastra-cloud.md +368 -0
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +1 -1
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/gateways/azure-openai.md +74 -35
- package/.docs/models/gateways/mastra.md +64 -0
- package/.docs/models/gateways/netlify.md +7 -3
- package/.docs/models/gateways/openrouter.md +28 -12
- package/.docs/models/gateways/vercel.md +22 -2
- package/.docs/models/gateways.md +1 -0
- package/.docs/models/index.md +43 -8
- package/.docs/models/providers/302ai.md +37 -4
- package/.docs/models/providers/abliteration-ai.md +71 -0
- package/.docs/models/providers/alibaba-cn.md +8 -2
- package/.docs/models/providers/alibaba-coding-plan-cn.md +3 -2
- package/.docs/models/providers/alibaba-coding-plan.md +3 -2
- package/.docs/models/providers/alibaba.md +8 -1
- package/.docs/models/providers/anthropic.md +18 -5
- package/.docs/models/providers/baseten.md +3 -1
- package/.docs/models/providers/berget.md +10 -12
- package/.docs/models/providers/chutes.md +4 -2
- package/.docs/models/providers/cloudflare-workers-ai.md +14 -48
- package/.docs/models/providers/cortecs.md +22 -2
- package/.docs/models/providers/deepinfra.md +8 -2
- package/.docs/models/providers/deepseek.md +6 -4
- package/.docs/models/providers/digitalocean.md +133 -0
- package/.docs/models/providers/fireworks-ai.md +6 -1
- package/.docs/models/providers/firmware.md +12 -10
- package/.docs/models/providers/friendli.md +6 -7
- package/.docs/models/providers/google.md +9 -3
- package/.docs/models/providers/helicone.md +1 -2
- package/.docs/models/providers/hpc-ai.md +73 -0
- package/.docs/models/providers/huggingface.md +6 -2
- package/.docs/models/providers/inception.md +9 -11
- package/.docs/models/providers/kilo.md +359 -339
- package/.docs/models/providers/kimi-for-coding.md +2 -1
- package/.docs/models/providers/llmgateway.md +67 -77
- package/.docs/models/providers/mistral.md +3 -2
- package/.docs/models/providers/mixlayer.md +75 -0
- package/.docs/models/providers/moonshotai-cn.md +3 -2
- package/.docs/models/providers/moonshotai.md +3 -2
- package/.docs/models/providers/nano-gpt.md +8 -2
- package/.docs/models/providers/neuralwatt.md +84 -0
- package/.docs/models/providers/novita-ai.md +19 -4
- package/.docs/models/providers/nvidia.md +8 -1
- package/.docs/models/providers/ollama-cloud.md +7 -2
- package/.docs/models/providers/openai.md +7 -2
- package/.docs/models/providers/opencode-go.md +21 -13
- package/.docs/models/providers/opencode.md +11 -4
- package/.docs/models/providers/ovhcloud.md +6 -8
- package/.docs/models/providers/poe.md +10 -15
- package/.docs/models/providers/regolo-ai.md +83 -0
- package/.docs/models/providers/siliconflow-cn.md +5 -2
- package/.docs/models/providers/siliconflow.md +6 -3
- package/.docs/models/providers/stepfun.md +8 -7
- package/.docs/models/providers/synthetic.md +5 -2
- package/.docs/models/providers/tencent-token-plan.md +71 -0
- package/.docs/models/providers/tencent-tokenhub.md +71 -0
- package/.docs/models/providers/togetherai.md +8 -7
- package/.docs/models/providers/vivgrid.md +7 -3
- package/.docs/models/providers/vultr.md +7 -6
- package/.docs/models/providers/wafer.ai.md +73 -0
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xai.md +6 -1
- package/.docs/models/providers/xiaomi-token-plan-ams.md +75 -0
- package/.docs/models/providers/xiaomi-token-plan-cn.md +75 -0
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +75 -0
- package/.docs/models/providers/xiaomi.md +4 -2
- package/.docs/models/providers/zai-coding-plan.md +11 -19
- package/.docs/models/providers/zai.md +2 -1
- package/.docs/models/providers/zenmux.md +17 -6
- package/.docs/models/providers/zhipuai-coding-plan.md +11 -21
- package/.docs/models/providers/zhipuai.md +2 -1
- package/.docs/models/providers.md +11 -0
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/channels.md +3 -3
- package/.docs/reference/agents/generate.md +88 -6
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/ai-sdk/chat-route.md +2 -0
- package/.docs/reference/ai-sdk/handle-chat-stream.md +19 -0
- package/.docs/reference/ai-sdk/handle-network-stream.md +2 -0
- package/.docs/reference/ai-sdk/network-route.md +2 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +95 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +15 -0
- package/.docs/reference/browser/agent-browser.md +375 -0
- package/.docs/reference/browser/browser-viewer.md +228 -0
- package/.docs/reference/browser/mastra-browser.md +286 -0
- package/.docs/reference/browser/stagehand-browser.md +286 -0
- package/.docs/reference/cli/mastra.md +703 -0
- package/.docs/reference/client-js/agents.md +166 -0
- package/.docs/reference/client-js/conversations.md +1 -1
- package/.docs/reference/client-js/mastra-client.md +23 -0
- package/.docs/reference/client-js/observability.md +2 -2
- package/.docs/reference/client-js/responses.md +1 -1
- package/.docs/reference/client-js/workflows.md +62 -1
- package/.docs/reference/configuration.md +67 -1
- package/.docs/reference/core/addGateway.md +5 -5
- package/.docs/reference/core/getEditor.md +35 -0
- package/.docs/reference/core/getGateway.md +5 -5
- package/.docs/reference/core/getGatewayById.md +5 -5
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getScorer.md +3 -3
- package/.docs/reference/core/getScorerById.md +3 -3
- package/.docs/reference/core/listGateways.md +5 -5
- package/.docs/reference/core/listMCPServers.md +2 -2
- package/.docs/reference/core/listScorers.md +3 -3
- package/.docs/reference/core/mastra-class.md +11 -1
- package/.docs/reference/core/mastra-model-gateway.md +5 -5
- package/.docs/reference/datasets/create.md +4 -4
- package/.docs/reference/datasets/startExperiment.md +28 -2
- package/.docs/reference/datasets/update.md +4 -4
- package/.docs/reference/deployer/cloudflare.md +14 -1
- package/.docs/reference/deployer/netlify.md +50 -2
- package/.docs/reference/editor/mastra-editor.md +168 -0
- package/.docs/reference/editor/tool-provider.md +85 -0
- package/.docs/reference/evals/context-precision.md +3 -3
- package/.docs/reference/evals/context-relevance.md +3 -3
- package/.docs/reference/evals/create-scorer.md +5 -3
- package/.docs/reference/evals/filter-run.md +117 -0
- package/.docs/reference/evals/mastra-scorer.md +4 -4
- package/.docs/reference/evals/noise-sensitivity.md +6 -6
- package/.docs/reference/evals/prompt-alignment.md +12 -12
- package/.docs/reference/evals/run-evals.md +6 -6
- package/.docs/reference/evals/scorer-utils.md +3 -3
- package/.docs/reference/evals/trajectory-accuracy.md +3 -3
- package/.docs/reference/harness/harness-class.md +152 -53
- package/.docs/reference/index.md +25 -0
- package/.docs/reference/logging/pino-logger.md +0 -2
- package/.docs/reference/mastra-platform/api.md +108 -0
- package/.docs/reference/memory/clone-utilities.md +4 -2
- package/.docs/reference/memory/cloneThread.md +4 -2
- package/.docs/reference/memory/observational-memory.md +4 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +3 -3
- package/.docs/reference/observability/tracing/bridges/datadog.md +211 -0
- package/.docs/reference/observability/tracing/bridges/otel.md +3 -3
- package/.docs/reference/observability/tracing/configuration.md +18 -11
- package/.docs/reference/observability/tracing/exporters/arthur.md +122 -0
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +102 -21
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +8 -8
- package/.docs/reference/observability/tracing/exporters/datadog.md +3 -1
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +8 -8
- package/.docs/reference/observability/tracing/exporters/langfuse.md +25 -32
- package/.docs/reference/observability/tracing/exporters/otel.md +3 -3
- package/.docs/reference/observability/tracing/instances.md +7 -7
- package/.docs/reference/observability/tracing/interfaces.md +23 -6
- package/.docs/reference/observability/tracing/span-filtering.md +95 -0
- package/.docs/reference/observability/tracing/spans.md +6 -6
- package/.docs/reference/processors/prefill-error-handler.md +70 -0
- package/.docs/reference/processors/processor-interface.md +400 -40
- package/.docs/reference/processors/skill-search-processor.md +20 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +54 -0
- package/.docs/reference/processors/tool-call-filter.md +23 -0
- package/.docs/reference/server/create-route.md +3 -3
- package/.docs/reference/server/express-adapter.md +4 -4
- package/.docs/reference/server/fastify-adapter.md +4 -4
- package/.docs/reference/server/hono-adapter.md +4 -4
- package/.docs/reference/server/koa-adapter.md +4 -4
- package/.docs/reference/server/mastra-server.md +3 -3
- package/.docs/reference/server/nestjs-adapter.md +169 -0
- package/.docs/reference/server/register-api-route.md +4 -4
- package/.docs/reference/server/routes.md +11 -10
- package/.docs/reference/storage/clickhouse.md +300 -0
- package/.docs/reference/storage/cloudflare-d1.md +42 -42
- package/.docs/reference/storage/composite.md +5 -3
- package/.docs/reference/storage/duckdb.md +150 -0
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/redis.md +266 -0
- package/.docs/reference/streaming/ChunkType.md +143 -3
- package/.docs/reference/streaming/agents/MastraModelOutput.md +2 -2
- package/.docs/reference/streaming/agents/stream.md +10 -2
- package/.docs/reference/streaming/agents/streamUntilIdle.md +94 -0
- package/.docs/reference/streaming/workflows/resumeStream.md +2 -0
- package/.docs/reference/templates/overview.md +88 -14
- package/.docs/reference/tools/create-tool.md +107 -5
- package/.docs/reference/tools/mcp-client.md +45 -0
- package/.docs/reference/tools/mcp-server.md +1 -3
- package/.docs/reference/tools/perplexity.md +155 -0
- package/.docs/reference/tools/tavily.md +307 -0
- package/.docs/reference/vectors/mongodb.md +0 -2
- package/.docs/reference/voice/aws-nova-sonic.md +247 -0
- package/.docs/reference/voice/cloudflare.md +3 -3
- package/.docs/reference/voice/sarvam.md +29 -23
- package/.docs/reference/voice/voice.connect.md +4 -4
- package/.docs/reference/voice/voice.listen.md +3 -3
- package/.docs/reference/workflows/run-methods/resume.md +24 -0
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/step.md +88 -7
- package/.docs/reference/workflows/workflow-methods/foreach.md +14 -1
- package/.docs/reference/workflows/workflow.md +88 -4
- package/.docs/reference/workspace/azure-blob-filesystem.md +219 -0
- package/.docs/reference/workspace/docker-sandbox.md +196 -0
- package/.docs/reference/workspace/gcs-filesystem.md +1 -0
- package/.docs/reference/workspace/google-drive-filesystem.md +185 -0
- package/.docs/reference/workspace/modal-sandbox.md +168 -0
- package/.docs/reference/workspace/process-manager.md +1 -1
- package/.docs/reference/workspace/s3-filesystem.md +80 -5
- package/.docs/reference/workspace/vercel.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +37 -6
- package/CHANGELOG.md +500 -4
- package/dist/stdio.js.map +1 -1
- package/dist/utils.d.ts +1 -4
- package/dist/utils.d.ts.map +1 -1
- package/package.json +11 -11
- package/.docs/docs/mastra-cloud/deployment.md +0 -77
- package/.docs/docs/mastra-cloud/observability.md +0 -38
- package/.docs/docs/mastra-cloud/overview.md +0 -23
- package/.docs/docs/mastra-cloud/setup.md +0 -42
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SiliconFlow
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 74 SiliconFlow models through Mastra's model router. Authentication is handled automatically using the `SILICONFLOW_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [SiliconFlow documentation](https://cloud.siliconflow.com/models).
|
|
6
6
|
|
|
@@ -54,7 +54,8 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `siliconflow/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $0.58 | $2 |
|
|
55
55
|
| `siliconflow/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $0.40 | $2 |
|
|
56
56
|
| `siliconflow/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $3 |
|
|
57
|
-
| `siliconflow/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.
|
|
57
|
+
| `siliconflow/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.45 | $2 |
|
|
58
|
+
| `siliconflow/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
|
|
58
59
|
| `siliconflow/nex-agi/DeepSeek-V3.1-Nex-N1` | 131K | | | | | | $0.50 | $2 |
|
|
59
60
|
| `siliconflow/openai/gpt-oss-120b` | 131K | | | | | | $0.05 | $0.45 |
|
|
60
61
|
| `siliconflow/openai/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.18 |
|
|
@@ -105,6 +106,8 @@ for await (const chunk of stream) {
|
|
|
105
106
|
| `siliconflow/zai-org/GLM-4.6V` | 131K | | | | | | $0.30 | $0.90 |
|
|
106
107
|
| `siliconflow/zai-org/GLM-4.7` | 205K | | | | | | $0.60 | $2 |
|
|
107
108
|
| `siliconflow/zai-org/GLM-5` | 205K | | | | | | $1 | $3 |
|
|
109
|
+
| `siliconflow/zai-org/GLM-5.1` | 205K | | | | | | $1 | $4 |
|
|
110
|
+
| `siliconflow/zai-org/GLM-5V-Turbo` | 200K | | | | | | $1 | $4 |
|
|
108
111
|
|
|
109
112
|
## Advanced configuration
|
|
110
113
|
|
|
@@ -134,7 +137,7 @@ const agent = new Agent({
|
|
|
134
137
|
model: ({ requestContext }) => {
|
|
135
138
|
const useAdvanced = requestContext.task === "complex";
|
|
136
139
|
return useAdvanced
|
|
137
|
-
? "siliconflow/zai-org/GLM-
|
|
140
|
+
? "siliconflow/zai-org/GLM-5V-Turbo"
|
|
138
141
|
: "siliconflow/ByteDance-Seed/Seed-OSS-36B-Instruct";
|
|
139
142
|
}
|
|
140
143
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# StepFun
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 4 StepFun models through Mastra's model router. Authentication is handled automatically using the `STEPFUN_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [StepFun documentation](https://platform.stepfun.com/docs/zh/overview/concept).
|
|
6
6
|
|
|
@@ -32,11 +32,12 @@ for await (const chunk of stream) {
|
|
|
32
32
|
|
|
33
33
|
## Models
|
|
34
34
|
|
|
35
|
-
| Model
|
|
36
|
-
|
|
|
37
|
-
| `stepfun/step-1-32k`
|
|
38
|
-
| `stepfun/step-2-16k`
|
|
39
|
-
| `stepfun/step-3.5-flash`
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ----------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `stepfun/step-1-32k` | 33K | | | | | | $2 | $10 |
|
|
38
|
+
| `stepfun/step-2-16k` | 16K | | | | | | $5 | $16 |
|
|
39
|
+
| `stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.29 |
|
|
40
|
+
| `stepfun/step-3.5-flash-2603` | 256K | | | | | | $0.10 | $0.30 |
|
|
40
41
|
|
|
41
42
|
## Advanced configuration
|
|
42
43
|
|
|
@@ -66,7 +67,7 @@ const agent = new Agent({
|
|
|
66
67
|
model: ({ requestContext }) => {
|
|
67
68
|
const useAdvanced = requestContext.task === "complex";
|
|
68
69
|
return useAdvanced
|
|
69
|
-
? "stepfun/step-3.5-flash"
|
|
70
|
+
? "stepfun/step-3.5-flash-2603"
|
|
70
71
|
: "stepfun/step-1-32k";
|
|
71
72
|
}
|
|
72
73
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Synthetic
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 32 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Synthetic documentation](https://synthetic.new/pricing).
|
|
6
6
|
|
|
@@ -54,6 +54,7 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `synthetic/hf:moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.55 | $2 |
|
|
55
55
|
| `synthetic/hf:moonshotai/Kimi-K2.5` | 262K | | | | | | $0.55 | $2 |
|
|
56
56
|
| `synthetic/hf:nvidia/Kimi-K2.5-NVFP4` | 262K | | | | | | $0.55 | $2 |
|
|
57
|
+
| `synthetic/hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4` | 262K | | | | | | $0.30 | $1 |
|
|
57
58
|
| `synthetic/hf:openai/gpt-oss-120b` | 128K | | | | | | $0.10 | $0.10 |
|
|
58
59
|
| `synthetic/hf:Qwen/Qwen2.5-Coder-32B-Instruct` | 33K | | | | | | $0.80 | $0.80 |
|
|
59
60
|
| `synthetic/hf:Qwen/Qwen3-235B-A22B-Instruct-2507` | 256K | | | | | | $0.20 | $0.60 |
|
|
@@ -63,6 +64,8 @@ for await (const chunk of stream) {
|
|
|
63
64
|
| `synthetic/hf:zai-org/GLM-4.6` | 200K | | | | | | $0.55 | $2 |
|
|
64
65
|
| `synthetic/hf:zai-org/GLM-4.7` | 200K | | | | | | $0.55 | $2 |
|
|
65
66
|
| `synthetic/hf:zai-org/GLM-4.7-Flash` | 197K | | | | | | $0.06 | $0.40 |
|
|
67
|
+
| `synthetic/hf:zai-org/GLM-5` | 197K | | | | | | $1 | $3 |
|
|
68
|
+
| `synthetic/hf:zai-org/GLM-5.1` | 197K | | | | | | $1 | $3 |
|
|
66
69
|
|
|
67
70
|
## Advanced configuration
|
|
68
71
|
|
|
@@ -92,7 +95,7 @@ const agent = new Agent({
|
|
|
92
95
|
model: ({ requestContext }) => {
|
|
93
96
|
const useAdvanced = requestContext.task === "complex";
|
|
94
97
|
return useAdvanced
|
|
95
|
-
? "synthetic/hf:zai-org/GLM-
|
|
98
|
+
? "synthetic/hf:zai-org/GLM-5.1"
|
|
96
99
|
: "synthetic/hf:MiniMaxAI/MiniMax-M2";
|
|
97
100
|
}
|
|
98
101
|
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Tencent Token Plan
|
|
2
|
+
|
|
3
|
+
Access 1 Tencent Token Plan model through Mastra's model router. Authentication is handled automatically using the `TENCENT_TOKEN_PLAN_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Tencent Token Plan documentation](https://cloud.tencent.com/document/product/1823/130060).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
TENCENT_TOKEN_PLAN_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "tencent-token-plan/hy3-preview"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Tencent Token Plan documentation](https://cloud.tencent.com/document/product/1823/130060) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `tencent-token-plan/hy3-preview` | 256K | | | | | | — | — |
|
|
38
|
+
|
|
39
|
+
## Advanced configuration
|
|
40
|
+
|
|
41
|
+
### Custom headers
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
const agent = new Agent({
|
|
45
|
+
id: "custom-agent",
|
|
46
|
+
name: "custom-agent",
|
|
47
|
+
model: {
|
|
48
|
+
url: "https://api.lkeap.cloud.tencent.com/plan/v3",
|
|
49
|
+
id: "tencent-token-plan/hy3-preview",
|
|
50
|
+
apiKey: process.env.TENCENT_TOKEN_PLAN_API_KEY,
|
|
51
|
+
headers: {
|
|
52
|
+
"X-Custom-Header": "value"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Dynamic model selection
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const agent = new Agent({
|
|
62
|
+
id: "dynamic-agent",
|
|
63
|
+
name: "Dynamic Agent",
|
|
64
|
+
model: ({ requestContext }) => {
|
|
65
|
+
const useAdvanced = requestContext.task === "complex";
|
|
66
|
+
return useAdvanced
|
|
67
|
+
? "tencent-token-plan/hy3-preview"
|
|
68
|
+
: "tencent-token-plan/hy3-preview";
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Tencent TokenHub
|
|
2
|
+
|
|
3
|
+
Access 1 Tencent TokenHub model through Mastra's model router. Authentication is handled automatically using the `TENCENT_TOKENHUB_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Tencent TokenHub documentation](https://cloud.tencent.com/document/product/1823/130050).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
TENCENT_TOKENHUB_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "tencent-tokenhub/hy3-preview"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Tencent TokenHub documentation](https://cloud.tencent.com/document/product/1823/130050) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `tencent-tokenhub/hy3-preview` | 256K | | | | | | — | — |
|
|
38
|
+
|
|
39
|
+
## Advanced configuration
|
|
40
|
+
|
|
41
|
+
### Custom headers
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
const agent = new Agent({
|
|
45
|
+
id: "custom-agent",
|
|
46
|
+
name: "custom-agent",
|
|
47
|
+
model: {
|
|
48
|
+
url: "https://tokenhub.tencentmaas.com/v1",
|
|
49
|
+
id: "tencent-tokenhub/hy3-preview",
|
|
50
|
+
apiKey: process.env.TENCENT_TOKENHUB_API_KEY,
|
|
51
|
+
headers: {
|
|
52
|
+
"X-Custom-Header": "value"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Dynamic model selection
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const agent = new Agent({
|
|
62
|
+
id: "dynamic-agent",
|
|
63
|
+
name: "Dynamic Agent",
|
|
64
|
+
model: ({ requestContext }) => {
|
|
65
|
+
const useAdvanced = requestContext.task === "complex";
|
|
66
|
+
return useAdvanced
|
|
67
|
+
? "tencent-tokenhub/hy3-preview"
|
|
68
|
+
: "tencent-tokenhub/hy3-preview";
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Together AI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 18 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
|
|
6
6
|
|
|
@@ -35,20 +35,21 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| `togetherai/deepseek-ai/DeepSeek-R1` | 164K | | | | | | $3 | $7 |
|
|
36
36
|
| `togetherai/deepseek-ai/DeepSeek-V3` | 131K | | | | | | $1 | $1 |
|
|
37
37
|
| `togetherai/deepseek-ai/DeepSeek-V3-1` | 131K | | | | | | $0.60 | $2 |
|
|
38
|
+
| `togetherai/deepseek-ai/DeepSeek-V4-Pro` | 512K | | | | | | $2 | $4 |
|
|
38
39
|
| `togetherai/essentialai/Rnj-1-Instruct` | 33K | | | | | | $0.15 | $0.15 |
|
|
40
|
+
| `togetherai/google/gemma-4-31B-it` | 262K | | | | | | $0.20 | $0.50 |
|
|
39
41
|
| `togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131K | | | | | | $0.88 | $0.88 |
|
|
40
42
|
| `togetherai/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
|
|
41
|
-
| `togetherai/
|
|
43
|
+
| `togetherai/MiniMaxAI/MiniMax-M2.7` | 203K | | | | | | $0.30 | $1 |
|
|
42
44
|
| `togetherai/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
|
|
45
|
+
| `togetherai/moonshotai/Kimi-K2.6` | 262K | | | | | | $1 | $5 |
|
|
43
46
|
| `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
44
47
|
| `togetherai/Qwen/Qwen3-235B-A22B-Instruct-2507-tput` | 262K | | | | | | $0.20 | $0.60 |
|
|
45
48
|
| `togetherai/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` | 262K | | | | | | $2 | $2 |
|
|
46
49
|
| `togetherai/Qwen/Qwen3-Coder-Next-FP8` | 262K | | | | | | $0.50 | $1 |
|
|
47
|
-
| `togetherai/Qwen/Qwen3-Next-80B-A3B-Instruct` | 262K | | | | | | $0.15 | $2 |
|
|
48
50
|
| `togetherai/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $4 |
|
|
49
|
-
| `togetherai/
|
|
50
|
-
| `togetherai/zai-org/GLM-
|
|
51
|
-
| `togetherai/zai-org/GLM-5` | 203K | | | | | | $1 | $3 |
|
|
51
|
+
| `togetherai/Qwen/Qwen3.6-Plus` | 1.0M | | | | | | $0.50 | $3 |
|
|
52
|
+
| `togetherai/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
|
|
52
53
|
|
|
53
54
|
## Advanced configuration
|
|
54
55
|
|
|
@@ -77,7 +78,7 @@ const agent = new Agent({
|
|
|
77
78
|
model: ({ requestContext }) => {
|
|
78
79
|
const useAdvanced = requestContext.task === "complex";
|
|
79
80
|
return useAdvanced
|
|
80
|
-
? "togetherai/zai-org/GLM-5"
|
|
81
|
+
? "togetherai/zai-org/GLM-5.1"
|
|
81
82
|
: "togetherai/MiniMaxAI/MiniMax-M2.5";
|
|
82
83
|
}
|
|
83
84
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vivgrid
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 13 Vivgrid models through Mastra's model router. Authentication is handled automatically using the `VIVGRID_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Vivgrid documentation](https://docs.vivgrid.com/models).
|
|
6
6
|
|
|
@@ -35,14 +35,18 @@ for await (const chunk of stream) {
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `vivgrid/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.42 |
|
|
38
|
+
| `vivgrid/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
38
39
|
| `vivgrid/gemini-3.1-flash-lite-preview` | 1.0M | | | | | | $0.25 | $2 |
|
|
39
40
|
| `vivgrid/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
40
|
-
| `vivgrid/glm-5` | 203K | | | | | | $1 | $3 |
|
|
41
41
|
| `vivgrid/gpt-5-mini` | 272K | | | | | | $0.25 | $2 |
|
|
42
42
|
| `vivgrid/gpt-5.1-codex` | 400K | | | | | | $1 | $10 |
|
|
43
43
|
| `vivgrid/gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 |
|
|
44
44
|
| `vivgrid/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
|
|
45
|
+
| `vivgrid/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
45
46
|
| `vivgrid/gpt-5.4` | 400K | | | | | | $3 | $15 |
|
|
47
|
+
| `vivgrid/gpt-5.4-mini` | 400K | | | | | | $0.75 | $5 |
|
|
48
|
+
| `vivgrid/gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
49
|
+
| `vivgrid/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
46
50
|
|
|
47
51
|
## Advanced configuration
|
|
48
52
|
|
|
@@ -72,7 +76,7 @@ const agent = new Agent({
|
|
|
72
76
|
model: ({ requestContext }) => {
|
|
73
77
|
const useAdvanced = requestContext.task === "complex";
|
|
74
78
|
return useAdvanced
|
|
75
|
-
? "vivgrid/gpt-5.
|
|
79
|
+
? "vivgrid/gpt-5.5"
|
|
76
80
|
: "vivgrid/deepseek-v3.2";
|
|
77
81
|
}
|
|
78
82
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vultr
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 5 Vultr models through Mastra's model router. Authentication is handled automatically using the `VULTR_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Vultr documentation](https://api.vultrinference.com/).
|
|
6
6
|
|
|
@@ -34,10 +34,11 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
36
|
| --------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
-
| `vultr/DeepSeek-V3.2` |
|
|
38
|
-
| `vultr/GLM-5-FP8` |
|
|
39
|
-
| `vultr/
|
|
40
|
-
| `vultr/
|
|
37
|
+
| `vultr/DeepSeek-V3.2` | 127K | | | | | | $0.55 | $2 |
|
|
38
|
+
| `vultr/GLM-5-FP8` | 200K | | | | | | $0.85 | $3 |
|
|
39
|
+
| `vultr/gpt-oss-120b` | 129K | | | | | | $0.15 | $0.60 |
|
|
40
|
+
| `vultr/Kimi-K2.5` | 254K | | | | | | $0.55 | $3 |
|
|
41
|
+
| `vultr/MiniMax-M2.5` | 194K | | | | | | $0.30 | $1 |
|
|
41
42
|
|
|
42
43
|
## Advanced configuration
|
|
43
44
|
|
|
@@ -67,7 +68,7 @@ const agent = new Agent({
|
|
|
67
68
|
model: ({ requestContext }) => {
|
|
68
69
|
const useAdvanced = requestContext.task === "complex";
|
|
69
70
|
return useAdvanced
|
|
70
|
-
? "vultr/
|
|
71
|
+
? "vultr/gpt-oss-120b"
|
|
71
72
|
: "vultr/DeepSeek-V3.2";
|
|
72
73
|
}
|
|
73
74
|
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Wafer
|
|
2
|
+
|
|
3
|
+
Access 3 Wafer models through Mastra's model router. Authentication is handled automatically using the `WAFER_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Wafer documentation](https://docs.wafer.ai/wafer-pass).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
WAFER_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "wafer.ai/DeepSeek-V4-Pro"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Wafer documentation](https://docs.wafer.ai/wafer-pass) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ---------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `wafer.ai/DeepSeek-V4-Pro` | 1.0M | | | | | | — | — |
|
|
38
|
+
| `wafer.ai/GLM-5.1` | 203K | | | | | | — | — |
|
|
39
|
+
| `wafer.ai/Qwen3.5-397B-A17B` | 262K | | | | | | — | — |
|
|
40
|
+
|
|
41
|
+
## Advanced configuration
|
|
42
|
+
|
|
43
|
+
### Custom headers
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const agent = new Agent({
|
|
47
|
+
id: "custom-agent",
|
|
48
|
+
name: "custom-agent",
|
|
49
|
+
model: {
|
|
50
|
+
url: "https://pass.wafer.ai/v1",
|
|
51
|
+
id: "wafer.ai/DeepSeek-V4-Pro",
|
|
52
|
+
apiKey: process.env.WAFER_API_KEY,
|
|
53
|
+
headers: {
|
|
54
|
+
"X-Custom-Header": "value"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Dynamic model selection
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
const agent = new Agent({
|
|
64
|
+
id: "dynamic-agent",
|
|
65
|
+
name: "Dynamic Agent",
|
|
66
|
+
model: ({ requestContext }) => {
|
|
67
|
+
const useAdvanced = requestContext.task === "complex";
|
|
68
|
+
return useAdvanced
|
|
69
|
+
? "wafer.ai/Qwen3.5-397B-A17B"
|
|
70
|
+
: "wafer.ai/DeepSeek-V4-Pro";
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Weights & Biases
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 18 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
|
|
6
6
|
|
|
@@ -51,6 +51,7 @@ for await (const chunk of stream) {
|
|
|
51
51
|
| `wandb/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
|
|
52
52
|
| `wandb/Qwen/Qwen3-Coder-480B-A35B-Instruct` | 262K | | | | | | $1 | $2 |
|
|
53
53
|
| `wandb/zai-org/GLM-5-FP8` | 200K | | | | | | $1 | $3 |
|
|
54
|
+
| `wandb/zai-org/GLM-5.1` | 200K | | | | | | $1 | $4 |
|
|
54
55
|
|
|
55
56
|
## Advanced configuration
|
|
56
57
|
|
|
@@ -80,7 +81,7 @@ const agent = new Agent({
|
|
|
80
81
|
model: ({ requestContext }) => {
|
|
81
82
|
const useAdvanced = requestContext.task === "complex";
|
|
82
83
|
return useAdvanced
|
|
83
|
-
? "wandb/zai-org/GLM-5
|
|
84
|
+
? "wandb/zai-org/GLM-5.1"
|
|
84
85
|
: "wandb/MiniMaxAI/MiniMax-M2.5";
|
|
85
86
|
}
|
|
86
87
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# xAI
|
|
2
2
|
|
|
3
|
-
Access
|
|
3
|
+
Access 26 xAI models through Mastra's model router. Authentication is handled automatically using the `XAI_API_KEY` environment variable.
|
|
4
4
|
|
|
5
5
|
Learn more in the [xAI documentation](https://docs.x.ai/docs/models).
|
|
6
6
|
|
|
@@ -54,6 +54,7 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `xai/grok-4.20-0309-non-reasoning` | 2.0M | | | | | | $2 | $6 |
|
|
55
55
|
| `xai/grok-4.20-0309-reasoning` | 2.0M | | | | | | $2 | $6 |
|
|
56
56
|
| `xai/grok-4.20-multi-agent-0309` | 2.0M | | | | | | $2 | $6 |
|
|
57
|
+
| `xai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
57
58
|
| `xai/grok-beta` | 131K | | | | | | $5 | $15 |
|
|
58
59
|
| `xai/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
|
|
59
60
|
| `xai/grok-vision-beta` | 8K | | | | | | $5 | $15 |
|
|
@@ -109,6 +110,10 @@ const response = await agent.generate("Hello!", {
|
|
|
109
110
|
|
|
110
111
|
**reasoningEffort** (`"low" | "high" | undefined`)
|
|
111
112
|
|
|
113
|
+
**logprobs** (`boolean | undefined`)
|
|
114
|
+
|
|
115
|
+
**topLogprobs** (`number | undefined`)
|
|
116
|
+
|
|
112
117
|
**parallel\_function\_calling** (`boolean | undefined`)
|
|
113
118
|
|
|
114
119
|
**searchParameters** (`{ mode: "off" | "auto" | "on"; returnCitations?: boolean | undefined; fromDate?: string | undefined; toDate?: string | undefined; maxSearchResults?: number | undefined; sources?: ({ ...; } | ... 2 more ... | { ...; })[] | undefined; } | undefined`)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Xiaomi Token Plan (Europe)
|
|
2
|
+
|
|
3
|
+
Access 5 Xiaomi Token Plan (Europe) models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Xiaomi Token Plan (Europe) documentation](https://platform.xiaomimimo.com/#/docs).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
XIAOMI_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "xiaomi-token-plan-ams/mimo-v2-omni"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Xiaomi Token Plan (Europe) documentation](https://platform.xiaomimimo.com/#/docs) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `xiaomi-token-plan-ams/mimo-v2-omni` | 256K | | | | | | — | — |
|
|
38
|
+
| `xiaomi-token-plan-ams/mimo-v2-pro` | 1.0M | | | | | | — | — |
|
|
39
|
+
| `xiaomi-token-plan-ams/mimo-v2-tts` | 8K | | | | | | — | — |
|
|
40
|
+
| `xiaomi-token-plan-ams/mimo-v2.5` | 1.0M | | | | | | — | — |
|
|
41
|
+
| `xiaomi-token-plan-ams/mimo-v2.5-pro` | 1.0M | | | | | | — | — |
|
|
42
|
+
|
|
43
|
+
## Advanced configuration
|
|
44
|
+
|
|
45
|
+
### Custom headers
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const agent = new Agent({
|
|
49
|
+
id: "custom-agent",
|
|
50
|
+
name: "custom-agent",
|
|
51
|
+
model: {
|
|
52
|
+
url: "https://token-plan-ams.xiaomimimo.com/v1",
|
|
53
|
+
id: "xiaomi-token-plan-ams/mimo-v2-omni",
|
|
54
|
+
apiKey: process.env.XIAOMI_API_KEY,
|
|
55
|
+
headers: {
|
|
56
|
+
"X-Custom-Header": "value"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Dynamic model selection
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const agent = new Agent({
|
|
66
|
+
id: "dynamic-agent",
|
|
67
|
+
name: "Dynamic Agent",
|
|
68
|
+
model: ({ requestContext }) => {
|
|
69
|
+
const useAdvanced = requestContext.task === "complex";
|
|
70
|
+
return useAdvanced
|
|
71
|
+
? "xiaomi-token-plan-ams/mimo-v2.5-pro"
|
|
72
|
+
: "xiaomi-token-plan-ams/mimo-v2-omni";
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Xiaomi Token Plan (China)
|
|
2
|
+
|
|
3
|
+
Access 5 Xiaomi Token Plan (China) models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Xiaomi Token Plan (China) documentation](https://platform.xiaomimimo.com/#/docs).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
XIAOMI_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "xiaomi-token-plan-cn/mimo-v2-omni"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Xiaomi Token Plan (China) documentation](https://platform.xiaomimimo.com/#/docs) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `xiaomi-token-plan-cn/mimo-v2-omni` | 256K | | | | | | — | — |
|
|
38
|
+
| `xiaomi-token-plan-cn/mimo-v2-pro` | 1.0M | | | | | | — | — |
|
|
39
|
+
| `xiaomi-token-plan-cn/mimo-v2-tts` | 8K | | | | | | — | — |
|
|
40
|
+
| `xiaomi-token-plan-cn/mimo-v2.5` | 1.0M | | | | | | — | — |
|
|
41
|
+
| `xiaomi-token-plan-cn/mimo-v2.5-pro` | 1.0M | | | | | | — | — |
|
|
42
|
+
|
|
43
|
+
## Advanced configuration
|
|
44
|
+
|
|
45
|
+
### Custom headers
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const agent = new Agent({
|
|
49
|
+
id: "custom-agent",
|
|
50
|
+
name: "custom-agent",
|
|
51
|
+
model: {
|
|
52
|
+
url: "https://token-plan-cn.xiaomimimo.com/v1",
|
|
53
|
+
id: "xiaomi-token-plan-cn/mimo-v2-omni",
|
|
54
|
+
apiKey: process.env.XIAOMI_API_KEY,
|
|
55
|
+
headers: {
|
|
56
|
+
"X-Custom-Header": "value"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Dynamic model selection
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const agent = new Agent({
|
|
66
|
+
id: "dynamic-agent",
|
|
67
|
+
name: "Dynamic Agent",
|
|
68
|
+
model: ({ requestContext }) => {
|
|
69
|
+
const useAdvanced = requestContext.task === "complex";
|
|
70
|
+
return useAdvanced
|
|
71
|
+
? "xiaomi-token-plan-cn/mimo-v2.5-pro"
|
|
72
|
+
: "xiaomi-token-plan-cn/mimo-v2-omni";
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|