@mastra/mcp-docs-server 1.2.11-alpha.1 → 1.2.11-alpha.4
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/channels.md +109 -0
- package/.docs/docs/capabilities/channels/overview.md +1 -0
- package/.docs/docs/deployment/cloud-providers.md +1 -0
- package/.docs/docs/deployment/overview.md +1 -0
- package/.docs/docs/mastra-platform/overview.md +4 -2
- package/.docs/docs/mastra-platform/trace-intelligence.md +123 -0
- package/.docs/docs/rag/vector-databases.md +17 -0
- package/.docs/docs/voice/overview.md +5 -0
- package/.docs/docs/voice/{livekit.md → realtime-voice.md} +5 -3
- package/.docs/docs/workspace/filesystem.md +1 -0
- package/.docs/docs/workspace/sandbox.md +5 -0
- package/.docs/guides/deployment/kubernetes.md +298 -0
- package/.docs/guides/deployment/netlify.md +1 -1
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/openrouter.md +2 -2
- package/.docs/models/gateways/vercel.md +8 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +6 -5
- package/.docs/models/providers/aiand.md +2 -1
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anthropic.md +1 -1
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/baseten.md +5 -4
- package/.docs/models/providers/crof.md +2 -1
- package/.docs/models/providers/deepinfra.md +5 -4
- package/.docs/models/providers/digitalocean.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +4 -2
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/hyper.md +92 -0
- package/.docs/models/providers/llmgateway.md +7 -5
- package/.docs/models/providers/mistral.md +1 -1
- package/.docs/models/providers/nebius.md +2 -1
- package/.docs/models/providers/nvidia.md +23 -9
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/openai.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +3 -2
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/synthetic.md +2 -1
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/wandb.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -4
- package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -4
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -4
- package/.docs/models/providers/xiaomi.md +4 -4
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agents/channels.md +10 -0
- package/.docs/reference/evals/mastra-scorer.md +56 -0
- package/.docs/reference/storage/duckdb.md +4 -0
- package/.docs/reference/vectors/mongodb.md +185 -4
- package/.docs/reference/voice/livekit.md +3 -3
- package/CHANGELOG.md +14 -0
- package/dist/index.js +2 -3
- package/dist/src-BZcgzbk9.js +1774 -0
- package/dist/src-BZcgzbk9.js.map +1 -0
- package/dist/stdio.js +28 -30
- package/dist/stdio.js.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-GLPCVXXO.js +0 -2075
- package/dist/chunk-GLPCVXXO.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Hugging Face
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 53 Hugging Face models through Mastra's model router. Authentication is handled automatically using the `HF_TOKEN` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Hugging Face documentation](https://huggingface.co).
|
|
8
8
|
|
|
@@ -55,6 +55,7 @@ for await (const chunk of stream) {
|
|
|
55
55
|
| `huggingface/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
56
56
|
| `huggingface/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
|
|
57
57
|
| `huggingface/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
58
|
+
| `huggingface/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
58
59
|
| `huggingface/openai/gpt-oss-120b` | 131K | | | | | | $0.25 | $0.69 |
|
|
59
60
|
| `huggingface/openai/gpt-oss-20b` | 131K | | | | | | $0.10 | $0.50 |
|
|
60
61
|
| `huggingface/Qwen/Qwen3-235B-A22B` | 41K | | | | | | $0.20 | $0.80 |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Charm Hyper
|
|
4
|
+
|
|
5
|
+
Access 20 Charm Hyper models through Mastra's model router. Authentication is handled automatically using the `HYPER_API_KEY` environment variable.
|
|
6
|
+
|
|
7
|
+
Learn more in the [Charm Hyper documentation](https://hyper.charm.land).
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
HYPER_API_KEY=your-api-key
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
|
+
|
|
16
|
+
const agent = new Agent({
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "hyper/deepseek-v4-flash"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Generate a response
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
|
+
|
|
26
|
+
// Stream a response
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
|
+
for await (const chunk of stream) {
|
|
29
|
+
console.log(chunk);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Charm Hyper documentation](https://hyper.charm.land) for details.
|
|
34
|
+
|
|
35
|
+
## Models
|
|
36
|
+
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `hyper/deepseek-v4-flash` | 1.0M | | | | | | $0.20 | $0.40 |
|
|
40
|
+
| `hyper/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
|
|
41
|
+
| `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.11 | $0.40 |
|
|
42
|
+
| `hyper/glm-5` | 203K | | | | | | $0.91 | $3 |
|
|
43
|
+
| `hyper/glm-5.1` | 203K | | | | | | $2 | $5 |
|
|
44
|
+
| `hyper/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
45
|
+
| `hyper/gpt-oss-120b` | 131K | | | | | | $0.18 | $0.68 |
|
|
46
|
+
| `hyper/kimi-k2.5` | 262K | | | | | | $0.53 | $3 |
|
|
47
|
+
| `hyper/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
48
|
+
| `hyper/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
49
|
+
| `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.61 | $1 |
|
|
50
|
+
| `hyper/llama-4-maverick-17b-128e-instruct-fp8` | 430K | | | | | | $0.27 | $0.92 |
|
|
51
|
+
| `hyper/minimax-m2.7` | 205K | | | | | | $0.42 | $2 |
|
|
52
|
+
| `hyper/qwen3-coder-480b-a35b-instruct-int4-mixed-ar` | 106K | | | | | | $0.60 | $2 |
|
|
53
|
+
| `hyper/qwen3-next-80b-a3b-instruct` | 262K | | | | | | $0.12 | $1 |
|
|
54
|
+
| `hyper/qwen3.6-flash` | 1.0M | | | | | | $1 | $4 |
|
|
55
|
+
| `hyper/qwen3.6-max` | 256K | | | | | | $2 | $12 |
|
|
56
|
+
| `hyper/qwen3.6-plus` | 1.0M | | | | | | $2 | $6 |
|
|
57
|
+
| `hyper/qwen3.7-max` | 1.0M | | | | | | $3 | $8 |
|
|
58
|
+
| `hyper/qwen3.7-plus` | 1.0M | | | | | | $1 | $5 |
|
|
59
|
+
|
|
60
|
+
## Advanced configuration
|
|
61
|
+
|
|
62
|
+
### Custom headers
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const agent = new Agent({
|
|
66
|
+
id: "custom-agent",
|
|
67
|
+
name: "custom-agent",
|
|
68
|
+
model: {
|
|
69
|
+
url: "https://hyper.charm.land/v1",
|
|
70
|
+
id: "hyper/deepseek-v4-flash",
|
|
71
|
+
apiKey: process.env.HYPER_API_KEY,
|
|
72
|
+
headers: {
|
|
73
|
+
"X-Custom-Header": "value"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Dynamic model selection
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
const agent = new Agent({
|
|
83
|
+
id: "dynamic-agent",
|
|
84
|
+
name: "Dynamic Agent",
|
|
85
|
+
model: ({ requestContext }) => {
|
|
86
|
+
const useAdvanced = requestContext.task === "complex";
|
|
87
|
+
return useAdvanced
|
|
88
|
+
? "hyper/qwen3.7-plus"
|
|
89
|
+
: "hyper/deepseek-v4-flash";
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# LLM Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 185 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
8
8
|
|
|
@@ -56,7 +56,7 @@ for await (const chunk of stream) {
|
|
|
56
56
|
| `llmgateway/cosmos3-super-reasoner` | 262K | | | | | | $0.10 | $0.30 |
|
|
57
57
|
| `llmgateway/custom` | 128K | | | | | | — | — |
|
|
58
58
|
| `llmgateway/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.38 |
|
|
59
|
-
| `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.
|
|
59
|
+
| `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.08 | $0.15 |
|
|
60
60
|
| `llmgateway/deepseek-v4-pro` | 1.1M | | | | | | $0.43 | $0.87 |
|
|
61
61
|
| `llmgateway/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
|
|
62
62
|
| `llmgateway/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
@@ -71,7 +71,7 @@ for await (const chunk of stream) {
|
|
|
71
71
|
| `llmgateway/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
72
72
|
| `llmgateway/gemma-3-27b` | 110K | | | | | | $0.10 | $0.30 |
|
|
73
73
|
| `llmgateway/gemma-4-26b-a4b-it` | 262K | | | | | | $0.07 | $0.34 |
|
|
74
|
-
| `llmgateway/gemma-4-31b-it` | 262K | | | | | | $0.
|
|
74
|
+
| `llmgateway/gemma-4-31b-it` | 262K | | | | | | $0.10 | $0.30 |
|
|
75
75
|
| `llmgateway/glm-4-32b-0414-128k` | 128K | | | | | | $0.10 | $0.10 |
|
|
76
76
|
| `llmgateway/glm-4.5` | 131K | | | | | | $0.60 | $2 |
|
|
77
77
|
| `llmgateway/glm-4.5-air` | 131K | | | | | | $0.13 | $0.85 |
|
|
@@ -86,7 +86,7 @@ for await (const chunk of stream) {
|
|
|
86
86
|
| `llmgateway/glm-4.7-flashx` | 200K | | | | | | $0.07 | $0.40 |
|
|
87
87
|
| `llmgateway/glm-5` | 203K | | | | | | $0.72 | $2 |
|
|
88
88
|
| `llmgateway/glm-5.1` | 205K | | | | | | $0.93 | $3 |
|
|
89
|
-
| `llmgateway/glm-5.2` | 1.0M | | | | | | $
|
|
89
|
+
| `llmgateway/glm-5.2` | 1.0M | | | | | | $0.80 | $3 |
|
|
90
90
|
| `llmgateway/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
|
|
91
91
|
| `llmgateway/gpt-4` | 8K | | | | | | $30 | $60 |
|
|
92
92
|
| `llmgateway/gpt-4-turbo` | 128K | | | | | | $10 | $30 |
|
|
@@ -96,7 +96,9 @@ for await (const chunk of stream) {
|
|
|
96
96
|
| `llmgateway/gpt-4o` | 128K | | | | | | $3 | $10 |
|
|
97
97
|
| `llmgateway/gpt-4o-mini` | 128K | | | | | | $0.15 | $0.60 |
|
|
98
98
|
| `llmgateway/gpt-4o-mini-search-preview` | 128K | | | | | | $0.15 | $0.60 |
|
|
99
|
+
| `llmgateway/gpt-4o-mini-transcribe` | 16K | | | | | | $1 | $5 |
|
|
99
100
|
| `llmgateway/gpt-4o-search-preview` | 128K | | | | | | $3 | $10 |
|
|
101
|
+
| `llmgateway/gpt-4o-transcribe` | 16K | | | | | | $3 | $10 |
|
|
100
102
|
| `llmgateway/gpt-5` | 400K | | | | | | $1 | $10 |
|
|
101
103
|
| `llmgateway/gpt-5-chat-latest` | 400K | | | | | | $1 | $10 |
|
|
102
104
|
| `llmgateway/gpt-5-mini` | 400K | | | | | | $0.25 | $2 |
|
|
@@ -120,7 +122,7 @@ for await (const chunk of stream) {
|
|
|
120
122
|
| `llmgateway/gpt-5.6-luna` | 1.1M | | | | | | $1 | $6 |
|
|
121
123
|
| `llmgateway/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
|
|
122
124
|
| `llmgateway/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
|
|
123
|
-
| `llmgateway/gpt-oss-120b` | 131K | | | | | | $0.
|
|
125
|
+
| `llmgateway/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.14 |
|
|
124
126
|
| `llmgateway/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.15 |
|
|
125
127
|
| `llmgateway/grok-4` | 256K | | | | | | $3 | $15 |
|
|
126
128
|
| `llmgateway/grok-4-1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Mistral
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 30 Mistral models through Mastra's model router. Authentication is handled automatically using the `MISTRAL_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Mistral documentation](https://docs.mistral.ai/getting-started/models/).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Nebius Token Factory
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 33 Nebius Token Factory models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Nebius Token Factory documentation](https://docs.tokenfactory.nebius.com/).
|
|
8
8
|
|
|
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `nebius/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
43
43
|
| `nebius/MiniMaxAI/MiniMax-M3` | 1.0M | | | | | | $0.30 | $1 |
|
|
44
44
|
| `nebius/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
45
|
+
| `nebius/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
45
46
|
| `nebius/NousResearch/Hermes-4-405B` | 128K | | | | | | $1 | $3 |
|
|
46
47
|
| `nebius/NousResearch/Hermes-4-70B` | 128K | | | | | | $0.13 | $0.40 |
|
|
47
48
|
| `nebius/nvidia/Llama-3_1-Nemotron-Ultra-253B-v1` | 128K | | | | | | $0.60 | $2 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Nvidia
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 98 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Nvidia documentation](https://docs.api.nvidia.com/nim/).
|
|
8
8
|
|
|
@@ -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: "nvidia/abacusai/dracarys-llama-
|
|
20
|
+
model: "nvidia/abacusai/dracarys-llama-3.1-70b-instruct"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -36,7 +36,7 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ------------------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `nvidia/abacusai/dracarys-llama-
|
|
39
|
+
| `nvidia/abacusai/dracarys-llama-3.1-70b-instruct` | 128K | | | | | | — | — |
|
|
40
40
|
| `nvidia/baai/bge-m3` | 8K | | | | | | — | — |
|
|
41
41
|
| `nvidia/black-forest-labs/flux_1-kontext-dev` | 41K | | | | | | — | — |
|
|
42
42
|
| `nvidia/black-forest-labs/flux_1-schnell` | 77 | | | | | | — | — |
|
|
@@ -46,6 +46,8 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `nvidia/deepseek-ai/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
47
47
|
| `nvidia/deepseek-ai/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
48
48
|
| `nvidia/google/gemma-2-2b-it` | 128K | | | | | | — | — |
|
|
49
|
+
| `nvidia/google/gemma-3-12b-it` | 131K | | | | | | — | — |
|
|
50
|
+
| `nvidia/google/gemma-3-4b-it` | 131K | | | | | | — | — |
|
|
49
51
|
| `nvidia/google/gemma-3n-e2b-it` | 128K | | | | | | — | — |
|
|
50
52
|
| `nvidia/google/gemma-3n-e4b-it` | 128K | | | | | | — | — |
|
|
51
53
|
| `nvidia/google/gemma-4-31b-it` | 256K | | | | | | — | — |
|
|
@@ -66,9 +68,11 @@ for await (const chunk of stream) {
|
|
|
66
68
|
| `nvidia/minimaxai/minimax-m2.7` | 205K | | | | | | — | — |
|
|
67
69
|
| `nvidia/minimaxai/minimax-m3` | 1.0M | | | | | | — | — |
|
|
68
70
|
| `nvidia/mistralai/magistral-small-2506` | 33K | | | | | | — | — |
|
|
69
|
-
| `nvidia/mistralai/
|
|
71
|
+
| `nvidia/mistralai/ministral-14b-instruct-2512` | 262K | | | | | | — | — |
|
|
72
|
+
| `nvidia/mistralai/mistral-7b-instruct-v0.3` | 66K | | | | | | — | — |
|
|
70
73
|
| `nvidia/mistralai/mistral-large-3-675b-instruct-2512` | 262K | | | | | | — | — |
|
|
71
74
|
| `nvidia/mistralai/mistral-medium-3-instruct` | 131K | | | | | | — | — |
|
|
75
|
+
| `nvidia/mistralai/mistral-medium-3.5-128b` | 262K | | | | | | — | — |
|
|
72
76
|
| `nvidia/mistralai/mistral-nemotron` | 128K | | | | | | — | — |
|
|
73
77
|
| `nvidia/mistralai/mistral-small-4-119b-2603` | 128K | | | | | | — | — |
|
|
74
78
|
| `nvidia/mistralai/mixtral-8x22b-instruct` | 66K | | | | | | — | — |
|
|
@@ -76,11 +80,18 @@ for await (const chunk of stream) {
|
|
|
76
80
|
| `nvidia/nvidia/active-speaker-detection` | — | | | | | | — | — |
|
|
77
81
|
| `nvidia/nvidia/bevformer` | 128K | | | | | | — | — |
|
|
78
82
|
| `nvidia/nvidia/cosmos-predict1-5b` | — | | | | | | — | — |
|
|
83
|
+
| `nvidia/nvidia/cosmos-reason2-8b` | 131K | | | | | | — | — |
|
|
79
84
|
| `nvidia/nvidia/cosmos-transfer1-7b` | — | | | | | | — | — |
|
|
80
85
|
| `nvidia/nvidia/cosmos-transfer2_5-2b` | — | | | | | | — | — |
|
|
81
86
|
| `nvidia/nvidia/gliner-pii` | 128K | | | | | | — | — |
|
|
82
|
-
| `nvidia/nvidia/llama-3_1-nemotron-safety-guard-8b-v3` | 128K | | | | | | — | — |
|
|
83
87
|
| `nvidia/nvidia/llama-3_2-nemoretriever-300m-embed-v1` | 33K | | | | | | — | — |
|
|
88
|
+
| `nvidia/nvidia/llama-3.1-nemotron-70b-instruct` | 128K | | | | | | — | — |
|
|
89
|
+
| `nvidia/nvidia/llama-3.1-nemotron-nano-8b-v1` | 131K | | | | | | — | — |
|
|
90
|
+
| `nvidia/nvidia/llama-3.1-nemotron-nano-vl-8b-v1` | 33K | | | | | | — | — |
|
|
91
|
+
| `nvidia/nvidia/llama-3.1-nemotron-safety-guard-8b-v3` | 128K | | | | | | — | — |
|
|
92
|
+
| `nvidia/nvidia/llama-3.1-nemotron-ultra-253b-v1` | 128K | | | | | | — | — |
|
|
93
|
+
| `nvidia/nvidia/llama-3.3-nemotron-super-49b-v1` | 131K | | | | | | — | — |
|
|
94
|
+
| `nvidia/nvidia/llama-3.3-nemotron-super-49b-v1.5` | 131K | | | | | | — | — |
|
|
84
95
|
| `nvidia/nvidia/llama-nemotron-embed-vl-1b-v2` | 33K | | | | | | — | — |
|
|
85
96
|
| `nvidia/nvidia/llama-nemotron-rerank-vl-1b-v2` | 128K | | | | | | — | — |
|
|
86
97
|
| `nvidia/nvidia/magpie-tts-zeroshot` | — | | | | | | — | — |
|
|
@@ -91,12 +102,13 @@ for await (const chunk of stream) {
|
|
|
91
102
|
| `nvidia/nvidia/nemotron-3-ultra-550b-a55b` | 1.0M | | | | | | $0.50 | $3 |
|
|
92
103
|
| `nvidia/nvidia/nemotron-content-safety-reasoning-4b` | 128K | | | | | | — | — |
|
|
93
104
|
| `nvidia/nvidia/nemotron-mini-4b-instruct` | 128K | | | | | | — | — |
|
|
105
|
+
| `nvidia/nvidia/nemotron-nano-12b-v2-vl` | 128K | | | | | | — | — |
|
|
94
106
|
| `nvidia/nvidia/nemotron-voicechat` | 128K | | | | | | — | — |
|
|
95
107
|
| `nvidia/nvidia/nv-embed-v1` | 33K | | | | | | — | — |
|
|
96
108
|
| `nvidia/nvidia/nv-embedcode-7b-v1` | 33K | | | | | | — | — |
|
|
97
109
|
| `nvidia/nvidia/nvidia-nemotron-nano-9b-v2` | 131K | | | | | | — | — |
|
|
98
110
|
| `nvidia/nvidia/rerank-qa-mistral-4b` | 128K | | | | | | — | — |
|
|
99
|
-
| `nvidia/nvidia/riva-translate-4b-instruct-
|
|
111
|
+
| `nvidia/nvidia/riva-translate-4b-instruct-v1.1` | 128K | | | | | | — | — |
|
|
100
112
|
| `nvidia/nvidia/sparsedrive` | 128K | | | | | | — | — |
|
|
101
113
|
| `nvidia/nvidia/streampetr` | 128K | | | | | | — | — |
|
|
102
114
|
| `nvidia/nvidia/studiovoice` | 128K | | | | | | — | — |
|
|
@@ -106,6 +118,7 @@ for await (const chunk of stream) {
|
|
|
106
118
|
| `nvidia/openai/gpt-oss-120b` | 128K | | | | | | — | — |
|
|
107
119
|
| `nvidia/openai/gpt-oss-20b` | 131K | | | | | | — | — |
|
|
108
120
|
| `nvidia/openai/whisper-large-v3` | — | | | | | | — | — |
|
|
121
|
+
| `nvidia/poolside/laguna-xs-2.1` | 262K | | | | | | — | — |
|
|
109
122
|
| `nvidia/qwen/qwen-image` | — | | | | | | — | — |
|
|
110
123
|
| `nvidia/qwen/qwen-image-edit` | — | | | | | | — | — |
|
|
111
124
|
| `nvidia/qwen/qwen2.5-coder-32b-instruct` | 128K | | | | | | — | — |
|
|
@@ -116,7 +129,8 @@ for await (const chunk of stream) {
|
|
|
116
129
|
| `nvidia/sarvamai/sarvam-m` | 128K | | | | | | — | — |
|
|
117
130
|
| `nvidia/stepfun-ai/step-3.5-flash` | 256K | | | | | | — | — |
|
|
118
131
|
| `nvidia/stepfun-ai/step-3.7-flash` | 256K | | | | | | — | — |
|
|
119
|
-
| `nvidia/
|
|
132
|
+
| `nvidia/thinkingmachines/inkling` | 1.0M | | | | | | — | — |
|
|
133
|
+
| `nvidia/upstage/solar-10.7b-instruct` | 128K | | | | | | — | — |
|
|
120
134
|
| `nvidia/z-ai/glm-5.2` | 1.0M | | | | | | — | — |
|
|
121
135
|
|
|
122
136
|
## Advanced configuration
|
|
@@ -129,7 +143,7 @@ const agent = new Agent({
|
|
|
129
143
|
name: "custom-agent",
|
|
130
144
|
model: {
|
|
131
145
|
url: "https://integrate.api.nvidia.com/v1",
|
|
132
|
-
id: "nvidia/abacusai/dracarys-llama-
|
|
146
|
+
id: "nvidia/abacusai/dracarys-llama-3.1-70b-instruct",
|
|
133
147
|
apiKey: process.env.NVIDIA_API_KEY,
|
|
134
148
|
headers: {
|
|
135
149
|
"X-Custom-Header": "value"
|
|
@@ -148,7 +162,7 @@ const agent = new Agent({
|
|
|
148
162
|
const useAdvanced = requestContext.task === "complex";
|
|
149
163
|
return useAdvanced
|
|
150
164
|
? "nvidia/z-ai/glm-5.2"
|
|
151
|
-
: "nvidia/abacusai/dracarys-llama-
|
|
165
|
+
: "nvidia/abacusai/dracarys-llama-3.1-70b-instruct";
|
|
152
166
|
}
|
|
153
167
|
});
|
|
154
168
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Ollama Cloud
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 19 Ollama Cloud models through Mastra's model router. Authentication is handled automatically using the `OLLAMA_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Ollama Cloud documentation](https://docs.ollama.com/cloud).
|
|
8
8
|
|
|
@@ -46,6 +46,7 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `ollama-cloud/kimi-k2.5` | 262K | | | | | | — | — |
|
|
47
47
|
| `ollama-cloud/kimi-k2.6` | 262K | | | | | | — | — |
|
|
48
48
|
| `ollama-cloud/kimi-k2.7-code` | 262K | | | | | | — | — |
|
|
49
|
+
| `ollama-cloud/kimi-k3` | 1.0M | | | | | | — | — |
|
|
49
50
|
| `ollama-cloud/minimax-m2.5` | 205K | | | | | | — | — |
|
|
50
51
|
| `ollama-cloud/minimax-m2.7` | 197K | | | | | | — | — |
|
|
51
52
|
| `ollama-cloud/minimax-m3` | 512K | | | | | | — | — |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenAI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 47 OpenAI models through Mastra's model router. Authentication is handled automatically using the `OPENAI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenAI documentation](https://platform.openai.com/docs/models).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Go
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 22 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Go documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Zen
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 85 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -85,6 +85,7 @@ for await (const chunk of stream) {
|
|
|
85
85
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
86
86
|
| `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
87
87
|
| `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
88
|
+
| `opencode/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
88
89
|
| `opencode/laguna-s-2.1-free` | 256K | | | | | | — | — |
|
|
89
90
|
| `opencode/ling-3.0-flash-free` | 262K | | | | | | — | — |
|
|
90
91
|
| `opencode/mimo-v2.5-free` | 200K | | | | | | — | — |
|
|
@@ -124,7 +125,7 @@ const agent = new Agent({
|
|
|
124
125
|
model: ({ requestContext }) => {
|
|
125
126
|
const useAdvanced = requestContext.task === "complex";
|
|
126
127
|
return useAdvanced
|
|
127
|
-
? "opencode/
|
|
128
|
+
? "opencode/trinity-large-preview-free"
|
|
128
129
|
: "opencode/big-pickle";
|
|
129
130
|
}
|
|
130
131
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Poe
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 137 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Poe documentation](https://creator.poe.com/docs/external-applications/openai-compatible-api).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Scaleway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 17 Scaleway models through Mastra's model router. Authentication is handled automatically using the `SCALEWAY_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Scaleway documentation](https://www.scaleway.com/en/docs/generative-apis/).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Synthetic
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 8 Synthetic models through Mastra's model router. Authentication is handled automatically using the `SYNTHETIC_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Synthetic documentation](https://synthetic.new/pricing).
|
|
8
8
|
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| ------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `synthetic/hf:MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.60 | $1 |
|
|
40
40
|
| `synthetic/hf:moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
41
|
+
| `synthetic/hf:moonshotai/Kimi-K3` | 524K | | | | | | $3 | $15 |
|
|
41
42
|
| `synthetic/hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4` | 262K | | | | | | $0.30 | $1 |
|
|
42
43
|
| `synthetic/hf:openai/gpt-oss-120b` | 131K | | | | | | $0.10 | $0.10 |
|
|
43
44
|
| `synthetic/hf:Qwen/Qwen3.6-27B` | 262K | | | | | | $0.45 | $4 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Together AI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 34 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
|
|
8
8
|
|
|
@@ -45,6 +45,7 @@ for await (const chunk of stream) {
|
|
|
45
45
|
| `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
|
|
46
46
|
| `togetherai/moonshotai/Kimi-K2.6` | 262K | | | | | | $1 | $5 |
|
|
47
47
|
| `togetherai/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
48
|
+
| `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
48
49
|
| `togetherai/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.60 | $4 |
|
|
49
50
|
| `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
50
51
|
| `togetherai/openai/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.20 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Weights & Biases
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 30 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Xiaomi Token Plan (Europe)
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 7 Xiaomi Token Plan (Europe) models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Xiaomi Token Plan (Europe) documentation](https://platform.xiaomimimo.com/#/docs).
|
|
8
8
|
|
|
@@ -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: "xiaomi-token-plan-ams/mimo-v2-
|
|
20
|
+
model: "xiaomi-token-plan-ams/mimo-v2-pro"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -53,7 +53,7 @@ const agent = new Agent({
|
|
|
53
53
|
name: "custom-agent",
|
|
54
54
|
model: {
|
|
55
55
|
url: "https://token-plan-ams.xiaomimimo.com/v1",
|
|
56
|
-
id: "xiaomi-token-plan-ams/mimo-v2-
|
|
56
|
+
id: "xiaomi-token-plan-ams/mimo-v2-pro",
|
|
57
57
|
apiKey: process.env.XIAOMI_API_KEY,
|
|
58
58
|
headers: {
|
|
59
59
|
"X-Custom-Header": "value"
|
|
@@ -72,7 +72,7 @@ const agent = new Agent({
|
|
|
72
72
|
const useAdvanced = requestContext.task === "complex";
|
|
73
73
|
return useAdvanced
|
|
74
74
|
? "xiaomi-token-plan-ams/mimo-v2.5-tts-voicedesign"
|
|
75
|
-
: "xiaomi-token-plan-ams/mimo-v2-
|
|
75
|
+
: "xiaomi-token-plan-ams/mimo-v2-pro";
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Xiaomi Token Plan (China)
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 7 Xiaomi Token Plan (China) models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Xiaomi Token Plan (China) documentation](https://platform.xiaomimimo.com/#/docs).
|
|
8
8
|
|
|
@@ -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: "xiaomi-token-plan-cn/mimo-v2-
|
|
20
|
+
model: "xiaomi-token-plan-cn/mimo-v2-pro"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -53,7 +53,7 @@ const agent = new Agent({
|
|
|
53
53
|
name: "custom-agent",
|
|
54
54
|
model: {
|
|
55
55
|
url: "https://token-plan-cn.xiaomimimo.com/v1",
|
|
56
|
-
id: "xiaomi-token-plan-cn/mimo-v2-
|
|
56
|
+
id: "xiaomi-token-plan-cn/mimo-v2-pro",
|
|
57
57
|
apiKey: process.env.XIAOMI_API_KEY,
|
|
58
58
|
headers: {
|
|
59
59
|
"X-Custom-Header": "value"
|
|
@@ -72,7 +72,7 @@ const agent = new Agent({
|
|
|
72
72
|
const useAdvanced = requestContext.task === "complex";
|
|
73
73
|
return useAdvanced
|
|
74
74
|
? "xiaomi-token-plan-cn/mimo-v2.5-tts-voicedesign"
|
|
75
|
-
: "xiaomi-token-plan-cn/mimo-v2-
|
|
75
|
+
: "xiaomi-token-plan-cn/mimo-v2-pro";
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Xiaomi Token Plan (Singapore)
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 7 Xiaomi Token Plan (Singapore) models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Xiaomi Token Plan (Singapore) documentation](https://platform.xiaomimimo.com/#/docs).
|
|
8
8
|
|
|
@@ -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: "xiaomi-token-plan-sgp/mimo-v2-
|
|
20
|
+
model: "xiaomi-token-plan-sgp/mimo-v2-pro"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -53,7 +53,7 @@ const agent = new Agent({
|
|
|
53
53
|
name: "custom-agent",
|
|
54
54
|
model: {
|
|
55
55
|
url: "https://token-plan-sgp.xiaomimimo.com/v1",
|
|
56
|
-
id: "xiaomi-token-plan-sgp/mimo-v2-
|
|
56
|
+
id: "xiaomi-token-plan-sgp/mimo-v2-pro",
|
|
57
57
|
apiKey: process.env.XIAOMI_API_KEY,
|
|
58
58
|
headers: {
|
|
59
59
|
"X-Custom-Header": "value"
|
|
@@ -72,7 +72,7 @@ const agent = new Agent({
|
|
|
72
72
|
const useAdvanced = requestContext.task === "complex";
|
|
73
73
|
return useAdvanced
|
|
74
74
|
? "xiaomi-token-plan-sgp/mimo-v2.5-tts-voicedesign"
|
|
75
|
-
: "xiaomi-token-plan-sgp/mimo-v2-
|
|
75
|
+
: "xiaomi-token-plan-sgp/mimo-v2-pro";
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Xiaomi
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 6 Xiaomi models through Mastra's model router. Authentication is handled automatically using the `XIAOMI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Xiaomi documentation](https://platform.xiaomimimo.com/#/docs).
|
|
8
8
|
|
|
@@ -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: "xiaomi/mimo-v2
|
|
20
|
+
model: "xiaomi/mimo-v2-flash"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -50,7 +50,7 @@ const agent = new Agent({
|
|
|
50
50
|
name: "custom-agent",
|
|
51
51
|
model: {
|
|
52
52
|
url: "https://api.xiaomimimo.com/v1",
|
|
53
|
-
id: "xiaomi/mimo-v2
|
|
53
|
+
id: "xiaomi/mimo-v2-flash",
|
|
54
54
|
apiKey: process.env.XIAOMI_API_KEY,
|
|
55
55
|
headers: {
|
|
56
56
|
"X-Custom-Header": "value"
|
|
@@ -69,7 +69,7 @@ const agent = new Agent({
|
|
|
69
69
|
const useAdvanced = requestContext.task === "complex";
|
|
70
70
|
return useAdvanced
|
|
71
71
|
? "xiaomi/mimo-v2.5-pro-ultraspeed"
|
|
72
|
-
: "xiaomi/mimo-v2
|
|
72
|
+
: "xiaomi/mimo-v2-flash";
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
```
|
|
@@ -32,6 +32,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
32
32
|
- [Berget.AI](https://mastra.ai/models/providers/berget)
|
|
33
33
|
- [Blue Claw](https://mastra.ai/models/providers/blueclaw)
|
|
34
34
|
- [Cerebras](https://mastra.ai/models/providers/cerebras)
|
|
35
|
+
- [Charm Hyper](https://mastra.ai/models/providers/hyper)
|
|
35
36
|
- [Chutes](https://mastra.ai/models/providers/chutes)
|
|
36
37
|
- [Clarifai](https://mastra.ai/models/providers/clarifai)
|
|
37
38
|
- [Claudinio](https://mastra.ai/models/providers/claudinio)
|
|
@@ -216,9 +216,19 @@ type ChannelHandler = (
|
|
|
216
216
|
thread: Thread,
|
|
217
217
|
message: Message,
|
|
218
218
|
defaultHandler: (thread: Thread, message: Message) => Promise<void>,
|
|
219
|
+
ctx?: ChannelHandlerContext,
|
|
219
220
|
) => Promise<void>
|
|
220
221
|
```
|
|
221
222
|
|
|
223
|
+
`ctx` carries the resolved `mastra` instance, so a handler can reach storage or other registered primitives without being passed an external accessor:
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
onDirectMessage: async (thread, message, defaultHandler, ctx) => {
|
|
227
|
+
const store = await ctx?.mastra?.getStorage()?.getStore('memory')
|
|
228
|
+
await defaultHandler(thread, message)
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
222
232
|
## Resource ID resolution
|
|
223
233
|
|
|
224
234
|
By default a channel thread's memory `resourceId` is `${platform}:${message.author.userId}`. The sender owns the memory, scoped per platform. For apps with a shared identity, such as single sign-on (SSO), this splits memory: the same user gets `feishu:user_123` in a Feishu DM but `user_123` on the web.
|