@mastra/mcp-docs-server 1.3.10 → 1.3.11-alpha.1
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/course/01-first-agent/16-adding-memory-to-agent.md +7 -1
- package/.docs/course/02-agent-tools-mcp/25-creating-notes-directory.md +8 -0
- package/.docs/course/02-agent-tools-mcp/26-updating-mcp-config-filesystem.md +10 -7
- package/.docs/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +3 -1
- package/.docs/course/02-agent-tools-mcp/29-troubleshooting-filesystem.md +3 -2
- package/.docs/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -2
- package/.docs/course/03-agent-memory/04-creating-basic-memory-agent.md +3 -1
- package/.docs/course/03-agent-memory/08-configuring-conversation-history.md +1 -1
- package/.docs/course/03-agent-memory/09-using-memory-in-application.md +8 -6
- package/.docs/course/03-agent-memory/10-storage-configuration.md +11 -1
- package/.docs/course/03-agent-memory/12-handling-memory-frontend.md +5 -3
- package/.docs/course/03-agent-memory/13-vector-store-configuration.md +4 -2
- package/.docs/course/03-agent-memory/16-configuring-semantic-recall.md +2 -2
- package/.docs/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +2 -2
- package/.docs/course/03-agent-memory/21-configuring-working-memory.md +2 -2
- package/.docs/course/03-agent-memory/22-custom-working-memory-templates.md +2 -5
- package/.docs/course/03-agent-memory/25-combining-memory-features.md +2 -2
- package/.docs/course/03-agent-memory/27-creating-learning-assistant.md +2 -2
- package/.docs/course/04-workflows/05-chaining-steps-together.md +2 -1
- package/.docs/course/04-workflows/12-using-agent-in-workflow.md +11 -14
- package/.docs/course/04-workflows/20-building-conditional-workflow.md +32 -6
- package/.docs/docs/agents/guardrails.md +1 -1
- package/.docs/docs/agents/human-in-the-loop.md +1 -1
- package/.docs/docs/agents/structured-output.md +11 -0
- package/.docs/docs/channels.md +2 -0
- package/.docs/docs/classifier.md +103 -0
- package/.docs/docs/deployment/mastra-server.md +3 -1
- package/.docs/docs/evals/custom-scorers.md +20 -0
- package/.docs/docs/evals/quick-checks.md +7 -7
- package/.docs/docs/guides/context-engineering.md +2 -2
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/memory/memory-processors.md +49 -3
- package/.docs/docs/memory/observational-memory.md +27 -1
- package/.docs/docs/observability/tracing/overview.md +41 -1
- package/.docs/docs/workflows/control-flow.md +1 -1
- package/.docs/integrations/databases/postgresql.md +31 -0
- package/.docs/integrations/deploy/vercel.md +11 -0
- package/.docs/integrations/frameworks/angular.md +367 -0
- package/.docs/integrations/observability/langfuse.md +13 -0
- package/.docs/integrations/sandboxes/vercel.md +3 -1
- package/.docs/integrations.md +1 -0
- package/.docs/models/gateways/netlify.md +2 -5
- package/.docs/models/gateways/openrouter.md +2 -10
- package/.docs/models/gateways/vercel.md +1 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/cortecs.md +1 -1
- package/.docs/models/providers/deepinfra.md +0 -1
- package/.docs/models/providers/edenai.md +25 -4
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/google.md +1 -4
- package/.docs/models/providers/inceptron.md +4 -4
- package/.docs/models/providers/kilo.md +10 -23
- package/.docs/models/providers/llmgateway-providers.md +5 -18
- package/.docs/models/providers/llmgateway.md +4 -3
- package/.docs/models/providers/melious.md +10 -10
- package/.docs/models/providers/mistral.md +25 -24
- package/.docs/models/providers/nano-gpt.md +7 -18
- package/.docs/models/providers/ofox.md +3 -1
- package/.docs/models/providers/openai.md +1 -4
- package/.docs/models/providers/opencode.md +0 -1
- package/.docs/reference/agents/channels.md +61 -1
- package/.docs/reference/agents/generate.md +0 -10
- package/.docs/reference/agents/generateLegacy.md +0 -10
- package/.docs/reference/agents/network.md +0 -10
- package/.docs/reference/browser/agent-browser.md +7 -3
- package/.docs/reference/browser/mastra-browser.md +34 -0
- package/.docs/reference/classifier/classifier.md +3 -1
- package/.docs/reference/cli/mastra.md +8 -0
- package/.docs/reference/client-js/observability.md +16 -15
- package/.docs/reference/configuration.md +3 -1
- package/.docs/reference/connect/providers.md +65 -1
- package/.docs/reference/core/getDeployer.md +1 -1
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/deployer/vercel.md +24 -1
- package/.docs/reference/editor/mastra-editor.md +1 -1
- package/.docs/reference/evals/tool-call-accuracy.md +7 -4
- package/.docs/reference/memory/memory-class.md +77 -0
- package/.docs/reference/observability/tracing/advanced-queries.md +33 -16
- package/.docs/reference/observability/tracing/exporters/langfuse.md +11 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +123 -3
- package/.docs/reference/observability/tracing/interfaces.md +15 -0
- package/.docs/reference/observability/tracing/spans.md +1 -1
- package/.docs/reference/signals/signal-provider.md +42 -1
- package/.docs/reference/streaming/agents/stream.md +19 -10
- package/.docs/reference/streaming/agents/streamLegacy.md +0 -10
- package/.docs/reference/workspace/filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Melious
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 8 Melious models through Mastra's model router. Authentication is handled automatically using the `MELIOUS_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Melious documentation](https://melious.ai/docs/reference/models).
|
|
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: "melious/deepseek-
|
|
22
|
+
model: "melious/deepseek-v4-flash-0731"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Generate a response
|
|
@@ -38,13 +38,13 @@ for await (const chunk of stream) {
|
|
|
38
38
|
|
|
39
39
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
40
40
|
| ---------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
41
|
-
| `melious/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.
|
|
42
|
-
| `melious/deepseek-v4.1-flash` | 1.0M | | | | | | $0.
|
|
43
|
-
| `melious/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.
|
|
41
|
+
| `melious/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.11 | $0.28 |
|
|
42
|
+
| `melious/deepseek-v4.1-flash` | 1.0M | | | | | | $0.22 | $1 |
|
|
43
|
+
| `melious/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.33 | $1 |
|
|
44
44
|
| `melious/glm-5.3` | 1.0M | | | | | | $1 | $3 |
|
|
45
|
-
| `melious/glm-5.3-flash` | 1.0M | | | | | | $0.
|
|
46
|
-
| `melious/kimi-k2.6` | 256K | | | | | | $0.
|
|
47
|
-
| `melious/kimi-k2.7-code` | 262K | | | | | | $0.
|
|
45
|
+
| `melious/glm-5.3-flash` | 1.0M | | | | | | $0.11 | $0.45 |
|
|
46
|
+
| `melious/kimi-k2.6` | 256K | | | | | | $0.67 | $4 |
|
|
47
|
+
| `melious/kimi-k2.7-code` | 262K | | | | | | $0.61 | $3 |
|
|
48
48
|
| `melious/kimi-k3` | 1.0M | | | | | | $3 | $16 |
|
|
49
49
|
|
|
50
50
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
@@ -61,7 +61,7 @@ const agent = new Agent({
|
|
|
61
61
|
name: "custom-agent",
|
|
62
62
|
model: {
|
|
63
63
|
url: "https://api.melious.ai/v1",
|
|
64
|
-
id: "melious/deepseek-
|
|
64
|
+
id: "melious/deepseek-v4-flash-0731",
|
|
65
65
|
apiKey: process.env.MELIOUS_API_KEY,
|
|
66
66
|
headers: {
|
|
67
67
|
"X-Custom-Header": "value"
|
|
@@ -82,7 +82,7 @@ const agent = new Agent({
|
|
|
82
82
|
const useAdvanced = requestContext.task === "complex";
|
|
83
83
|
return useAdvanced
|
|
84
84
|
? "melious/kimi-k3"
|
|
85
|
-
: "melious/deepseek-
|
|
85
|
+
: "melious/deepseek-v4-flash-0731";
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Mistral
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 35 Mistral models through Mastra's model router. Authentication is handled automatically using the `MISTRAL_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Mistral documentation](https://docs.mistral.ai/getting-started/models/).
|
|
10
10
|
|
|
@@ -34,29 +34,30 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `mistral/codestral-2508`
|
|
40
|
-
| `mistral/codestral-latest`
|
|
41
|
-
| `mistral/
|
|
42
|
-
| `mistral/ministral-
|
|
43
|
-
| `mistral/ministral-3b-
|
|
44
|
-
| `mistral/ministral-
|
|
45
|
-
| `mistral/ministral-8b-
|
|
46
|
-
| `mistral/
|
|
47
|
-
| `mistral/mistral-
|
|
48
|
-
| `mistral/mistral-large-
|
|
49
|
-
| `mistral/mistral-large-
|
|
50
|
-
| `mistral/mistral-
|
|
51
|
-
| `mistral/mistral-medium-
|
|
52
|
-
| `mistral/mistral-
|
|
53
|
-
| `mistral/mistral-small-
|
|
54
|
-
| `mistral/
|
|
55
|
-
| `mistral/voxtral-mini-
|
|
56
|
-
| `mistral/voxtral-
|
|
57
|
-
| `mistral/voxtral-small-
|
|
58
|
-
| `mistral/
|
|
59
|
-
| `mistral/zai-glm-5-3
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| ---------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `mistral/codestral-2508` | 256K | | | | | | $0.30 | $0.90 |
|
|
40
|
+
| `mistral/codestral-latest` | 256K | | | | | | $0.30 | $0.90 |
|
|
41
|
+
| `mistral/deepseek-v4-1-flash-1017` | 1.0M | | | | | | $0.30 | $1 |
|
|
42
|
+
| `mistral/ministral-14b-2512` | 262K | | | | | | $0.20 | $0.20 |
|
|
43
|
+
| `mistral/ministral-3b-2512` | 131K | | | | | | $0.10 | $0.10 |
|
|
44
|
+
| `mistral/ministral-3b-latest` | 131K | | | | | | $0.10 | $0.10 |
|
|
45
|
+
| `mistral/ministral-8b-2512` | 262K | | | | | | $0.15 | $0.15 |
|
|
46
|
+
| `mistral/ministral-8b-latest` | 262K | | | | | | $0.15 | $0.15 |
|
|
47
|
+
| `mistral/mistral-embed` | 8K | | | | | | $0.10 | — |
|
|
48
|
+
| `mistral/mistral-large-2512` | 262K | | | | | | $0.50 | $2 |
|
|
49
|
+
| `mistral/mistral-large-4` | 1.0M | | | | | | $1 | $4 |
|
|
50
|
+
| `mistral/mistral-large-latest` | 262K | | | | | | $0.50 | $2 |
|
|
51
|
+
| `mistral/mistral-medium-2604` | 262K | | | | | | $2 | $8 |
|
|
52
|
+
| `mistral/mistral-medium-latest` | 262K | | | | | | $2 | $8 |
|
|
53
|
+
| `mistral/mistral-small-2603` | 262K | | | | | | $0.15 | $0.60 |
|
|
54
|
+
| `mistral/mistral-small-latest` | 262K | | | | | | $0.15 | $0.60 |
|
|
55
|
+
| `mistral/voxtral-mini-latest` | — | | | | | | — | — |
|
|
56
|
+
| `mistral/voxtral-mini-tts-latest` | — | | | | | | — | — |
|
|
57
|
+
| `mistral/voxtral-small-2507` | 33K | | | | | | $0.10 | $0.40 |
|
|
58
|
+
| `mistral/voxtral-small-latest` | 33K | | | | | | $0.10 | $0.40 |
|
|
59
|
+
| `mistral/zai-glm-5-3` | 1.0M | | | | | | $1 | $4 |
|
|
60
|
+
| `mistral/zai-glm-5-3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
60
61
|
|
|
61
62
|
Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
|
|
62
63
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# NanoGPT
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 641 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
|
|
|
@@ -148,12 +148,9 @@ for await (const chunk of stream) {
|
|
|
148
148
|
| `nano-gpt/deepseek/deepseek-v4.1-flash-uncensored:thinking` | 1.0M | | | | | | $0.33 | $1 |
|
|
149
149
|
| `nano-gpt/deepseek/deepseek-v4.1-flash:thinking` | 1.0M | | | | | | $0.09 | $0.25 |
|
|
150
150
|
| `nano-gpt/Doctor-Shotgun/MS3.2-24B-Magnum-Diamond` | 33K | | | | | | $0.49 | $0.49 |
|
|
151
|
-
| `nano-gpt/doubao-1.5-pro-256k` | 256K | | | | | | $0.80 | $1 |
|
|
152
|
-
| `nano-gpt/doubao-1.5-pro-32k` | 32K | | | | | | $0.13 | $0.33 |
|
|
153
|
-
| `nano-gpt/doubao-1.5-vision-pro-32k` | 32K | | | | | | $0.46 | $1 |
|
|
154
151
|
| `nano-gpt/doubao-seed-2-0-code-preview-260215` | 256K | | | | | | $0.78 | $4 |
|
|
155
|
-
| `nano-gpt/doubao-seed-2-0-lite-260215` | 256K | | | | | | $0.
|
|
156
|
-
| `nano-gpt/doubao-seed-2-0-mini-260215` | 256K | | | | | | $0.
|
|
152
|
+
| `nano-gpt/doubao-seed-2-0-lite-260215` | 256K | | | | | | $0.25 | $2 |
|
|
153
|
+
| `nano-gpt/doubao-seed-2-0-mini-260215` | 256K | | | | | | $0.10 | $0.48 |
|
|
157
154
|
| `nano-gpt/doubao-seed-2-0-pro-260215` | 256K | | | | | | $0.78 | $4 |
|
|
158
155
|
| `nano-gpt/elorian/glimpse` | 262K | | | | | | $0.63 | $3 |
|
|
159
156
|
| `nano-gpt/Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B` | 16K | | | | | | $0.49 | $0.49 |
|
|
@@ -227,13 +224,8 @@ for await (const chunk of stream) {
|
|
|
227
224
|
| `nano-gpt/Gemma-4-31B-Queen` | 262K | | | | | | $0.31 | $0.31 |
|
|
228
225
|
| `nano-gpt/Gemma-4-31B-SDFT-Heretic-RP` | 262K | | | | | | $0.31 | $0.31 |
|
|
229
226
|
| `nano-gpt/Gemma-4-31B-StyleTune` | 262K | | | | | | $0.31 | $0.31 |
|
|
230
|
-
| `nano-gpt/glm-4-air-0111` | 128K | | | | | | $0.14 | $0.14 |
|
|
231
227
|
| `nano-gpt/glm-4-long` | 1.0M | | | | | | $0.20 | $0.20 |
|
|
232
|
-
| `nano-gpt/glm-4-plus-0111` | 128K | | | | | | $10 | $10 |
|
|
233
|
-
| `nano-gpt/glm-4.1v-thinking-flash` | 64K | | | | | | $0.30 | $0.30 |
|
|
234
|
-
| `nano-gpt/glm-4.1v-thinking-flashx` | 64K | | | | | | $0.30 | $0.30 |
|
|
235
228
|
| `nano-gpt/GLM-4.6-Derestricted-v5` | 131K | | | | | | $0.40 | $2 |
|
|
236
|
-
| `nano-gpt/glm-z1-airx` | 32K | | | | | | $0.70 | $0.70 |
|
|
237
229
|
| `nano-gpt/google/diffusiongemma` | 262K | | | | | | $0.05 | $0.15 |
|
|
238
230
|
| `nano-gpt/google/gemini-3-flash-preview` | 1.0M | | | | | | $0.50 | $3 |
|
|
239
231
|
| `nano-gpt/google/gemini-3-flash-preview-thinking` | 1.0M | | | | | | $0.50 | $3 |
|
|
@@ -380,7 +372,7 @@ for await (const chunk of stream) {
|
|
|
380
372
|
| `nano-gpt/nvidia/nemotron-3-nano-30b-a3b` | 262K | | | | | | $0.17 | $0.68 |
|
|
381
373
|
| `nano-gpt/nvidia/nemotron-3-super-120b-a12b` | 262K | | | | | | $0.05 | $0.25 |
|
|
382
374
|
| `nano-gpt/nvidia/nemotron-3-super-120b-a12b:thinking` | 262K | | | | | | $0.05 | $0.25 |
|
|
383
|
-
| `nano-gpt/nvidia/nemotron-3-ultra-550b-a55b` |
|
|
375
|
+
| `nano-gpt/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.50 | $3 |
|
|
384
376
|
| `nano-gpt/nvidia/nemotron-3-ultra-550b-a55b:thinking` | 1.0M | | | | | | $0.50 | $3 |
|
|
385
377
|
| `nano-gpt/nvidia/nemotron-3.5-content-safety` | 131K | | | | | | $0.05 | $0.15 |
|
|
386
378
|
| `nano-gpt/nvidia/nemotron-3.5-lightning` | 1.0M | | | | | | $0.05 | $0.20 |
|
|
@@ -448,6 +440,7 @@ for await (const chunk of stream) {
|
|
|
448
440
|
| `nano-gpt/ornith-ai/ornith-1.5-35b-a3b` | 262K | | | | | | $0.10 | $0.40 |
|
|
449
441
|
| `nano-gpt/ornith-ai/ornith-1.5-35b-a3b:thinking` | 262K | | | | | | $0.10 | $0.40 |
|
|
450
442
|
| `nano-gpt/pamanseau/OpenReasoning-Nemotron-32B` | 33K | | | | | | $0.10 | $0.40 |
|
|
443
|
+
| `nano-gpt/particle-ai/particle-1` | 1.0M | | | | | | $0.25 | $1 |
|
|
451
444
|
| `nano-gpt/perceptron/perceptron-mk1` | 33K | | | | | | $0.15 | $2 |
|
|
452
445
|
| `nano-gpt/perceptron/perceptron-mk1.5` | 37K | | | | | | $0.15 | $2 |
|
|
453
446
|
| `nano-gpt/phi-4-mini-instruct` | 128K | | | | | | $0.17 | $0.68 |
|
|
@@ -457,7 +450,6 @@ for await (const chunk of stream) {
|
|
|
457
450
|
| `nano-gpt/poolside/laguna-s-2.1:thinking` | 1.0M | | | | | | $0.10 | $0.20 |
|
|
458
451
|
| `nano-gpt/prism-ml/ternary-bonsai-2-27b` | 262K | | | | | | $0.07 | $0.50 |
|
|
459
452
|
| `nano-gpt/prism-ml/ternary-bonsai-2-9b` | 262K | | | | | | $0.08 | $0.13 |
|
|
460
|
-
| `nano-gpt/qvq-max` | 128K | | | | | | $1 | $5 |
|
|
461
453
|
| `nano-gpt/qwen/qwen-2.5-72b-instruct` | 131K | | | | | | $0.36 | $0.40 |
|
|
462
454
|
| `nano-gpt/qwen/qwen-long` | 10.0M | | | | | | $0.10 | $0.41 |
|
|
463
455
|
| `nano-gpt/qwen/qwen-max` | 32K | | | | | | $2 | $6 |
|
|
@@ -607,9 +599,6 @@ for await (const chunk of stream) {
|
|
|
607
599
|
| `nano-gpt/thinkingmachines/Inkling-Small` | 524K | | | | | | $0.45 | $1 |
|
|
608
600
|
| `nano-gpt/thinkingmachines/Inkling-Small:thinking` | 524K | | | | | | $0.45 | $1 |
|
|
609
601
|
| `nano-gpt/thinkingmachines/inkling:thinking` | 1.0M | | | | | | $1 | $4 |
|
|
610
|
-
| `nano-gpt/THUDM/GLM-4-32B-0414` | 128K | | | | | | $0.20 | $0.20 |
|
|
611
|
-
| `nano-gpt/THUDM/GLM-4-9B-0414` | 32K | | | | | | $0.20 | $0.20 |
|
|
612
|
-
| `nano-gpt/THUDM/GLM-Z1-9B-0414` | 32K | | | | | | $0.20 | $0.20 |
|
|
613
602
|
| `nano-gpt/unbiased/pareto-26.10` | 1.0M | | | | | | $0.80 | $3 |
|
|
614
603
|
| `nano-gpt/unbiased/pareto-26.9` | 262K | | | | | | $3 | $8 |
|
|
615
604
|
| `nano-gpt/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.80 | $1 |
|
|
@@ -669,8 +658,8 @@ for await (const chunk of stream) {
|
|
|
669
658
|
| `nano-gpt/z-ai/glm-5:thinking` | 200K | | | | | | $0.60 | $2 |
|
|
670
659
|
| `nano-gpt/z-ai/glm-5.1` | 200K | | | | | | $0.70 | $3 |
|
|
671
660
|
| `nano-gpt/z-ai/glm-5.1:thinking` | 200K | | | | | | $0.70 | $3 |
|
|
672
|
-
| `nano-gpt/z-ai/glm-5.2` | 1.0M | | | | | | $0.
|
|
673
|
-
| `nano-gpt/z-ai/glm-5.2:thinking` | 1.0M | | | | | | $0.
|
|
661
|
+
| `nano-gpt/z-ai/glm-5.2` | 1.0M | | | | | | $0.23 | $2 |
|
|
662
|
+
| `nano-gpt/z-ai/glm-5.2:thinking` | 1.0M | | | | | | $0.23 | $2 |
|
|
674
663
|
| `nano-gpt/z-ai/glm-5.3` | 1.0M | | | | | | $0.60 | $1 |
|
|
675
664
|
| `nano-gpt/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.10 | $0.30 |
|
|
676
665
|
| `nano-gpt/z-ai/glm-5.3-flash-apex` | 1.0M | | | | | | $0.15 | $0.50 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Ofox
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 150 Ofox models through Mastra's model router. Authentication is handled automatically using the `OFOX_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Ofox documentation](https://ofox.ai/docs).
|
|
10
10
|
|
|
@@ -109,6 +109,7 @@ for await (const chunk of stream) {
|
|
|
109
109
|
| `ofox/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
110
110
|
| `ofox/moonshotai/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
111
111
|
| `ofox/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
112
|
+
| `ofox/moonshotai/kimi-k3.1-pro` | 1.0M | | | | | | $2 | $11 |
|
|
112
113
|
| `ofox/openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
113
114
|
| `ofox/openai/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
|
|
114
115
|
| `ofox/openai/gpt-4o` | 128K | | | | | | $3 | $10 |
|
|
@@ -134,6 +135,7 @@ for await (const chunk of stream) {
|
|
|
134
135
|
| `ofox/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
135
136
|
| `ofox/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
136
137
|
| `ofox/openai/gpt-6.1-sol` | 1.1M | | | | | | $2 | $10 |
|
|
138
|
+
| `ofox/openai/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
|
|
137
139
|
| `ofox/qwen/qwen-flash` | 1.0M | | | | | | $0.02 | $0.22 |
|
|
138
140
|
| `ofox/qwen/qwen-max` | 32K | | | | | | $0.35 | $1 |
|
|
139
141
|
| `ofox/qwen/qwen-plus` | 1.0M | | | | | | $0.12 | $0.29 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# OpenAI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 51 OpenAI models through Mastra's model router. Authentication is handled automatically using the `OPENAI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [OpenAI documentation](https://platform.openai.com/docs/models).
|
|
10
10
|
|
|
@@ -36,7 +36,6 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `openai/chatgpt-image-latest` | — | | | | | | — | — |
|
|
40
39
|
| `openai/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
|
|
41
40
|
| `openai/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
|
|
42
41
|
| `openai/gpt-4o` | 128K | | | | | | $3 | $10 |
|
|
@@ -69,8 +68,6 @@ for await (const chunk of stream) {
|
|
|
69
68
|
| `openai/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
|
|
70
69
|
| `openai/gpt-daybreak-blue-latest` | 1.1M | | | | | | $4 | $20 |
|
|
71
70
|
| `openai/gpt-daybreak-red-latest` | 400K | | | | | | $13 | $75 |
|
|
72
|
-
| `openai/gpt-image-1-mini` | — | | | | | | — | — |
|
|
73
|
-
| `openai/gpt-image-1.5` | — | | | | | | — | — |
|
|
74
71
|
| `openai/gpt-image-2` | — | | | | | | $5 | $30 |
|
|
75
72
|
| `openai/gpt-realtime-2.1` | 128K | | | | | | $4 | $24 |
|
|
76
73
|
| `openai/o3` | 200K | | | | | | $2 | $8 |
|
|
@@ -112,7 +112,6 @@ for await (const chunk of stream) {
|
|
|
112
112
|
| `opencode/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
|
|
113
113
|
| `opencode/muse-spark-1.3` | 1.0M | | | | | | $1 | $4 |
|
|
114
114
|
| `opencode/muse-wonder-1.0` | 1.0M | | | | | | $4 | $20 |
|
|
115
|
-
| `opencode/nemotron-3-ultra-free` | 1.0M | | | | | | — | — |
|
|
116
115
|
| `opencode/nemotron-3.5-lightning-free` | 262K | | | | | | — | — |
|
|
117
116
|
| `opencode/nemotron-3.5-super-vl-free` | 1.0M | | | | | | — | — |
|
|
118
117
|
| `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
|
|
@@ -145,7 +145,7 @@ toolDisplay: event => {
|
|
|
145
145
|
}
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
Approve/deny prompts (`requireApproval`) render as a separate built-in card in every string mode, because inline task entries can't carry interactive buttons. With a `toolDisplay` function, the `approval` event is passed to your function in both streaming and static modes; return a non-blank `{ kind: 'post', message }` to replace the built-in card with your own message (for example, a localized one). Returning `undefined`, a blank message, or `{ kind: 'stream' }` falls back to the built-in card so the user can still approve or deny the request.
|
|
148
|
+
Approve/deny prompts (`requireApproval`) render as a separate built-in card in every string mode, because inline task entries can't carry interactive buttons. With a `toolDisplay` function, the `approval` event is passed to your function in both streaming and static modes; return a non-blank `{ kind: 'post', message }` to replace the built-in card with your own message (for example, a localized one). Returning `undefined`, a blank message, or `{ kind: 'stream' }` falls back to the built-in card so the user can still approve or deny the request. Keep the button ids in the format the default action handler expects. See [Custom approval cards](#custom-approval-cards).
|
|
149
149
|
|
|
150
150
|
```typescript
|
|
151
151
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -168,6 +168,66 @@ const agent = new Agent({
|
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
+
### Custom approval cards
|
|
172
|
+
|
|
173
|
+
A custom approval message replaces the built-in card, but Mastra's default `onAction` handler still handles the button action. It only resumes the suspended run when the button ids are exactly:
|
|
174
|
+
|
|
175
|
+
- Approve: `tool_approve:<toolCallId>`
|
|
176
|
+
- Deny: `tool_deny:<toolCallId>`
|
|
177
|
+
|
|
178
|
+
`<toolCallId>` is `event.toolCallId` from the `approval` event. Any other id, including one with extra whitespace, doesn't match a pending approval. The run stays suspended. The default handler must also stay enabled: don't set `handlers.onAction: false`, and if you provide your own `onAction`, call `defaultHandler()` so approval clicks are processed.
|
|
179
|
+
|
|
180
|
+
A custom `toolDisplay` function replaces the built-in renderer for every tool event. The example below only renders approvals, so other tool calls post nothing; return a message for `result` and `error` events as well if you want those visible.
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
import { Agent } from '@mastra/core/agent'
|
|
184
|
+
import { createSlackAdapter } from '@chat-adapter/slack'
|
|
185
|
+
|
|
186
|
+
const agent = new Agent({
|
|
187
|
+
id: 'localized-approval-agent',
|
|
188
|
+
name: 'Localized Approval Agent',
|
|
189
|
+
instructions: '...',
|
|
190
|
+
model: 'openai/gpt-6.1-sol',
|
|
191
|
+
channels: {
|
|
192
|
+
adapters: {
|
|
193
|
+
slack: {
|
|
194
|
+
adapter: createSlackAdapter(),
|
|
195
|
+
toolDisplay: event => {
|
|
196
|
+
if (event.kind !== 'approval') return undefined
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
kind: 'post',
|
|
200
|
+
message: {
|
|
201
|
+
type: 'card',
|
|
202
|
+
title: `Approve ${event.displayName}?`,
|
|
203
|
+
children: [
|
|
204
|
+
{
|
|
205
|
+
type: 'actions',
|
|
206
|
+
children: [
|
|
207
|
+
{
|
|
208
|
+
type: 'button',
|
|
209
|
+
id: `tool_approve:${event.toolCallId}`,
|
|
210
|
+
label: 'Genehmigen',
|
|
211
|
+
style: 'primary',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
type: 'button',
|
|
215
|
+
id: `tool_deny:${event.toolCallId}`,
|
|
216
|
+
label: 'Ablehnen',
|
|
217
|
+
style: 'danger',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
})
|
|
229
|
+
```
|
|
230
|
+
|
|
171
231
|
## Custom typing status
|
|
172
232
|
|
|
173
233
|
Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes. When the run ends, any status it set is cleared automatically so runs that finish without posting a message don't leave a stale status on the thread.
|
|
@@ -144,16 +144,6 @@ const result = await agent.generate('message for agent')
|
|
|
144
144
|
|
|
145
145
|
**options.onStepFinish** (`LoopConfig['onStepFinish']`): Callback fired after each generation step.
|
|
146
146
|
|
|
147
|
-
**options.telemetry** (`TelemetrySettings`): Settings for OTLP telemetry collection during generation (not Tracing).
|
|
148
|
-
|
|
149
|
-
**options.telemetry.isEnabled** (`boolean`): Whether telemetry collection is enabled.
|
|
150
|
-
|
|
151
|
-
**options.telemetry.recordInputs** (`boolean`): Whether to record input data in telemetry.
|
|
152
|
-
|
|
153
|
-
**options.telemetry.recordOutputs** (`boolean`): Whether to record output data in telemetry.
|
|
154
|
-
|
|
155
|
-
**options.telemetry.functionId** (`string`): Identifier for the function being executed.
|
|
156
|
-
|
|
157
147
|
**options.modelSettings** (`CallSettings`): Model-specific settings like temperature, maxOutputTokens, topP, etc. These settings control how the language model generates responses.
|
|
158
148
|
|
|
159
149
|
**options.modelSettings.temperature** (`number`): Controls randomness in generation (0-2). Higher values make output more random.
|
|
@@ -68,16 +68,6 @@ Scorer judges with legacy model adapters call `generateLegacy()`. They don't rec
|
|
|
68
68
|
|
|
69
69
|
**options.runId** (`string`): Unique ID for this generation run. Useful for tracking and debugging purposes.
|
|
70
70
|
|
|
71
|
-
**options.telemetry** (`TelemetrySettings`): Settings for telemetry collection during generation.
|
|
72
|
-
|
|
73
|
-
**options.telemetry.isEnabled** (`boolean`): Enable or disable telemetry. Disabled by default while experimental.
|
|
74
|
-
|
|
75
|
-
**options.telemetry.recordInputs** (`boolean`): Enable or disable input recording. Enabled by default. You might want to disable input recording to avoid recording sensitive information.
|
|
76
|
-
|
|
77
|
-
**options.telemetry.recordOutputs** (`boolean`): Enable or disable output recording. Enabled by default. You might want to disable output recording to avoid recording sensitive information.
|
|
78
|
-
|
|
79
|
-
**options.telemetry.functionId** (`string`): Identifier for this function. Used to group telemetry data by function.
|
|
80
|
-
|
|
81
71
|
**options.temperature** (`number`): Controls randomness in the model's output. Higher values (e.g., 0.8) make the output more random, lower values (e.g., 0.2) make it more focused and deterministic.
|
|
82
72
|
|
|
83
73
|
**options.toolChoice** (`'auto' | 'none' | 'required' | { type: 'tool'; toolName: string }`): Controls how the agent uses tools during generation.
|
|
@@ -80,16 +80,6 @@ await agent.network(`
|
|
|
80
80
|
|
|
81
81
|
**options.tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
|
|
82
82
|
|
|
83
|
-
**options.telemetry** (`TelemetrySettings`): Settings for OTLP telemetry collection during streaming (not Tracing).
|
|
84
|
-
|
|
85
|
-
**options.telemetry.isEnabled** (`boolean`): Enable or disable telemetry. Disabled by default while experimental.
|
|
86
|
-
|
|
87
|
-
**options.telemetry.recordInputs** (`boolean`): Enable or disable input recording. Enabled by default. You might want to disable input recording to avoid recording sensitive information.
|
|
88
|
-
|
|
89
|
-
**options.telemetry.recordOutputs** (`boolean`): Enable or disable output recording. Enabled by default. You might want to disable output recording to avoid recording sensitive information.
|
|
90
|
-
|
|
91
|
-
**options.telemetry.functionId** (`string`): Identifier for this function. Used to group telemetry data by function.
|
|
92
|
-
|
|
93
83
|
**options.modelSettings** (`CallSettings`): Model-specific settings like temperature, maxOutputTokens, topP, etc. These settings control how the language model generates responses.
|
|
94
84
|
|
|
95
85
|
**options.modelSettings.temperature** (`number`): Controls randomness in generation (0-2). Higher values make output more random.
|
|
@@ -367,11 +367,15 @@ Capture a screenshot of the current page as PNG (viewport by default. Set `fullP
|
|
|
367
367
|
|
|
368
368
|
// Full scrollable page
|
|
369
369
|
{ "fullPage": true }
|
|
370
|
+
|
|
371
|
+
// Also save the PNG to the workspace
|
|
372
|
+
{ "path": "screenshots/home.png" }
|
|
370
373
|
```
|
|
371
374
|
|
|
372
|
-
| Parameter | Type | Description
|
|
373
|
-
| ---------- | --------- |
|
|
374
|
-
| `fullPage` | `boolean` | Capture the full scrollable page instead of only the viewport (optional, default: false)
|
|
375
|
+
| Parameter | Type | Description |
|
|
376
|
+
| ---------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
377
|
+
| `fullPage` | `boolean` | Capture the full scrollable page instead of only the viewport (optional, default: false) |
|
|
378
|
+
| `path` | `string` | Also save the PNG to this path in the agent's workspace. Missing folders are created. The model is told where the file went, or why it couldn't be saved (for example, when the agent has no workspace). Follows the workspace's write-file settings: nothing is saved when writing is turned off, needs approval, or the filesystem is read-only. The screenshot is returned either way (optional) |
|
|
375
379
|
|
|
376
380
|
### `browser_close`
|
|
377
381
|
|
|
@@ -143,6 +143,40 @@ Closes a specific thread's browser session. With 'thread' scope, it closes that
|
|
|
143
143
|
await browser.closeThreadSession('thread-123')
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
### Cookies
|
|
147
|
+
|
|
148
|
+
#### `setCookies(cookies, threadId?)`
|
|
149
|
+
|
|
150
|
+
Adds cookies to a thread's browser. Use it when your app can sign in to a site but the agent can't, such as a preview behind your own login. The cookie value never passes through the model. If the thread's browser hasn't opened yet, the cookies are added when it does. When `threadId` is omitted, the current thread is used.
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
await browser.setCookies(
|
|
154
|
+
[
|
|
155
|
+
{
|
|
156
|
+
name: 'my_app_session',
|
|
157
|
+
value: sessionToken,
|
|
158
|
+
domain: 'app.example.com',
|
|
159
|
+
path: '/',
|
|
160
|
+
httpOnly: true,
|
|
161
|
+
secure: true,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
threadId,
|
|
165
|
+
)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Each cookie is a `BrowserCookie` from `@mastra/core/browser`: `name` and `value`, plus either `url` or `domain` and `path`, and optionally `expires` (Unix time in seconds), `httpOnly`, `secure` and `sameSite`. To cover subdomains, start `domain` with a dot (`.example.com`).
|
|
169
|
+
|
|
170
|
+
With `'thread'` scope, the cookies reach only that thread's browser. With `'shared'` scope every thread uses one browser, so they reach every thread.
|
|
171
|
+
|
|
172
|
+
Cookies still waiting for a browser are dropped when you call `close()`, and with `'thread'` scope when you close that thread with `closeThreadSession()`. With `'shared'` scope they stay until the shared browser opens.
|
|
173
|
+
|
|
174
|
+
A cookie must have either a `url` or both `domain` and `path`; otherwise, `setCookies` throws.
|
|
175
|
+
|
|
176
|
+
`AgentBrowser`, `BrowserViewer`, `FirecrawlBrowser` and `StagehandBrowser` support cookies. Other providers throw.
|
|
177
|
+
|
|
178
|
+
**Returns:** `Promise<void>`
|
|
179
|
+
|
|
146
180
|
### Tools
|
|
147
181
|
|
|
148
182
|
#### `getTools()`
|
|
@@ -326,7 +326,7 @@ Input validation includes:
|
|
|
326
326
|
|
|
327
327
|
Provider responses must contain exactly one answer for each question. Each answer must match the question type or be a refusal. The classifier also rejects invalid choices, out-of-range scores or probabilities, incomplete probability distributions, non-finite token counts, malformed warnings, and invalid response timestamps.
|
|
328
328
|
|
|
329
|
-
Only retryable AI SDK `APICallError` failures are retried. Other errors reject immediately. When all retries fail, `decide()` rethrows the last provider error. Aborting the supplied signal rejects with the signal's abort reason, including when cancellation occurs during retry backoff.
|
|
329
|
+
Only retryable AI SDK `APICallError` failures are retried, two times by default. Set `maxRetries` to change the count. Other errors reject immediately. When all retries fail, `decide()` rethrows the last provider error. Aborting the supplied signal rejects with the signal's abort reason, including when cancellation occurs during retry backoff.
|
|
330
330
|
|
|
331
331
|
## Observability
|
|
332
332
|
|
|
@@ -334,6 +334,8 @@ When an active Mastra span exists, `decide()` creates a `CLASSIFIER_EVALUATION`
|
|
|
334
334
|
|
|
335
335
|
To keep the state and answers out of exported traces, set `hideInput` and `hideOutput` in the `tracingOptions` of the agent or workflow run that calls the classifier. See [hiding sensitive input/output](https://mastra.ai/docs/observability/tracing/overview).
|
|
336
336
|
|
|
337
|
+
In [Studio](https://mastra.ai/docs/studio/overview), filter traces by the Classifier entity type to see classifier calls on their own. Workflow classifier steps appear as classifier nodes in the workflow graph.
|
|
338
|
+
|
|
337
339
|
## Customize provider responses
|
|
338
340
|
|
|
339
341
|
`Classifier` automatically wraps a raw AI SDK decision model in `MastraDecisionModel`. Pass your own wrapper when provider output needs normalization before validation.
|
|
@@ -905,6 +905,14 @@ Creates a new API token. The secret is displayed once and can't be retrieved aga
|
|
|
905
905
|
mastra auth tokens create <name>
|
|
906
906
|
```
|
|
907
907
|
|
|
908
|
+
Use `--permission` to grant the token extra access. The available permission is `databases:write`, which lets the token create and delete managed databases, for example from CI. Only organization admins can create tokens with permissions. Repeat the flag to grant more than one.
|
|
909
|
+
|
|
910
|
+
If the platform creates the token without a requested permission, the command revokes that token and exits with an error. If the revoke also fails, the error shows the `mastra auth tokens revoke` command to run.
|
|
911
|
+
|
|
912
|
+
```bash
|
|
913
|
+
mastra auth tokens create ci --permission databases:write
|
|
914
|
+
```
|
|
915
|
+
|
|
908
916
|
#### `mastra auth tokens revoke`
|
|
909
917
|
|
|
910
918
|
Revokes an API token.
|
|
@@ -90,7 +90,7 @@ const result = await mastraClient.querySpans({
|
|
|
90
90
|
console.log(result.spans)
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Pages default to 100 rows and allow at most 1,000. The response is `{ spans, page: { next } }`, without a total count. Ordering accepts exactly one of `startedAt`, `endedAt`, or `
|
|
93
|
+
Pages default to 100 rows and allow at most 1,000. The response is `{ spans, page: { next } }`, without a total count. Ordering accepts exactly one of `startedAt`, `endedAt`, `timeToFirstChunkMs`, or `timeToFirstTokenMs`, ascending or descending, and defaults to descending start time. Spans without a value for the `timeToFirstChunkMs` or `timeToFirstTokenMs` sort field sort last in both directions.
|
|
94
94
|
|
|
95
95
|
| Fields | Operators |
|
|
96
96
|
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
@@ -98,7 +98,7 @@ Pages default to 100 rows and allow at most 1,000. The response is `{ spans, pag
|
|
|
98
98
|
| `organizationId`, `resourceId`, `runId`, `sessionId`, `userId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | Same string operators |
|
|
99
99
|
| Entity, parent entity and root entity `Type`, `Id`, `Name`, `VersionId` fields, such as `parentEntityId` | Same string operators |
|
|
100
100
|
| `name`, `spanType`, `status` | Same string operators; `name` also accepts `matches` / `notMatches` for normalized whole words and phrases |
|
|
101
|
-
| `startedAt`, `endedAt`, `durationMs`, `timeToFirstChunkMs`
|
|
101
|
+
| `startedAt`, `endedAt`, `durationMs`, `timeToFirstChunkMs`, `timeToFirstTokenMs` | Comparisons, membership and presence |
|
|
102
102
|
| `error` | `exists`, `notExists` |
|
|
103
103
|
|
|
104
104
|
Combine predicates with `and`, `or` and `not`. Membership uses `{ op: 'in', value: { path: 'spanType' }, set: ['agent_run', 'tool_call'] }`. A span's status is `error` when it has an error and `success` otherwise.
|
|
@@ -192,7 +192,7 @@ Use `where` to filter thread rows. Combine predicates with `and`, `or` and `not`
|
|
|
192
192
|
| `resourceId`, `userId`, `runId`, `sessionId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | Same string operators |
|
|
193
193
|
| `entityType`, `entityId`, `entityName`, `entityVersionId` | Same string operators |
|
|
194
194
|
| `status` | `eq`, `ne`, `in`, `notIn`, with values `success` or `error` |
|
|
195
|
-
| `startedAt`, `endedAt`, `timeToFirstChunkMs`
|
|
195
|
+
| `startedAt`, `endedAt`, `timeToFirstChunkMs`, `timeToFirstTokenMs` | `eq`, `ne`, `lt`, `lte`, `gt`, `gte`, `in`, `notIn`, `exists`, `notExists` |
|
|
196
196
|
| `traceCount` | `eq`, `ne`, `lt`, `lte`, `gt`, `gte` |
|
|
197
197
|
|
|
198
198
|
For example, filter for threads from selected agents with at least three traces:
|
|
@@ -221,18 +221,19 @@ Presence filters use `{ op: 'exists', path: 'userId' }` to check for a non-null
|
|
|
221
221
|
|
|
222
222
|
The response is `{ threads, page: { next } }`, without a total count. Each entry in `threads` contains these fields:
|
|
223
223
|
|
|
224
|
-
| Returned fields | Meaning
|
|
225
|
-
| -------------------------------------------------------------------------------------------------------------------------- |
|
|
226
|
-
| `threadId`, `organizationId` | Thread identity. Equal thread IDs in different organizations remain separate.
|
|
227
|
-
| `firstTraceId`, `lastTraceId` | Earliest and latest trace by start time. Equal start times use trace ID as a deterministic tie-breaker.
|
|
228
|
-
| `resourceId`, `userId`, `runId`, `sessionId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | First-trace context, or `null` when missing.
|
|
229
|
-
| `entityType`, `entityId`, `entityName`, `entityVersionId` | First-trace entity.
|
|
230
|
-
| `startedAt`, `endedAt` | Earliest start and maximum end time across the thread.
|
|
231
|
-
| `status` | `error` when the last-started trace's root span has an error, otherwise `success`.
|
|
232
|
-
| `traceCount` | Number of logical traces in the thread.
|
|
233
|
-
| `inputPreview` | First trace's input preview.
|
|
234
|
-
| `outputPreview`, `errorPreview` | Last-started trace's previews.
|
|
235
|
-
| `timeToFirstChunkMs` | First trace's root agent time to first chunk, in milliseconds. `null` when unavailable or the root isn't an agent.
|
|
224
|
+
| Returned fields | Meaning |
|
|
225
|
+
| -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
226
|
+
| `threadId`, `organizationId` | Thread identity. Equal thread IDs in different organizations remain separate. |
|
|
227
|
+
| `firstTraceId`, `lastTraceId` | Earliest and latest trace by start time. Equal start times use trace ID as a deterministic tie-breaker. |
|
|
228
|
+
| `resourceId`, `userId`, `runId`, `sessionId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | First-trace context, or `null` when missing. |
|
|
229
|
+
| `entityType`, `entityId`, `entityName`, `entityVersionId` | First-trace entity. |
|
|
230
|
+
| `startedAt`, `endedAt` | Earliest start and maximum end time across the thread. |
|
|
231
|
+
| `status` | `error` when the last-started trace's root span has an error, otherwise `success`. |
|
|
232
|
+
| `traceCount` | Number of logical traces in the thread. |
|
|
233
|
+
| `inputPreview` | First trace's input preview. |
|
|
234
|
+
| `outputPreview`, `errorPreview` | Last-started trace's previews. |
|
|
235
|
+
| `timeToFirstChunkMs` | First trace's root agent time to first chunk, in milliseconds. `null` when unavailable or the root isn't an agent. |
|
|
236
|
+
| `timeToFirstTokenMs` | First trace's root agent time to first token, in milliseconds, with the same `null` rules. Present only when the store supports it. |
|
|
236
237
|
|
|
237
238
|
An earlier-started trace can finish last. In that case, it supplies `endedAt`, while the last-started trace still supplies status and output/error previews. Missing first-trace values aren't replaced with values from a later trace.
|
|
238
239
|
|
|
@@ -107,7 +107,7 @@ export const mastra = new Mastra({
|
|
|
107
107
|
|
|
108
108
|
### deployer
|
|
109
109
|
|
|
110
|
-
**Type:** `
|
|
110
|
+
**Type:** `IDeployer`
|
|
111
111
|
|
|
112
112
|
Deployment provider for publishing applications to cloud platforms.
|
|
113
113
|
|
|
@@ -1033,6 +1033,8 @@ export const mastra = new Mastra({
|
|
|
1033
1033
|
|
|
1034
1034
|
Request timeout in milliseconds. Requests that exceed this duration will be terminated.
|
|
1035
1035
|
|
|
1036
|
+
On serverless platforms this limit is independent of the platform's own function timeout. For example, the [Vercel deployer](https://mastra.ai/reference/deployer/vercel) sets Vercel's limit with `maxDuration` (seconds) while `server.timeout` still applies, so long requests need both raised.
|
|
1037
|
+
|
|
1036
1038
|
```typescript
|
|
1037
1039
|
import { Mastra } from '@mastra/core'
|
|
1038
1040
|
|