@mastra/mcp-docs-server 1.3.7-alpha.5 → 1.3.7-alpha.9
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/harness/agent-controller.md +18 -0
- package/.docs/docs/harness/durable-agents.md +12 -0
- package/.docs/docs/mastra-platform/api.md +88 -0
- package/.docs/docs/mastra-platform/observability.md +2 -0
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/server/request-context.md +5 -5
- package/.docs/docs/studio/overview.md +1 -1
- package/.docs/integrations/observability/opentelemetry.md +11 -5
- package/.docs/integrations/sandboxes/e2b.md +4 -9
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +22 -0
- package/.docs/models/gateways/merge-gateway.md +5 -1
- package/.docs/models/gateways/netlify.md +5 -4
- package/.docs/models/gateways/openrouter.md +6 -4
- package/.docs/models/gateways/vercel.md +7 -2
- package/.docs/models/index.md +2 -1
- package/.docs/models/providers/aimlapi.md +257 -0
- package/.docs/models/providers/ambient.md +3 -1
- package/.docs/models/providers/deepinfra.md +3 -2
- package/.docs/models/providers/digitalocean.md +1 -1
- package/.docs/models/providers/edenai.md +328 -312
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/google.md +2 -1
- package/.docs/models/providers/kilo.md +17 -15
- package/.docs/models/providers/llmgateway-providers.md +3 -2
- package/.docs/models/providers/llmgateway.md +2 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/nano-gpt.md +8 -2
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/novita-ai.md +3 -2
- package/.docs/models/providers/opencode-go.md +5 -4
- package/.docs/models/providers/opencode.md +3 -1
- package/.docs/models/providers/prime.md +5 -1
- package/.docs/models/providers/requesty.md +5 -1
- package/.docs/models/providers/standardcompute.md +2 -2
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +1 -1
- package/.docs/reference/agent-controller/session.md +56 -9
- package/.docs/reference/client-js/agent-controller.md +2 -2
- package/.docs/reference/core/mastra-model-gateway.md +2 -0
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +1 -1
- package/.docs/reference/observability/tracing/bridges/datadog.md +3 -0
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/datadog.md +3 -0
- package/.docs/reference/observability/tracing/exporters/langsmith.md +3 -1
- package/.docs/reference/workspace/factory-sandbox.md +173 -0
- package/package.json +5 -5
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# EmpirioLabs AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 63 EmpirioLabs AI models through Mastra's model router. Authentication is handled automatically using the `EMPIRIOLABS_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [EmpirioLabs AI documentation](https://docs.empiriolabs.ai).
|
|
10
10
|
|
|
@@ -42,6 +42,7 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `empiriolabs/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.42 | $1 |
|
|
43
43
|
| `empiriolabs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
44
44
|
| `empiriolabs/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
|
|
45
|
+
| `empiriolabs/fugu-max` | 1.0M | | | | | | $2 | $6 |
|
|
45
46
|
| `empiriolabs/fugu-ultra-v1-0` | 1.0M | | | | | | $8 | $45 |
|
|
46
47
|
| `empiriolabs/fugu-ultra-v1-1` | 1.0M | | | | | | $5 | $30 |
|
|
47
48
|
| `empiriolabs/fugu-ultra-v2-0` | 1.0M | | | | | | $5 | $30 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Google
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 40 Google models through Mastra's model router. Authentication is handled automatically using one of the following environment variables: `GOOGLE_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Google documentation](https://ai.google.dev/gemini-api/docs/models).
|
|
10
10
|
|
|
@@ -63,6 +63,7 @@ for await (const chunk of stream) {
|
|
|
63
63
|
| `google/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
64
64
|
| `google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
65
65
|
| `google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
66
|
+
| `google/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
|
|
66
67
|
| `google/gemini-embedding-001` | 2K | | | | | | $0.15 | — |
|
|
67
68
|
| `google/gemini-embedding-2` | 8K | | | | | | $0.20 | — |
|
|
68
69
|
| `google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Kilo Gateway
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 389 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Kilo Gateway documentation](https://kilo.ai).
|
|
10
10
|
|
|
@@ -42,20 +42,20 @@ for await (const chunk of stream) {
|
|
|
42
42
|
| `kilo/~anthropic/claude-haiku-latest` | 1.0M | | | | | | $0.10 | $0.50 |
|
|
43
43
|
| `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $4 | $20 |
|
|
44
44
|
| `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
45
|
-
| `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.
|
|
46
|
-
| `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.
|
|
47
|
-
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.01 | $0.
|
|
45
|
+
| `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.04 | $0.77 |
|
|
46
|
+
| `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.15 | $0.44 |
|
|
47
|
+
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.01 | $0.58 |
|
|
48
48
|
| `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
|
|
49
49
|
| `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
50
|
-
| `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $0.
|
|
50
|
+
| `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $0.72 | $24 |
|
|
51
51
|
| `kilo/~openai/gpt-astra-latest` | 1.1M | | | | | | $10 | $50 |
|
|
52
52
|
| `kilo/~openai/gpt-luna-latest` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
53
53
|
| `kilo/~openai/gpt-mini-latest` | 400K | | | | | | $0.75 | $5 |
|
|
54
54
|
| `kilo/~openai/gpt-sol-latest` | 1.1M | | | | | | $2 | $10 |
|
|
55
55
|
| `kilo/~openai/gpt-terra-latest` | 1.1M | | | | | | $2 | $12 |
|
|
56
56
|
| `kilo/~x-ai/grok-latest` | 500K | | | | | | $2 | $6 |
|
|
57
|
-
| `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.
|
|
58
|
-
| `kilo/~z-ai/glm-latest` | 1.0M | | | | | | $0.06 | $
|
|
57
|
+
| `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.03 | $0.90 |
|
|
58
|
+
| `kilo/~z-ai/glm-latest` | 1.0M | | | | | | $0.06 | $4 |
|
|
59
59
|
| `kilo/aion-labs/aion-2.0` | 131K | | | | | | $0.80 | $2 |
|
|
60
60
|
| `kilo/aion-labs/aion-3.0` | 131K | | | | | | $3 | $6 |
|
|
61
61
|
| `kilo/aion-labs/aion-3.0-mini` | 131K | | | | | | $0.70 | $1 |
|
|
@@ -107,7 +107,7 @@ for await (const chunk of stream) {
|
|
|
107
107
|
| `kilo/deepseek/deepseek-v3.1-terminus` | 164K | | | | | | $0.27 | $1 |
|
|
108
108
|
| `kilo/deepseek/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.80 |
|
|
109
109
|
| `kilo/deepseek/deepseek-v3.2-exp` | 164K | | | | | | $0.27 | $0.41 |
|
|
110
|
-
| `kilo/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.
|
|
110
|
+
| `kilo/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.09 | $0.18 |
|
|
111
111
|
| `kilo/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
|
|
112
112
|
| `kilo/deepseek/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.22 | $0.65 |
|
|
113
113
|
| `kilo/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
@@ -135,10 +135,11 @@ for await (const chunk of stream) {
|
|
|
135
135
|
| `kilo/google/gemini-3.6-flash` | 1.0M | | | | | | $0.38 | $2 |
|
|
136
136
|
| `kilo/google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
137
137
|
| `kilo/google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
138
|
+
| `kilo/google/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
|
|
138
139
|
| `kilo/google/gemini-nano-banana-2.1` | 66K | | | | | | $2 | $8 |
|
|
139
140
|
| `kilo/google/gemma-2-27b-it` | 8K | | | | | | $0.65 | $0.65 |
|
|
140
141
|
| `kilo/google/gemma-3-12b-it` | 131K | | | | | | $0.05 | $0.15 |
|
|
141
|
-
| `kilo/google/gemma-3-27b-it` | 131K | | | | | | $0.
|
|
142
|
+
| `kilo/google/gemma-3-27b-it` | 131K | | | | | | $0.07 | $0.28 |
|
|
142
143
|
| `kilo/google/gemma-3-4b-it` | 131K | | | | | | $0.05 | $0.10 |
|
|
143
144
|
| `kilo/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.04 | $0.22 |
|
|
144
145
|
| `kilo/google/gemma-4-31b-it` | 262K | | | | | | $0.09 | $0.34 |
|
|
@@ -150,10 +151,8 @@ for await (const chunk of stream) {
|
|
|
150
151
|
| `kilo/inception/mercury-2` | 128K | | | | | | $0.25 | $0.75 |
|
|
151
152
|
| `kilo/inception/mercury-2.5` | 260K | | | | | | $0.20 | $0.75 |
|
|
152
153
|
| `kilo/inclusionai/ling-3.0-flash` | 262K | | | | | | $0.06 | $0.18 |
|
|
153
|
-
| `kilo/inclusionai/ling-3.0-flash-
|
|
154
|
-
| `kilo/inclusionai/ling-3.
|
|
155
|
-
| `kilo/inclusionai/ling-3.0-flash-vl` | 262K | | | | | | $0.07 | $0.22 |
|
|
156
|
-
| `kilo/inclusionai/ling-3.1-flash` | 262K | | | | | | — | — |
|
|
154
|
+
| `kilo/inclusionai/ling-3.0-flash-vl` | 131K | | | | | | $0.06 | $0.18 |
|
|
155
|
+
| `kilo/inclusionai/ling-3.1-flash` | 262K | | | | | | $0.30 | $0.90 |
|
|
157
156
|
| `kilo/inference-net/schematron-v2-small` | 128K | | | | | | $0.05 | $0.23 |
|
|
158
157
|
| `kilo/inference-net/schematron-v2-turbo` | 128K | | | | | | $0.03 | $0.15 |
|
|
159
158
|
| `kilo/kilo-auto/balanced` | 1.0M | | | | | | $0.33 | $2 |
|
|
@@ -162,6 +161,7 @@ for await (const chunk of stream) {
|
|
|
162
161
|
| `kilo/kilo-auto/frontier` | 1.0M | | | | | | $5 | $25 |
|
|
163
162
|
| `kilo/kilo-auto/small` | 262K | | | | | | $0.05 | $0.40 |
|
|
164
163
|
| `kilo/liquid/lfm-2.5-2.6b:free` | 66K | | | | | | — | — |
|
|
164
|
+
| `kilo/liquid/lfm-2.5-24b-a2b` | 128K | | | | | | $0.05 | $0.70 |
|
|
165
165
|
| `kilo/mancer/weaver` | 8K | | | | | | $0.40 | $0.75 |
|
|
166
166
|
| `kilo/meituan/longcat-2.0` | 1.0M | | | | | | $0.75 | $3 |
|
|
167
167
|
| `kilo/meta-llama/llama-3.1-70b-instruct` | 131K | | | | | | $0.40 | $0.40 |
|
|
@@ -187,7 +187,7 @@ for await (const chunk of stream) {
|
|
|
187
187
|
| `kilo/minimax/minimax-m2-her` | 66K | | | | | | $0.30 | $1 |
|
|
188
188
|
| `kilo/minimax/minimax-m2.1` | 205K | | | | | | $0.30 | $1 |
|
|
189
189
|
| `kilo/minimax/minimax-m2.5` | 200K | | | | | | $0.30 | $1 |
|
|
190
|
-
| `kilo/minimax/minimax-m2.7` |
|
|
190
|
+
| `kilo/minimax/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
191
191
|
| `kilo/minimax/minimax-m3` | 524K | | | | | | $0.30 | $1 |
|
|
192
192
|
| `kilo/mistralai/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
|
|
193
193
|
| `kilo/mistralai/devstral-2512` | 262K | | | | | | $0.40 | $2 |
|
|
@@ -337,7 +337,7 @@ for await (const chunk of stream) {
|
|
|
337
337
|
| `kilo/qwen/qwen3-vl-8b-instruct` | 262K | | | | | | $0.25 | $0.75 |
|
|
338
338
|
| `kilo/qwen/qwen3.5-122b-a10b` | 262K | | | | | | $0.26 | $2 |
|
|
339
339
|
| `kilo/qwen/qwen3.5-27b` | 262K | | | | | | $0.20 | $2 |
|
|
340
|
-
| `kilo/qwen/qwen3.5-35b-a3b` |
|
|
340
|
+
| `kilo/qwen/qwen3.5-35b-a3b` | 256K | | | | | | $0.16 | $1 |
|
|
341
341
|
| `kilo/qwen/qwen3.5-397b-a17b` | 262K | | | | | | $0.39 | $2 |
|
|
342
342
|
| `kilo/qwen/qwen3.5-9b` | 256K | | | | | | $0.10 | $0.15 |
|
|
343
343
|
| `kilo/qwen/qwen3.5-flash-02-23` | 1.0M | | | | | | $0.07 | $0.26 |
|
|
@@ -367,6 +367,8 @@ for await (const chunk of stream) {
|
|
|
367
367
|
| `kilo/sao10k/l3-lunaris-8b` | 8K | | | | | | $0.04 | $0.05 |
|
|
368
368
|
| `kilo/sao10k/l3.1-euryale-70b` | 131K | | | | | | $0.85 | $0.85 |
|
|
369
369
|
| `kilo/sao10k/l3.3-euryale-70b` | 131K | | | | | | $0.65 | $0.75 |
|
|
370
|
+
| `kilo/scaledown/extract` | 1.0M | | | | | | $0.05 | — |
|
|
371
|
+
| `kilo/scaledown/summarize` | 1.0M | | | | | | $0.05 | — |
|
|
370
372
|
| `kilo/stealth/claude-opus-4.6` | 1.0M | | | | | | $4 | $20 |
|
|
371
373
|
| `kilo/stealth/claude-opus-4.7` | 1.0M | | | | | | $4 | $20 |
|
|
372
374
|
| `kilo/stealth/claude-opus-4.8` | 1.0M | | | | | | $4 | $20 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# LLM Gateway
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 447 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
10
10
|
|
|
@@ -216,7 +216,6 @@ for await (const chunk of stream) {
|
|
|
216
216
|
| `llmgateway-providers/entrim/deepseek-v4.1-flash` | 1.0M | | | | | | $0.20 | $0.60 |
|
|
217
217
|
| `llmgateway-providers/entrim/glm-5.3-flash` | 1.0M | | | | | | $0.10 | $0.35 |
|
|
218
218
|
| `llmgateway-providers/fireworks/deepseek-v4-flash` | 1.0M | | | | | | $0.22 | $0.66 |
|
|
219
|
-
| `llmgateway-providers/fireworks/deepseek-v4-pro` | 1.0M | | | | | | $1 | $4 |
|
|
220
219
|
| `llmgateway-providers/fireworks/deepseek-v4.1-flash` | 1.0M | | | | | | $0.22 | $0.66 |
|
|
221
220
|
| `llmgateway-providers/fireworks/glm-5.3` | 1.0M | | | | | | $1 | $4 |
|
|
222
221
|
| `llmgateway-providers/fireworks/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
@@ -236,6 +235,7 @@ for await (const chunk of stream) {
|
|
|
236
235
|
| `llmgateway-providers/google-ai-studio/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
237
236
|
| `llmgateway-providers/google-ai-studio/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
238
237
|
| `llmgateway-providers/google-ai-studio/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
238
|
+
| `llmgateway-providers/google-ai-studio/gemini-4-argon` | 1.0M | | | | | | $4 | $20 |
|
|
239
239
|
| `llmgateway-providers/google-ai-studio/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
240
240
|
| `llmgateway-providers/google-vertex/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
|
|
241
241
|
| `llmgateway-providers/google-vertex/gemini-2.5-flash-lite` | 1.0M | | | | | | $0.10 | $0.40 |
|
|
@@ -248,6 +248,7 @@ for await (const chunk of stream) {
|
|
|
248
248
|
| `llmgateway-providers/google-vertex/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
249
249
|
| `llmgateway-providers/google-vertex/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
250
250
|
| `llmgateway-providers/google-vertex/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
251
|
+
| `llmgateway-providers/google-vertex/gemini-4-argon` | 1.0M | | | | | | $4 | $20 |
|
|
251
252
|
| `llmgateway-providers/groq/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.75 |
|
|
252
253
|
| `llmgateway-providers/groq/gpt-oss-20b` | 131K | | | | | | $0.10 | $0.50 |
|
|
253
254
|
| `llmgateway-providers/inference.net/glm-5.3` | 1.0M | | | | | | $0.90 | $3 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# DevPass (LLM Gateway)
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 216 DevPass (LLM Gateway) models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [DevPass (LLM Gateway) documentation](https://llmgateway.io/docs).
|
|
10
10
|
|
|
@@ -78,6 +78,7 @@ for await (const chunk of stream) {
|
|
|
78
78
|
| `llmgateway/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
79
79
|
| `llmgateway/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
80
80
|
| `llmgateway/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
81
|
+
| `llmgateway/gemini-4-argon` | 1.0M | | | | | | $4 | $20 |
|
|
81
82
|
| `llmgateway/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
82
83
|
| `llmgateway/gemma-4-26b-a4b-it` | 262K | | | | | | $0.07 | $0.34 |
|
|
83
84
|
| `llmgateway/gemma-4-31b-it` | 262K | | | | | | $0.10 | $0.25 |
|
|
@@ -43,7 +43,7 @@ for await (const chunk of stream) {
|
|
|
43
43
|
| `meta/muse-spark-1.2-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
|
|
44
44
|
| `meta/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
|
|
45
45
|
| `meta/muse-spark-1.3-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
|
|
46
|
-
| `meta/muse-wonder-1.0` | 1.0M | | | | | |
|
|
46
|
+
| `meta/muse-wonder-1.0` | 1.0M | | | | | | $4 | $20 |
|
|
47
47
|
|
|
48
48
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
49
49
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# NanoGPT
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 617 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
10
10
|
|
|
@@ -97,6 +97,7 @@ for await (const chunk of stream) {
|
|
|
97
97
|
| `nano-gpt/anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
98
98
|
| `nano-gpt/arcee-ai/trinity-large-thinking` | 262K | | | | | | $0.25 | $0.90 |
|
|
99
99
|
| `nano-gpt/asi1-mini` | 128K | | | | | | $1 | $1 |
|
|
100
|
+
| `nano-gpt/ateron/gemma-4-dark-thoughts-v2-31b` | 66K | | | | | | $0.10 | $0.45 |
|
|
100
101
|
| `nano-gpt/auto-model` | 1.0M | | | | | | — | — |
|
|
101
102
|
| `nano-gpt/auto-model-basic` | 1.0M | | | | | | $10 | $20 |
|
|
102
103
|
| `nano-gpt/auto-model-premium` | 1.0M | | | | | | $10 | $20 |
|
|
@@ -139,6 +140,7 @@ for await (const chunk of stream) {
|
|
|
139
140
|
| `nano-gpt/deepseek/deepseek-v4-flash-0731:thinking` | 1.0M | | | | | | $0.05 | $0.16 |
|
|
140
141
|
| `nano-gpt/deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.05 | $0.16 |
|
|
141
142
|
| `nano-gpt/deepseek/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.22 | $0.66 |
|
|
143
|
+
| `nano-gpt/deepseek/deepseek-v4-flash-vision-exp-cybersecurity` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
142
144
|
| `nano-gpt/deepseek/deepseek-v4-flash:thinking` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
143
145
|
| `nano-gpt/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $1 | $2 |
|
|
144
146
|
| `nano-gpt/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $3 |
|
|
@@ -237,6 +239,7 @@ for await (const chunk of stream) {
|
|
|
237
239
|
| `nano-gpt/google/gemini-3.6-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
238
240
|
| `nano-gpt/google/gemini-3.7-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
239
241
|
| `nano-gpt/google/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
242
|
+
| `nano-gpt/google/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
|
|
240
243
|
| `nano-gpt/google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
|
|
241
244
|
| `nano-gpt/google/gemini-flash-lite-latest` | 1.0M | | | | | | $0.30 | $3 |
|
|
242
245
|
| `nano-gpt/google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
@@ -347,7 +350,10 @@ for await (const chunk of stream) {
|
|
|
347
350
|
| `nano-gpt/nanogpt/coding-router:low` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
348
351
|
| `nano-gpt/nanogpt/coding-router:max` | 1.0M | | | | | | $5 | $30 |
|
|
349
352
|
| `nano-gpt/nanogpt/coding-router:medium` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
353
|
+
| `nano-gpt/nbeerbower/gemma4-gutenberg-31b` | 66K | | | | | | $0.10 | $0.45 |
|
|
350
354
|
| `nano-gpt/NeverSleep/Lumimaid-v0.2-70B` | 16K | | | | | | $1 | $2 |
|
|
355
|
+
| `nano-gpt/nimbz/gemma-4-giftige-blume-31b-v2` | 66K | | | | | | $0.10 | $0.45 |
|
|
356
|
+
| `nano-gpt/nimbz/schattenblume-31b` | 66K | | | | | | $0.10 | $0.45 |
|
|
351
357
|
| `nano-gpt/nothingiisreal/L3.1-70B-Celeste-V0.1-BF16` | 33K | | | | | | $0.49 | $0.49 |
|
|
352
358
|
| `nano-gpt/NousResearch/hermes-3-llama-3.1-70b` | 66K | | | | | | $0.41 | $0.41 |
|
|
353
359
|
| `nano-gpt/NousResearch/hermes-4-405b` | 128K | | | | | | $0.30 | $1 |
|
|
@@ -565,7 +571,7 @@ for await (const chunk of stream) {
|
|
|
565
571
|
| `nano-gpt/TheDrummer/Cydonia-24B-v2` | 33K | | | | | | $0.10 | $0.12 |
|
|
566
572
|
| `nano-gpt/TheDrummer/Cydonia-24B-v4` | 33K | | | | | | $0.20 | $0.24 |
|
|
567
573
|
| `nano-gpt/TheDrummer/Cydonia-24B-v4.1` | 131K | | | | | | $0.35 | $0.55 |
|
|
568
|
-
| `nano-gpt/TheDrummer/Cydonia-24B-v4.3` |
|
|
574
|
+
| `nano-gpt/TheDrummer/Cydonia-24B-v4.3` | 131K | | | | | | $0.12 | $0.15 |
|
|
569
575
|
| `nano-gpt/TheDrummer/Magidonia-24B-v4.3` | 33K | | | | | | $0.10 | $0.12 |
|
|
570
576
|
| `nano-gpt/TheDrummer/Rocinante-12B-v1.1` | 16K | | | | | | $0.41 | $0.59 |
|
|
571
577
|
| `nano-gpt/TheDrummer/Skyfall-31B-v4.2` | 16K | | | | | | $0.12 | $0.15 |
|
|
@@ -93,7 +93,7 @@ for await (const chunk of stream) {
|
|
|
93
93
|
| `nearai/Qwen/Qwen3.8-27B` | 262K | | | | | | $0.04 | $1 |
|
|
94
94
|
| `nearai/x-ai/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
95
95
|
| `nearai/x-ai/grok-4.7` | 500K | | | | | | $2 | $6 |
|
|
96
|
-
| `nearai/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.
|
|
96
|
+
| `nearai/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.08 | $0.50 |
|
|
97
97
|
|
|
98
98
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
99
99
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Novita AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 85 Novita AI models through Mastra's model router. Authentication is handled automatically using the `NOVITA_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Novita AI documentation](https://novita.ai/docs/guides/introduction).
|
|
10
10
|
|
|
@@ -62,7 +62,7 @@ for await (const chunk of stream) {
|
|
|
62
62
|
| `novita-ai/inclusionai/ling-3.0-flash-fin` | 262K | | | | | | $0.07 | $0.22 |
|
|
63
63
|
| `novita-ai/inclusionai/ling-3.0-flash-sante` | 262K | | | | | | $0.07 | $0.22 |
|
|
64
64
|
| `novita-ai/inclusionai/ling-3.0-flash-vl` | 262K | | | | | | $0.07 | $0.22 |
|
|
65
|
-
| `novita-ai/inclusionai/ling-3.1-flash` | 262K | | | | | |
|
|
65
|
+
| `novita-ai/inclusionai/ling-3.1-flash` | 262K | | | | | | $0.30 | $0.90 |
|
|
66
66
|
| `novita-ai/meta-llama/llama-3.1-8b-instruct` | 16K | | | | | | $0.02 | $0.05 |
|
|
67
67
|
| `novita-ai/meta-llama/llama-3.2-1b-instruct` | 131K | | | | | | $0.02 | $0.02 |
|
|
68
68
|
| `novita-ai/meta-llama/llama-3.3-70b-instruct` | 12K | | | | | | $0.14 | $0.40 |
|
|
@@ -104,6 +104,7 @@ for await (const chunk of stream) {
|
|
|
104
104
|
| `novita-ai/qwen/qwen3.8-flash` | 1.0M | | | | | | $0.15 | $0.47 |
|
|
105
105
|
| `novita-ai/qwen/qwen3.8-max` | 1.0M | | | | | | $2 | $6 |
|
|
106
106
|
| `novita-ai/stepfun/step-3.7-flash` | 262K | | | | | | $0.20 | $1 |
|
|
107
|
+
| `novita-ai/stepfun/step-5-preview` | 1.0M | | | | | | $1 | $3 |
|
|
107
108
|
| `novita-ai/tencent/hy3` | 262K | | | | | | $0.14 | $0.58 |
|
|
108
109
|
| `novita-ai/tencent/hy4-preview` | 1.0M | | | | | | $0.83 | $3 |
|
|
109
110
|
| `novita-ai/xiaomimimo/mimo-v2.5` | 1.0M | | | | | | $0.17 | $0.34 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenCode Go
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 37 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OpenCode Go documentation](https://opencode.ai/v2/docs/console/go/).
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const agent = new Agent({
|
|
|
19
19
|
id: "my-agent",
|
|
20
20
|
name: "My Agent",
|
|
21
21
|
instructions: "You are a helpful assistant",
|
|
22
|
-
model: "opencode-go/
|
|
22
|
+
model: "opencode-go/cat-jam-free"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Generate a response
|
|
@@ -38,6 +38,7 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| ------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
+
| `opencode-go/cat-jam-free` | 262K | | | | | | — | — |
|
|
41
42
|
| `opencode-go/claude-haiku-5-5` | 1.0M | | | | | | $0.10 | $0.50 |
|
|
42
43
|
| `opencode-go/deepseek-v4-flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
43
44
|
| `opencode-go/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
@@ -82,7 +83,7 @@ const agent = new Agent({
|
|
|
82
83
|
name: "custom-agent",
|
|
83
84
|
model: {
|
|
84
85
|
url: "https://opencode.ai/inference/go/v1",
|
|
85
|
-
id: "opencode-go/
|
|
86
|
+
id: "opencode-go/cat-jam-free",
|
|
86
87
|
apiKey: process.env.OPENCODE_API_KEY,
|
|
87
88
|
headers: {
|
|
88
89
|
"X-Custom-Header": "value"
|
|
@@ -101,7 +102,7 @@ const agent = new Agent({
|
|
|
101
102
|
const useAdvanced = requestContext.task === "complex";
|
|
102
103
|
return useAdvanced
|
|
103
104
|
? "opencode-go/step-5-preview-free"
|
|
104
|
-
: "opencode-go/
|
|
105
|
+
: "opencode-go/cat-jam-free";
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
108
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenCode
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 122 OpenCode models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OpenCode documentation](https://opencode.ai/v2/docs/console/models/).
|
|
10
10
|
|
|
@@ -39,6 +39,7 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| ------------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
41
|
| `opencode/big-pickle` | 200K | | | | | | — | — |
|
|
42
|
+
| `opencode/cat-jam-free` | 262K | | | | | | — | — |
|
|
42
43
|
| `opencode/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
43
44
|
| `opencode/claude-fable-5-1` | 1.0M | | | | | | $10 | $50 |
|
|
44
45
|
| `opencode/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
@@ -66,6 +67,7 @@ for await (const chunk of stream) {
|
|
|
66
67
|
| `opencode/gemini-3.6-flash` | 1.0M | | | | | | $2 | $8 |
|
|
67
68
|
| `opencode/gemini-3.7-flash` | 1.0M | | | | | | $2 | $8 |
|
|
68
69
|
| `opencode/gemini-3.8-flash` | 1.0M | | | | | | $2 | $8 |
|
|
70
|
+
| `opencode/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
|
|
69
71
|
| `opencode/glm-5` | 205K | | | | | | $1 | $3 |
|
|
70
72
|
| `opencode/glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
71
73
|
| `opencode/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Prime Inference
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 64 Prime Inference models through Mastra's model router. Authentication is handled automatically using the `PRIME_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Prime Inference documentation](https://docs.primeintellect.ai).
|
|
10
10
|
|
|
@@ -62,6 +62,7 @@ for await (const chunk of stream) {
|
|
|
62
62
|
| `prime/mistralai/mistral-large-2512` | 262K | | | | | | $0.50 | $2 |
|
|
63
63
|
| `prime/mistralai/mistral-nemo` | 131K | | | | | | $0.17 | $0.17 |
|
|
64
64
|
| `prime/mistralai/mistral-small-2603` | 262K | | | | | | $0.17 | $0.66 |
|
|
65
|
+
| `prime/mistralai/mixtral-8x22b-instruct` | 66K | | | | | | $2 | $7 |
|
|
65
66
|
| `prime/moonshotai/kimi-k2-0905` | 262K | | | | | | $0.60 | $3 |
|
|
66
67
|
| `prime/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $17 |
|
|
67
68
|
| `prime/openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
@@ -82,8 +83,11 @@ for await (const chunk of stream) {
|
|
|
82
83
|
| `prime/openai/gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
|
|
83
84
|
| `prime/openai/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
84
85
|
| `prime/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.20 | $1 |
|
|
86
|
+
| `prime/openai/gpt-5.6-luna-pro` | 1.1M | | | | | | $1 | $6 |
|
|
85
87
|
| `prime/openai/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
|
|
88
|
+
| `prime/openai/gpt-5.6-sol-pro` | 1.1M | | | | | | $5 | $30 |
|
|
86
89
|
| `prime/openai/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
|
|
90
|
+
| `prime/openai/gpt-5.6-terra-pro` | 1.1M | | | | | | $3 | $15 |
|
|
87
91
|
| `prime/openai/gpt-6-astra` | 1.1M | | | | | | $10 | $50 |
|
|
88
92
|
| `prime/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
89
93
|
| `prime/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Requesty
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 175 Requesty models through Mastra's model router. Authentication is handled automatically using the `REQUESTY_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Requesty documentation](https://requesty.ai/solution/llm-routing/models).
|
|
10
10
|
|
|
@@ -97,6 +97,8 @@ for await (const chunk of stream) {
|
|
|
97
97
|
| `requesty/gemini-3.7-flash@eu` | 1.0M | | | | | | $0.82 | $4 |
|
|
98
98
|
| `requesty/gemini-3.8-flash` | 1.0M | | | | | | $0.75 | $4 |
|
|
99
99
|
| `requesty/gemini-3.8-flash@eu` | 1.0M | | | | | | $0.82 | $4 |
|
|
100
|
+
| `requesty/gemini-4-argon` | 1.0M | | | | | | $2 | $10 |
|
|
101
|
+
| `requesty/gemini-4-argon@eu` | 1.0M | | | | | | $2 | $11 |
|
|
100
102
|
| `requesty/gemma-4-26b-a4b-it` | 262K | | | | | | $0.07 | $0.34 |
|
|
101
103
|
| `requesty/gemma-4-31b-it` | 262K | | | | | | — | — |
|
|
102
104
|
| `requesty/glm-5.1` | 200K | | | | | | $1 | $4 |
|
|
@@ -179,6 +181,8 @@ for await (const chunk of stream) {
|
|
|
179
181
|
| `requesty/mistral-small-2603` | 256K | | | | | | $0.17 | $0.66 |
|
|
180
182
|
| `requesty/mistral-small-2603@eu` | 256K | | | | | | $0.17 | $0.66 |
|
|
181
183
|
| `requesty/muse-glimmer-30b` | 131K | | | | | | — | — |
|
|
184
|
+
| `requesty/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
|
|
185
|
+
| `requesty/muse-wonder-1.0` | 1.0M | | | | | | $4 | $20 |
|
|
182
186
|
| `requesty/nemotron-3-nano-omni` | 300K | | | | | | $0.06 | $0.24 |
|
|
183
187
|
| `requesty/nemotron-3-nano-omni-30b-a3b-reasoning` | 131K | | | | | | — | — |
|
|
184
188
|
| `requesty/nemotron-3-nano-omni@eu` | 300K | | | | | | $0.06 | $0.24 |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Access 1 Standard Compute model through Mastra's model router. Authentication is handled automatically using the `STANDARDCOMPUTE_API_KEY` environment variable.
|
|
8
8
|
|
|
9
|
-
Learn more in the [Standard Compute documentation](https://standardcompute.com/models).
|
|
9
|
+
Learn more in the [Standard Compute documentation](https://docs.standardcompute.com/models).
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
STANDARDCOMPUTE_API_KEY=your-api-key
|
|
@@ -32,7 +32,7 @@ for await (const chunk of stream) {
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Standard Compute documentation](https://standardcompute.com/models) for details.
|
|
35
|
+
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Standard Compute documentation](https://docs.standardcompute.com/models) for details.
|
|
36
36
|
|
|
37
37
|
## Models
|
|
38
38
|
|
|
@@ -20,6 +20,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
20
20
|
- [AgentRouter](https://mastra.ai/models/providers/agentrouter)
|
|
21
21
|
- [Agnes AI](https://mastra.ai/models/providers/agnes)
|
|
22
22
|
- [AI-ROUTER](https://mastra.ai/models/providers/ai-router)
|
|
23
|
+
- [AI/ML API](https://mastra.ai/models/providers/aimlapi)
|
|
23
24
|
- [ai&](https://mastra.ai/models/providers/aiand)
|
|
24
25
|
- [AI21 Labs](https://mastra.ai/models/providers/ai21)
|
|
25
26
|
- [ainetcafe](https://mastra.ai/models/providers/ainetcafe)
|
|
@@ -194,7 +194,7 @@ The same `resourceId` and `scope` return the same `Session` instance. A differen
|
|
|
194
194
|
|
|
195
195
|
**id** (`string`): Stable session identifier. Defaults to the controller id.
|
|
196
196
|
|
|
197
|
-
**ownerId** (`string`): Stable
|
|
197
|
+
**ownerId** (`string`): Stable identity of the process-local Session host. Defaults to id. New threads use it as their initial owner, but later transfers do not change this value.
|
|
198
198
|
|
|
199
199
|
**tags** (`Record<string, string>`): Tags copied to threads created by the session.
|
|
200
200
|
|
|
@@ -92,33 +92,41 @@ Returns: `() => void`
|
|
|
92
92
|
|
|
93
93
|
### Messages and run control
|
|
94
94
|
|
|
95
|
-
#### `sendMessage({ content, files?, requestContext? })`
|
|
95
|
+
#### `sendMessage({ content, files?, requestContext?, author? })`
|
|
96
96
|
|
|
97
|
-
Send a user message. The session creates a thread first when no thread is active.
|
|
97
|
+
Send a user message. The session creates a thread first when no thread is active. Pass `author` when the host has authenticated the sender.
|
|
98
98
|
|
|
99
99
|
```typescript
|
|
100
100
|
await session.sendMessage({
|
|
101
101
|
content: 'Summarize this file.',
|
|
102
102
|
files: [{ data: fileContents, mediaType: 'text/plain', filename: 'notes.txt' }],
|
|
103
|
+
author: { id: 'user-123' },
|
|
103
104
|
})
|
|
104
105
|
```
|
|
105
106
|
|
|
106
|
-
When `requestContext` carries `MASTRA_MESSAGE_AUTHOR_KEY`, the
|
|
107
|
+
The author persists under `content.metadata.signal.author`. Read it with `getMessageAuthor(message)` from `@mastra/core/agent`. When `requestContext` carries `MASTRA_MESSAGE_AUTHOR_KEY`, the session uses that value if `author` is omitted. See [Reserved keys](https://mastra.ai/docs/server/request-context).
|
|
107
108
|
|
|
108
|
-
#### `
|
|
109
|
+
#### `queueMessage({ content, files?, requestContext?, author? })`
|
|
109
110
|
|
|
110
|
-
Queue
|
|
111
|
+
Queue a message for the next run, or send it immediately while the session is idle. Author metadata persists with the queued message.
|
|
112
|
+
|
|
113
|
+
#### `steer({ content, files?, requestContext?, author? })`
|
|
114
|
+
|
|
115
|
+
Abort the active run, then send `content` as a new message. Pass `files` to attach files in the same shape as `sendMessage()`: `{ data, mediaType, filename? }`, where `data` is raw text or a base64 data URL for text files, and base64 for binary files.
|
|
111
116
|
|
|
112
117
|
```typescript
|
|
113
118
|
await session.steer({ content: 'Focus on the failing tests.' })
|
|
114
119
|
```
|
|
115
120
|
|
|
116
|
-
#### `followUp({ content, requestContext? })`
|
|
121
|
+
#### `followUp({ content, files?, requestContext? })`
|
|
117
122
|
|
|
118
|
-
Queue a follow-up while a run is active, or send it immediately while idle.
|
|
123
|
+
Queue a follow-up while a run is active, or send it immediately while idle. Pass `files` to attach files the same way as `steer()`.
|
|
119
124
|
|
|
120
125
|
```typescript
|
|
121
|
-
await session.followUp({
|
|
126
|
+
await session.followUp({
|
|
127
|
+
content: 'Then compare against this screenshot.',
|
|
128
|
+
files: [{ data: screenshotBase64, mediaType: 'image/png', filename: 'expected.png' }],
|
|
129
|
+
})
|
|
122
130
|
```
|
|
123
131
|
|
|
124
132
|
#### `getCurrentRunId()`
|
|
@@ -295,7 +303,9 @@ To change the resource ID, use [`controller.setResourceId()`](https://mastra.ai/
|
|
|
295
303
|
|
|
296
304
|
## Thread
|
|
297
305
|
|
|
298
|
-
`session.thread` owns the active thread binding and resource-scoped thread operations. Stored threads and messages can survive controller recreation when storage is configured. Conversation settings such as mode, model, thinking level, token usage,
|
|
306
|
+
`session.thread` owns the active thread binding and resource-scoped thread operations. Stored threads and messages can survive controller recreation when storage is configured. Conversation settings such as mode, model, thinking level, token usage, pending runs, and ownership are restored from the active thread when the session creates or switches threads. The live session and its event bus don't persist.
|
|
307
|
+
|
|
308
|
+
New threads store the Session host's `ownerId` in the reserved `metadata.ownerId` and `metadata.createdBy` fields. Clones use the cloning Session host for both fields. Existing threads without `metadata.ownerId` read as owned by the current Session host without writing a backfill.
|
|
299
309
|
|
|
300
310
|
### `session.thread.create({ title?, id?, requestContext? })`
|
|
301
311
|
|
|
@@ -369,6 +379,43 @@ Return the active thread ID, creating and binding a new thread when none is boun
|
|
|
369
379
|
const threadId = await session.thread.ensureId()
|
|
370
380
|
```
|
|
371
381
|
|
|
382
|
+
### `session.thread.getOwner({ threadId? })`
|
|
383
|
+
|
|
384
|
+
Return a thread's durable owner. Omit `threadId` to read the active thread. The method returns `undefined` when no thread is selected. An owner-less legacy thread returns the Session host's `ownerId` without writing a backfill.
|
|
385
|
+
|
|
386
|
+
```typescript
|
|
387
|
+
const ownerId = await session.thread.getOwner()
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Returns: `Promise<string | undefined>`
|
|
391
|
+
|
|
392
|
+
### `session.thread.transferOwnership({ toOwnerId })`
|
|
393
|
+
|
|
394
|
+
Store `toOwnerId` in the active thread's `metadata.ownerId` and emit `thread_owner_changed`. The original `metadata.createdBy` value doesn't change.
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
await session.thread.transferOwnership({
|
|
398
|
+
toOwnerId: 'user-456',
|
|
399
|
+
})
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Returns: `Promise<void>`
|
|
403
|
+
|
|
404
|
+
Transfers are serialized within one process. Storage-backed applications that require a durable cross-process compare-and-set should perform it in their own store first, then call this method to mirror the result.
|
|
405
|
+
|
|
406
|
+
A successful change emits:
|
|
407
|
+
|
|
408
|
+
```typescript
|
|
409
|
+
const event = {
|
|
410
|
+
type: 'thread_owner_changed',
|
|
411
|
+
threadId: 'thread-7',
|
|
412
|
+
fromOwnerId: 'user-123',
|
|
413
|
+
toOwnerId: 'user-456',
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Runs snapshot ownership when they start. Within agent tools and dynamic runtime functions, `AgentControllerRequestContext.threadOwnerId` remains unchanged for the run's lifetime. A transfer becomes visible on the next run. `AgentControllerRequestContext.session.ownerId` continues to identify the process-local Session host.
|
|
418
|
+
|
|
372
419
|
### `session.thread.list(options?)`
|
|
373
420
|
|
|
374
421
|
List threads from storage. By default only threads for the current resource are returned, and transient forked subagent threads are hidden.
|
|
@@ -121,11 +121,11 @@ Pass `options.requestContext` to merge custom context into the run's request con
|
|
|
121
121
|
|
|
122
122
|
### `steer(message, options?)`
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Aborts the in-flight run, then sends the message as a new turn. Pass a string, or `{ content, files }` to attach files in the same shape as `sendMessage()`.
|
|
125
125
|
|
|
126
126
|
### `followUp(message, options?)`
|
|
127
127
|
|
|
128
|
-
Queues a follow-up message. If the session is idle it sends immediately. If a run is active it queues for after the run completes.
|
|
128
|
+
Queues a follow-up message. If the session is idle it sends immediately. If a run is active it queues for after the run completes. Pass a string, or `{ content, files }` to attach files in the same shape as `sendMessage()`.
|
|
129
129
|
|
|
130
130
|
### `abort()`
|
|
131
131
|
|
|
@@ -89,6 +89,8 @@ Fetches provider configurations from the gateway.
|
|
|
89
89
|
|
|
90
90
|
**docUrl** (`string`): Optional documentation URL
|
|
91
91
|
|
|
92
|
+
**pricing** (`Record<string, ModelPricing>`): Prices per model ID in USD per 1 million tokens, with the same keys as a models.dev cost (input, output, cache\_read, cache\_write, reasoning, input\_audio, output\_audio). Optional tiers hold long-context rates. @mastra/observability uses them for cost metrics when models.dev has no price for the model.
|
|
93
|
+
|
|
92
94
|
### `buildUrl()`
|
|
93
95
|
|
|
94
96
|
Builds the API URL for a specific model/provider combination.
|