@mastra/mcp-docs-server 1.3.10-alpha.7 → 1.3.10-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/channels.md +15 -0
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/harness/schedules.md +2 -0
- package/.docs/docs/mastra-platform/server.md +10 -6
- package/.docs/docs/mastra-platform/studio.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -1
- package/.docs/docs/signals/thread-streams.md +34 -3
- package/.docs/docs/workflows/agents-and-tools.md +6 -1
- package/.docs/docs/workflows/scheduled-workflows.md +6 -2
- package/.docs/integrations/observability/opentelemetry.md +27 -4
- package/.docs/integrations/voice/speechify.md +23 -10
- package/.docs/models/gateways/merge-gateway.md +2 -1
- package/.docs/models/gateways/neon.md +2 -1
- package/.docs/models/gateways/netlify.md +1 -2
- package/.docs/models/gateways/openrouter.md +2 -2
- package/.docs/models/gateways/vercel.md +3 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aimlapi.md +2 -1
- package/.docs/models/providers/commandcode.md +2 -1
- package/.docs/models/providers/edenai.md +3 -1
- package/.docs/models/providers/empiriolabs.md +4 -4
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/inceptron.md +2 -2
- package/.docs/models/providers/kilo.md +11 -11
- package/.docs/models/providers/llmgateway-providers.md +4 -5
- package/.docs/models/providers/llmgateway.md +2 -2
- package/.docs/models/providers/lowrouter.md +2 -1
- package/.docs/models/providers/nano-gpt.md +15 -12
- package/.docs/models/providers/nearai.md +2 -1
- package/.docs/models/providers/openai.md +2 -1
- package/.docs/models/providers/requesty.md +3 -1
- package/.docs/models/providers/wandb.md +2 -2
- package/.docs/reference/agents/agent.md +3 -1
- package/.docs/reference/agents/channels.md +3 -1
- package/.docs/reference/agents/durable-agent.md +17 -9
- package/.docs/reference/channels/slack-provider.md +2 -0
- package/.docs/reference/client-js/agents.md +2 -0
- package/.docs/reference/client-js/observability.md +13 -14
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/core/mastra-model-gateway.md +5 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +10 -8
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -0
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +4 -0
- package/.docs/reference/observability/tracing/interfaces.md +21 -1
- package/.docs/reference/processors/classifier-processor.md +1 -1
- package/.docs/reference/processors/processor-interface.md +1 -1
- package/.docs/reference/processors/provider-history-compat.md +13 -13
- package/.docs/reference/processors/stream-error-retry-processor.md +9 -5
- package/.docs/reference/schedules/overview.md +16 -0
- package/.docs/reference/storage/overview.md +26 -9
- package/.docs/reference/streaming/ChunkType.md +18 -0
- package/.docs/reference/streaming/agents/streamLegacy.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/tools/document-chunker-tool.md +1 -1
- package/.docs/reference/vectors/astra.md +2 -0
- package/.docs/reference/vectors/azure-ai-search.md +1 -1
- package/.docs/reference/vectors/convex.md +1 -1
- package/.docs/reference/vectors/couchbase.md +12 -5
- package/.docs/reference/vectors/duckdb.md +5 -5
- package/.docs/reference/vectors/mongodb.md +5 -5
- package/.docs/reference/vectors/pinecone.md +1 -1
- package/.docs/reference/vectors/qdrant.md +1 -1
- package/.docs/reference/vectors/s3vectors.md +3 -0
- package/.docs/reference/vectors/upstash.md +8 -4
- package/.docs/reference/vectors/vectorize.md +4 -2
- package/.docs/reference/vectors/weaviate.md +1 -1
- package/.docs/reference/voice/voice.send.md +1 -1
- package/.docs/reference/workflows/run-methods/restart.md +1 -1
- package/.docs/reference/workflows/run-methods/resume.md +1 -1
- package/.docs/reference/workflows/run-methods/start.md +1 -1
- package/.docs/reference/workflows/run.md +2 -2
- package/.docs/reference/workflows/workflow-methods/dountil.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +4 -2
- package/.docs/reference/workspace/workspace-class.md +11 -11
- package/package.json +5 -5
package/.docs/docs/channels.md
CHANGED
|
@@ -162,6 +162,21 @@ export const deleteFile = createTool({
|
|
|
162
162
|
|
|
163
163
|
When the agent calls this tool, users see a card with the tool name, arguments, and Approve and Deny actions. The tool only executes after approval.
|
|
164
164
|
|
|
165
|
+
By default, only the user who requested a tool call can approve or deny it. For a shared channel where another member should be able to respond, set `toolApprovers: 'anyone'` on that adapter:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
channels: {
|
|
169
|
+
adapters: {
|
|
170
|
+
slack: {
|
|
171
|
+
adapter: createSlackAdapter(),
|
|
172
|
+
toolApprovers: 'anyone',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
This bypasses only the requester check: actions still need a pending tool approval and a mapped thread. The default isn't a strict identity guarantee when a run has no recorded requester (for example, a scheduled run); in that case, another channel member may be able to respond. If stored messages identify multiple possible requesters after a restart, requester-only mode instead rejects their clicks.
|
|
179
|
+
|
|
165
180
|
Set `toolDisplay: 'text'` on an adapter to render tool calls as plain text instead of interactive cards. In `'hidden'` mode, `autoResumeSuspendedTools` can resume data-bearing `suspend()` flows when a later user message arrives on the same thread. This requires memory. Hidden mode only suppresses approval buttons. It doesn't turn a message into consent. Tools that require approval remain suspended until an explicit approval or decline is submitted through a UI or API action.
|
|
166
181
|
|
|
167
182
|
### Custom action handling
|
|
@@ -172,7 +172,7 @@ for await (const chunk of output.fullStream) {
|
|
|
172
172
|
|
|
173
173
|
Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. For a completed run, observation replays the retained events and closes. If the run is unknown or its history has been cleared and no live run remains, observation closes without events. The HTTP observe endpoint returns an empty, closed stream in this case rather than waiting for its idle timeout.
|
|
174
174
|
|
|
175
|
-
The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
|
|
175
|
+
The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. Evented agents on a cross-process PubSub, such as Redis Streams, need a server cache shared by every process, such as `RedisServerCache`, for offsets to skip earlier events. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
|
|
176
176
|
|
|
177
177
|
Replay isn't a permanent execution archive. Events remain available only until [cleanup](#cleanup) clears them or the cache removes them. A workflow snapshot can't reconstruct cleared stream events, and disabling caching prevents historical replay.
|
|
178
178
|
|
|
@@ -12,6 +12,8 @@ Schedules are persisted, so they survive restarts and redeploys. Manage them at
|
|
|
12
12
|
|
|
13
13
|
> **Note:** Schedules require a [storage](https://mastra.ai/docs/storage) adapter that implements the schedules domain. See the [`mastra.schedules` reference](https://mastra.ai/reference/schedules/overview) for supported adapters and API behavior.
|
|
14
14
|
|
|
15
|
+
Persisting a schedule doesn't guarantee delivery of each occurrence. Publication is best-effort: the scheduler makes up to three publication attempts, but exhausted attempts or a publisher crash can skip an occurrence. Skipped occurrences aren't replayed, while later recurring fires can continue. See [Schedule delivery guarantees](https://mastra.ai/reference/schedules/overview) for failure reporting and manual rerun precautions.
|
|
16
|
+
|
|
15
17
|
## Quickstart
|
|
16
18
|
|
|
17
19
|
The following schedule runs the `pinger` agent every hour. It has no thread, so each fire is an isolated `agent.generate()` run.
|
|
@@ -50,7 +50,7 @@ You get a stable API endpoint with environment variable management and custom do
|
|
|
50
50
|
|
|
51
51
|
The command runs `mastra build` and uploads its artifact, then builds and deploys a Docker image. On first deploy, the CLI creates a `.mastra-project.json` file linking your local project to the platform. Commit this file so subsequent deploys and CI/CD target the same project.
|
|
52
52
|
|
|
53
|
-
> **Note:**
|
|
53
|
+
> **Note:** The CLI uploads environment variables from one env file. It uses `.env.<environment>` if it exists (for example `.env.production` for the default `production` environment), otherwise the only `.env` or `.env.*` file. If there are several and none matches, it asks which one to use; in non-interactive runs (`--yes` or CI), pass `--env-file <file>` instead. Pass `--env-file` to override the choice. Every deploy merges the file's vars into the environment's stored env vars: values from the file win, except that an empty value doesn't clear a stored one. The CLI lists the keys it will overwrite and asks you to confirm (skipped with `--yes` or in CI). To manage a var only in the dashboard, remove it from the env file. If no env file exists, nothing is uploaded and the environment keeps its stored env vars. Review and sanitize the selected file before deploying to avoid uploading development-only or personal secrets.
|
|
54
54
|
|
|
55
55
|
See the [CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags.
|
|
56
56
|
|
|
@@ -134,7 +134,7 @@ With the **Persistent Server add-on** enabled, the service stays awake even with
|
|
|
134
134
|
|
|
135
135
|
## CI/CD
|
|
136
136
|
|
|
137
|
-
Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After your first interactive deploy, CI/CD needs
|
|
137
|
+
Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After your first interactive deploy, CI/CD needs an API token, your organization and project IDs, and the `.mastra-project.json` file committed to your repository.
|
|
138
138
|
|
|
139
139
|
> **Tip:** If your code lives on GitHub, the [GitHub integration](https://mastra.ai/docs/mastra-platform/github) gives you push-to-deploy without writing a workflow file. Use the CLI-based CI/CD flow below when you need GitLab, another CI provider, or custom build steps before deploy.
|
|
140
140
|
|
|
@@ -150,7 +150,9 @@ Automate deployments from GitHub Actions, GitLab CI, or any CI provider. After y
|
|
|
150
150
|
|
|
151
151
|
2. Add the token as a secret in your CI provider. In GitHub Actions, go to **Settings → Secrets and variables → Actions** and create the `MASTRA_API_TOKEN` secret.
|
|
152
152
|
|
|
153
|
-
3. Ensure your `.mastra-project.json` file is committed to the repository.
|
|
153
|
+
3. Ensure your `.mastra-project.json` file is committed to the repository.
|
|
154
|
+
|
|
155
|
+
4. Add `MASTRA_ORG_ID` and `MASTRA_PROJECT_ID` to your CI provider, using the `organizationId` and `projectId` values from `.mastra-project.json`. When `MASTRA_API_TOKEN` is set, `mastra deploy` runs headless and fails if either variable is missing.
|
|
154
156
|
|
|
155
157
|
### The `--yes` flag
|
|
156
158
|
|
|
@@ -187,6 +189,8 @@ jobs:
|
|
|
187
189
|
run: npx mastra deploy --yes
|
|
188
190
|
env:
|
|
189
191
|
MASTRA_API_TOKEN: ${{ secrets.MASTRA_API_TOKEN }}
|
|
192
|
+
MASTRA_ORG_ID: ${{ secrets.MASTRA_ORG_ID }}
|
|
193
|
+
MASTRA_PROJECT_ID: ${{ secrets.MASTRA_PROJECT_ID }}
|
|
190
194
|
```
|
|
191
195
|
|
|
192
196
|
Adjust the `paths` filter and `working-directory` if your Mastra project is in a subdirectory (e.g. a monorepo).
|
|
@@ -207,14 +211,14 @@ deploy:
|
|
|
207
211
|
- npx mastra deploy --yes
|
|
208
212
|
```
|
|
209
213
|
|
|
210
|
-
Add `MASTRA_API_TOKEN` as
|
|
214
|
+
Add `MASTRA_API_TOKEN`, `MASTRA_ORG_ID`, and `MASTRA_PROJECT_ID` as CI/CD variables in **Settings → CI/CD → Variables**.
|
|
211
215
|
|
|
212
216
|
### Other CI providers
|
|
213
217
|
|
|
214
218
|
Any CI system that runs Node.js and shell commands works with Mastra:
|
|
215
219
|
|
|
216
220
|
1. Install dependencies.
|
|
217
|
-
2. Set `MASTRA_API_TOKEN` as
|
|
221
|
+
2. Set `MASTRA_API_TOKEN`, `MASTRA_ORG_ID`, and `MASTRA_PROJECT_ID` as environment variables.
|
|
218
222
|
3. Run `mastra deploy --yes`.
|
|
219
223
|
|
|
220
224
|
### Verify the deploy
|
|
@@ -242,7 +246,7 @@ The following example adds a verification step to a GitHub Actions workflow:
|
|
|
242
246
|
|
|
243
247
|
### Override project config with environment variables
|
|
244
248
|
|
|
245
|
-
|
|
249
|
+
For interactive deploys, the CLI reads `organizationId` and `projectId` from `.mastra-project.json` by default. When `MASTRA_API_TOKEN` is set, both variables below are required. To override these values (e.g. deploying to a different project from the same repository), set the following environment variables:
|
|
246
250
|
|
|
247
251
|
| Variable | Description |
|
|
248
252
|
| ------------------- | ---------------------------------------------------------- |
|
|
@@ -52,7 +52,7 @@ On your first deploy, the CLI prompts you to create a new project or select an e
|
|
|
52
52
|
|
|
53
53
|
The `mastra deploy` command builds your project and compiles `src/mastra/` into `.mastra/output`. It packages that output as an artifact ZIP, then uploads and deploys it to a cloud sandbox.
|
|
54
54
|
|
|
55
|
-
A deploy transitions through **queued → uploading → starting → deploying → running** or **failed** if something goes wrong. If a sandbox is already running for your project, the platform updates it in place with no downtime. Otherwise, it creates a fresh sandbox. Your instance URL is assigned per
|
|
55
|
+
A deploy transitions through **queued → uploading → starting → deploying → running** or **failed** if something goes wrong. If a sandbox is already running for your project, the platform updates it in place with no downtime. Otherwise, it creates a fresh sandbox. Your instance URL is assigned per environment and remains stable across deploys to that environment.
|
|
56
56
|
|
|
57
57
|
See the [`mastra deploy` CLI reference](https://mastra.ai/reference/cli/mastra) for the full list of flags and CI/CD usage.
|
|
58
58
|
|
|
@@ -190,10 +190,11 @@ The MastraStorageExporter includes reliable error handling for production use:
|
|
|
190
190
|
|
|
191
191
|
`DefaultExporter` emits structured drop events when it can't persist observability data. Register an exporter or bridge with `onDroppedEvent` to forward these drops to alerting or monitoring.
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
Events are dropped for these reasons:
|
|
194
194
|
|
|
195
195
|
- `unsupported-storage`: The storage provider doesn't implement the signal type.
|
|
196
196
|
- `retry-exhausted`: The exporter retried a batch up to `maxRetries` times and then dropped it.
|
|
197
|
+
- `span-not-updatable`: Under `realtime` or `batch-with-updates`, a span update or end reached storage but didn't apply, because the span was never stored or had already ended. Ended spans don't change.
|
|
197
198
|
|
|
198
199
|
The following example demonstrates forwarding drop details to a monitoring endpoint:
|
|
199
200
|
|
|
@@ -51,13 +51,42 @@ Pass `withInitialHistory: true` to begin with a `thread-history` chunk, which ca
|
|
|
51
51
|
|
|
52
52
|
Use `runId` to group chunks from the same run. The exception is [`thread-history`](https://mastra.ai/reference/streaming/ChunkType), which has an empty `runId` because its messages can span several runs. The subscription's [`activeRunId()`](https://mastra.ai/reference/agents/agent) returns the active run's ID or `null`.
|
|
53
53
|
|
|
54
|
-
The public stream
|
|
54
|
+
The public subscription stream includes `AgentChunkType`. `withInitialHistory` adds `ThreadHistoryChunk`, and `withRunStatus: true` adds `ThreadRunStatusChunk`. Both options default to `false`. The [ChunkType reference](https://mastra.ai/reference/streaming/ChunkType) lists the fields for model output, tool calls and results, approvals, aborts, and errors. To observe queue counts, use [`subscribeThreadEvents()`](https://mastra.ai/reference/signals/thread-events) separately.
|
|
55
|
+
|
|
56
|
+
### Detect when a run finishes
|
|
57
|
+
|
|
58
|
+
Pass `withRunStatus: true` to opt in to run outcomes. Existing subscriptions don't receive these chunks by default.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const subscription = await agent.subscribeToThread({
|
|
62
|
+
resourceId: 'user-123',
|
|
63
|
+
threadId: 'thread-456',
|
|
64
|
+
withRunStatus: true,
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A [`thread-run-status`](https://mastra.ai/reference/streaming/ChunkType) chunk identifies the run's outcome independently of its output:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
const chunk = {
|
|
72
|
+
type: 'thread-run-status',
|
|
73
|
+
runId: 'run-123',
|
|
74
|
+
from: 'AGENT',
|
|
75
|
+
payload: { status: 'success' },
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`status` is `success`, `failed`, `aborted`, or `suspended`. Live output arrives before its status. A suspension is resumable: the same run can later produce more output and a final status. A run outcome doesn't close the thread subscription, which continues listening for later runs.
|
|
80
|
+
|
|
81
|
+
With `withInitialHistory`, the first chunk's payload is `{ messages, hasMore, activeRunId }`. `activeRunId` identifies the run holding thread ownership during hydration, or is `null` when idle. Use `thread-run-status` to determine the outcome. An idle thread alone doesn't indicate success.
|
|
82
|
+
|
|
83
|
+
With `withRunStatus: true`, retained outcomes are delivered even when a run finished before you subscribed and its text is already in history. A late subscriber using both options receives one status for every still-retained finished run, including runs outside the initial history page. It doesn't receive only the newest run's status. Final outcomes are deduplicated within one subscription. Suspension notifications are deduplicated per execution segment. A reconnect creates a new subscription and may deliver the same outcome again. Group updates by `runId` rather than treating each delivery as a new answer.
|
|
55
84
|
|
|
56
85
|
### Approve tool calls
|
|
57
86
|
|
|
58
87
|
When a run pauses for tool approval, send your decision with [`client.getAgent().sendToolApproval()`](https://mastra.ai/reference/client-js/agents) or the [server approval route](https://mastra.ai/reference/server/routes). The existing subscription receives output when the run resumes.
|
|
59
88
|
|
|
60
|
-
A paused run keeps ownership of the thread. Signals that try to start a new run receive an `accepted` action of `blocked` until the paused run resumes or is aborted. Pending approvals and suspensions are replayed when you subscribe again. Completed
|
|
89
|
+
A paused run keeps ownership of the thread. Signals that try to start a new run receive an `accepted` action of `blocked` until the paused run resumes or is aborted. Pending approvals and suspensions are replayed when you subscribe again. Completed stored output isn't replayed. Retained run outcomes are delivered when `withRunStatus: true`. [When the agent sees your input](https://mastra.ai/docs/signals/sending-signals) covers the interrupt and wait rules for input that arrives during a run.
|
|
61
90
|
|
|
62
91
|
### Filter signals in a subscription
|
|
63
92
|
|
|
@@ -73,7 +102,9 @@ Use `reconnect: true` for long-lived subscriptions. `processDataStream()` then r
|
|
|
73
102
|
|
|
74
103
|
A reconnect can resume output that the shared [PubSub backend](https://mastra.ai/docs/server/pubsub) still retains. It can't recover events held only in another process's in-memory cache. Use `withInitialHistory` to reload the newest page of stored messages when you need conversation history.
|
|
75
104
|
|
|
76
|
-
Stored messages aren't a recording of every streamed text fragment. Reconnecting doesn't replay completed stored
|
|
105
|
+
Stored messages aren't a recording of every streamed text fragment. Reconnecting doesn't replay completed stored output or reconstruct fragments that weren't retained.
|
|
106
|
+
|
|
107
|
+
Outcome recovery is bounded by the PubSub backend's retention, not by the history page size. Redis Streams keeps compact terminal events and execution authority metadata when saved output is trimmed, but its configured stream length and idle TTL can still evict them. This isn't a permanent run audit log or a guaranteed time window. Upgrade both `@mastra/core` and `@mastra/redis-streams` for recovery after trimming. Older adapters may delete terminal events with the output.
|
|
77
108
|
|
|
78
109
|
### SSE heartbeats for custom endpoints
|
|
79
110
|
|
|
@@ -142,13 +142,18 @@ Call tools inside a step's `.execute()` function. You get more control over the
|
|
|
142
142
|
|
|
143
143
|
```typescript
|
|
144
144
|
import { testTool } from '../tools/test-tool'
|
|
145
|
+
import { isValidationError } from '@mastra/core/tools'
|
|
145
146
|
import { createStep } from '@mastra/core/workflows'
|
|
146
147
|
|
|
147
148
|
const step2 = createStep({
|
|
148
149
|
execute: async ({ inputData, requestContext }) => {
|
|
149
150
|
const { text } = inputData
|
|
150
151
|
|
|
151
|
-
const response = await testTool.execute({ text }, { requestContext })
|
|
152
|
+
const response = await testTool.execute?.({ text }, { requestContext })
|
|
153
|
+
|
|
154
|
+
if (!response || isValidationError(response)) {
|
|
155
|
+
throw new Error('testTool did not return a result')
|
|
156
|
+
}
|
|
152
157
|
|
|
153
158
|
return {
|
|
154
159
|
emphasized: response.emphasized,
|
|
@@ -40,6 +40,10 @@ export const dailyReport = createWorkflow({
|
|
|
40
40
|
|
|
41
41
|
A separate "register schedule" call won't happen. The scheduler reads `schedule` straight off the workflow when `Mastra` boots.
|
|
42
42
|
|
|
43
|
+
## Delivery guarantees
|
|
44
|
+
|
|
45
|
+
Scheduled workflow publication is best-effort. Each occurrence is claimed before its start event is published, with up to three publication attempts. Exhausted attempts or a publisher crash can skip that occurrence. Skipped occurrences aren't automatically replayed, but later recurring fires can continue. A schedule marked `completed` has exhausted its cadence, which doesn't confirm execution. See [Schedule delivery guarantees](https://mastra.ai/reference/schedules/overview) for failure reporting and manual rerun precautions.
|
|
46
|
+
|
|
43
47
|
## Execution engine
|
|
44
48
|
|
|
45
49
|
Declaring `schedule` doesn't change how the workflow runs. Scheduled fires run in-process on the host that runs the scheduler, the same way `workflow.start()` or an HTTP-triggered run does. A workflow that declares `schedule` needs no extra storage or worker setup to run directly.
|
|
@@ -112,13 +116,13 @@ A workflow's header includes a **Schedules** action when the workflow has at lea
|
|
|
112
116
|
|
|
113
117
|
### Trigger history
|
|
114
118
|
|
|
115
|
-
|
|
119
|
+
The scheduler attempts to record a trigger row with the run ID, scheduled time, actual fire time, and publish status. A publisher crash after claiming an occurrence or after publication is accepted can leave no trigger row. The schedule detail page joins recorded triggers to the corresponding workflow runs and shows:
|
|
116
120
|
|
|
117
121
|
- The run's status (`running`, `success`, `failed`, `suspended`, `canceled`) as a badge.
|
|
118
122
|
- The run's start time and duration.
|
|
119
123
|
- A link to the run's full graph view at `/workflows/:workflowId/graph/:runId`.
|
|
120
124
|
- A `pending` badge for triggers whose run record hasn't been written yet, due to a race between trigger publish and run snapshot.
|
|
121
|
-
- A `publish failed` badge with the publish error
|
|
125
|
+
- A `publish failed` badge with the final publish error after all three attempts fail. The outcome is unknown: the transport may have accepted the event before returning the error.
|
|
122
126
|
|
|
123
127
|
Triggers in a non-terminal state cause the panel to poll every five seconds until they reach a terminal state. The list paginates, so long-running schedules don't load thousands of rows up front.
|
|
124
128
|
|
|
@@ -8,13 +8,13 @@ Mastra supports OpenTelemetry (OTEL) through an exporter for sending traces and
|
|
|
8
8
|
|
|
9
9
|
## Exporter
|
|
10
10
|
|
|
11
|
-
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, Sentry, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, telemetry.dev, and more.
|
|
11
|
+
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, Sentry, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, telemetry.dev, Sazabi, and more.
|
|
12
12
|
|
|
13
13
|
### Installation
|
|
14
14
|
|
|
15
15
|
Each provider requires specific protocol packages. Install the base exporter plus the protocol package for your provider:
|
|
16
16
|
|
|
17
|
-
#### For HTTP/Protobuf
|
|
17
|
+
#### For HTTP/Protobuf providers (SigNoz, New Relic, Sentry, Laminar, MLflow, Latitude, telemetry.dev)
|
|
18
18
|
|
|
19
19
|
**npm**:
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ yarn add @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-proto
|
|
|
40
40
|
bun add @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-proto
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
#### For `gRPC`
|
|
43
|
+
#### For `gRPC` providers (Dash0, Datadog)
|
|
44
44
|
|
|
45
45
|
**npm**:
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ yarn add @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-grpc @g
|
|
|
66
66
|
bun add @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-grpc @grpc/grpc-js
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
#### For HTTP/JSON
|
|
69
|
+
#### For HTTP/JSON providers (Traceloop, Sazabi)
|
|
70
70
|
|
|
71
71
|
**npm**:
|
|
72
72
|
|
|
@@ -199,6 +199,29 @@ new OtelExporter({
|
|
|
199
199
|
})
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
+
#### Sazabi
|
|
203
|
+
|
|
204
|
+
[Sazabi](https://sazabi.com) is an AI-native observability platform that ingests OTLP traces. In Sazabi, add a Mastra log source and copy its intake URL. The URL carries your project key, so no auth header is needed:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
SAZABI_INTAKE_URL=https://...
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Use the `custom` provider with HTTP/JSON:
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
new OtelExporter({
|
|
214
|
+
provider: {
|
|
215
|
+
custom: {
|
|
216
|
+
endpoint: process.env.SAZABI_INTAKE_URL!,
|
|
217
|
+
protocol: 'http/json',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
})
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
See [Sazabi's Mastra guide](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/mastra) for the full setup.
|
|
224
|
+
|
|
202
225
|
#### Dash0
|
|
203
226
|
|
|
204
227
|
[Dash0](https://www.dash0.com/) provides real-time observability with automatic insights.
|
|
@@ -17,27 +17,30 @@ const voice = new SpeechifyVoice()
|
|
|
17
17
|
// Initialize with custom configuration
|
|
18
18
|
const voice = new SpeechifyVoice({
|
|
19
19
|
speechModel: {
|
|
20
|
-
name: 'simba-3.
|
|
20
|
+
name: 'simba-3.5',
|
|
21
21
|
apiKey: 'your-api-key',
|
|
22
22
|
},
|
|
23
|
-
speaker: 'harper_32', // Default voice
|
|
23
|
+
speaker: 'harper_32', // Default voice
|
|
24
24
|
})
|
|
25
25
|
|
|
26
26
|
// Convert text to speech
|
|
27
27
|
const audioStream = await voice.speak('Hello, world!', {
|
|
28
28
|
speaker: 'imogen_32', // Override default voice
|
|
29
29
|
})
|
|
30
|
+
|
|
31
|
+
// Any voice speaks any of simba-3.5's 48 languages
|
|
32
|
+
const portuguese = await voice.speak('Olá, mundo!', { language: 'pt-BR' })
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
## Constructor parameters
|
|
33
36
|
|
|
34
|
-
**speechModel** (`SpeechifyConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'simba-
|
|
37
|
+
**speechModel** (`SpeechifyConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'simba-3.5' }`)
|
|
35
38
|
|
|
36
|
-
**speechModel.name** (`SpeechifyModel`): The Speechify model to use ('simba-3.2', 'simba-3.0', 'simba-english'
|
|
39
|
+
**speechModel.name** (`SpeechifyModel`): The Speechify model to use ('simba-3.5', 'simba-3.2', 'simba-3.0', or the legacy 'simba-english' and 'simba-multilingual')
|
|
37
40
|
|
|
38
41
|
**speechModel.apiKey** (`string`): Speechify API key. Falls back to SPEECHIFY_API_KEY environment variable
|
|
39
42
|
|
|
40
|
-
**speaker** (`SpeechifyVoiceId`): Default voice ID to use for speech synthesis.
|
|
43
|
+
**speaker** (`SpeechifyVoiceId`): Default voice ID to use for speech synthesis. Any id from Speechify's catalog; every catalog voice works on simba-3.5. simba-3.2 accepts English voices only (Default: `'harper_32' for the Simba 3 models, otherwise 'george'`)
|
|
41
44
|
|
|
42
45
|
## Methods
|
|
43
46
|
|
|
@@ -53,11 +56,19 @@ Converts text to speech using the configured speech model and voice.
|
|
|
53
56
|
|
|
54
57
|
**options.model** (`SpeechifyModel`): Override the default model for this request
|
|
55
58
|
|
|
59
|
+
**options.language** (`string`): Locale of the text, such as 'pt-BR'. On simba-3.5 any voice speaks it
|
|
60
|
+
|
|
61
|
+
**options.audioFormat** (`'mp3' | 'ogg' | 'aac' | 'pcm'`): Container of the audio stream
|
|
62
|
+
|
|
63
|
+
**options.outputFormat** (`string`): Sample rate and bitrate, such as 'mp3_24000_128' or 'pcm_16000'
|
|
64
|
+
|
|
65
|
+
**options.options** (`object`): Synthesis switches such as { loudness_normalization: true }
|
|
66
|
+
|
|
56
67
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
57
68
|
|
|
58
69
|
### `getSpeakers()`
|
|
59
70
|
|
|
60
|
-
Returns
|
|
71
|
+
Returns every voice the API key can use, read live from Speechify's catalog. Each entry contains:
|
|
61
72
|
|
|
62
73
|
**voiceId** (`string`): Unique identifier for the voice
|
|
63
74
|
|
|
@@ -67,6 +78,8 @@ Returns an array of available voice options, where each node contains:
|
|
|
67
78
|
|
|
68
79
|
**gender** (`string`): Gender of the voice
|
|
69
80
|
|
|
81
|
+
**models** (`string[]`): Models that render this voice
|
|
82
|
+
|
|
70
83
|
### `listen()`
|
|
71
84
|
|
|
72
85
|
This method isn't supported by Speechify and will throw an error. Speechify doesn't provide speech-to-text functionality.
|
|
@@ -74,10 +87,10 @@ This method isn't supported by Speechify and will throw an error. Speechify does
|
|
|
74
87
|
## Notes
|
|
75
88
|
|
|
76
89
|
- Speechify requires an API key for authentication
|
|
77
|
-
- The default model is 'simba-
|
|
78
|
-
- 'simba-3.2' is
|
|
79
|
-
- 'simba-3.
|
|
80
|
-
- 'simba-
|
|
90
|
+
- The default model is 'simba-3.5', Speechify's recommended model: 48 languages on one id, and every catalog voice speaks all of them
|
|
91
|
+
- 'simba-3.2' is English only; a non-English voice returns an error
|
|
92
|
+
- 'simba-3.0' covers English, German, Spanish, French, Italian and Portuguese
|
|
93
|
+
- 'simba-english' and 'simba-multilingual' are legacy ids. New workspaces get a 'model_retired' error, and from 2026-11-21 they are served by 'simba-3.2' and 'simba-3.5'
|
|
81
94
|
- The default speaker follows the configured model: 'harper_32' for the Simba 3 models, otherwise 'george'
|
|
82
95
|
- Speech-to-text functionality isn't supported
|
|
83
96
|
- Additional audio stream options can be passed through the speak() method's options parameter
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Merge Gateway
|
|
6
6
|
|
|
7
|
-
Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
7
|
+
Merge Gateway aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 202 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Merge Gateway documentation](https://docs.merge.dev/merge-gateway).
|
|
10
10
|
|
|
@@ -165,6 +165,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
165
165
|
| `openai/gpt-6-luna` |
|
|
166
166
|
| `openai/gpt-6-sol` |
|
|
167
167
|
| `openai/gpt-6.1-sol` |
|
|
168
|
+
| `openai/gpt-6.1-terra` |
|
|
168
169
|
| `openai/gpt-audio` |
|
|
169
170
|
| `openai/gpt-audio-mini` |
|
|
170
171
|
| `openai/gpt-oss-120b` |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Neon
|
|
6
6
|
|
|
7
|
-
Neon aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
7
|
+
Neon aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 58 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Neon documentation](https://neon.com/docs).
|
|
10
10
|
|
|
@@ -59,6 +59,7 @@ NEON_AI_GATEWAY_TOKEN=your-gateway-key
|
|
|
59
59
|
| `gemini-3-7-flash` |
|
|
60
60
|
| `gemini-3-8-flash` |
|
|
61
61
|
| `gemini-3-flash` |
|
|
62
|
+
| `gemini-4-argon` |
|
|
62
63
|
| `gemma-3-12b` |
|
|
63
64
|
| `glm-5-2` |
|
|
64
65
|
| `glm-5-3` |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Netlify
|
|
6
6
|
|
|
7
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
7
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 286 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
10
10
|
|
|
@@ -165,7 +165,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
165
165
|
| `openrouter/google/gemma-4-26b-a4b-it` |
|
|
166
166
|
| `openrouter/google/gemma-4-31b-it` |
|
|
167
167
|
| `openrouter/gryphe/mythomax-l2-13b` |
|
|
168
|
-
| `openrouter/ibm-granite/granite-4.0-h-micro` |
|
|
169
168
|
| `openrouter/ibm-granite/granite-4.2-8b` |
|
|
170
169
|
| `openrouter/inception/mercury-2` |
|
|
171
170
|
| `openrouter/inception/mercury-2.5` |
|
|
@@ -148,7 +148,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
148
148
|
| `google/lyria-3-clip-preview` |
|
|
149
149
|
| `google/lyria-3-pro-preview` |
|
|
150
150
|
| `gryphe/mythomax-l2-13b` |
|
|
151
|
-
| `ibm-granite/granite-4.0-h-micro` |
|
|
152
151
|
| `ibm-granite/granite-4.2-8b` |
|
|
153
152
|
| `inception/mercury-2` |
|
|
154
153
|
| `inception/mercury-2.5` |
|
|
@@ -229,7 +228,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
229
228
|
| `nvidia/nemotron-3-nano-30b-a3b` |
|
|
230
229
|
| `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` |
|
|
231
230
|
| `nvidia/nemotron-3-super-120b-a12b` |
|
|
232
|
-
| `nvidia/nemotron-3-super-120b-a12b:free` |
|
|
233
231
|
| `nvidia/nemotron-3-ultra-550b-a55b` |
|
|
234
232
|
| `nvidia/nemotron-3-ultra-550b-a55b:free` |
|
|
235
233
|
| `nvidia/nemotron-3.5-content-safety` |
|
|
@@ -287,6 +285,8 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
287
285
|
| `openai/gpt-6-sol-pro` |
|
|
288
286
|
| `openai/gpt-6.1-sol` |
|
|
289
287
|
| `openai/gpt-6.1-sol-pro` |
|
|
288
|
+
| `openai/gpt-6.1-terra` |
|
|
289
|
+
| `openai/gpt-6.1-terra-pro` |
|
|
290
290
|
| `openai/gpt-audio` |
|
|
291
291
|
| `openai/gpt-audio-mini` |
|
|
292
292
|
| `openai/gpt-chat-latest` |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Vercel
|
|
6
6
|
|
|
7
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
7
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 418 models through Mastra's model router.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
10
10
|
|
|
@@ -334,6 +334,8 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
334
334
|
| `openai/gpt-6-sol-fast` |
|
|
335
335
|
| `openai/gpt-6.1-sol` |
|
|
336
336
|
| `openai/gpt-6.1-sol-fast` |
|
|
337
|
+
| `openai/gpt-6.1-terra` |
|
|
338
|
+
| `openai/gpt-6.1-terra-fast` |
|
|
337
339
|
| `openai/gpt-image-1-mini` |
|
|
338
340
|
| `openai/gpt-image-1.5` |
|
|
339
341
|
| `openai/gpt-image-2` |
|
package/.docs/models/index.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Model Providers
|
|
6
6
|
|
|
7
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
7
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 8254 models from 220 providers through a single API.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# AI/ML API
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 172 AI/ML API models through Mastra's model router. Authentication is handled automatically using the `AIMLAPI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [AI/ML API documentation](https://docs.aimlapi.com).
|
|
10
10
|
|
|
@@ -166,6 +166,7 @@ for await (const chunk of stream) {
|
|
|
166
166
|
| `aimlapi/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
167
167
|
| `aimlapi/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
168
168
|
| `aimlapi/openai/gpt-6.1-sol` | 1.1M | | | | | | $2 | $10 |
|
|
169
|
+
| `aimlapi/openai/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
|
|
169
170
|
| `aimlapi/openai/gpt-oss-120b` | 131K | | | | | | $0.37 | $1 |
|
|
170
171
|
| `aimlapi/openai/gpt-oss-20b` | 131K | | | | | | $0.08 | $0.32 |
|
|
171
172
|
| `aimlapi/openai/gpt-oss-safeguard-20b` | 131K | | | | | | $0.08 | $0.32 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# CommandCode
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 72 CommandCode models through Mastra's model router. Authentication is handled automatically using the `CMD_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [CommandCode documentation](https://commandcode.ai/docs/provider).
|
|
10
10
|
|
|
@@ -73,6 +73,7 @@ for await (const chunk of stream) {
|
|
|
73
73
|
| `commandcode/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
74
74
|
| `commandcode/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
75
75
|
| `commandcode/gpt-6.1-sol` | 1.1M | | | | | | $2 | $10 |
|
|
76
|
+
| `commandcode/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
|
|
76
77
|
| `commandcode/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
|
|
77
78
|
| `commandcode/meta/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
|
|
78
79
|
| `commandcode/meta/muse-spark-1.2-contributor` | 1.0M | | | | | | $0.10 | $0.20 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Eden AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 371 Eden AI models through Mastra's model router. Authentication is handled automatically using the `EDENAI_API_KEY` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Eden AI documentation](https://docs.edenai.co).
|
|
10
10
|
|
|
@@ -305,6 +305,7 @@ for await (const chunk of stream) {
|
|
|
305
305
|
| `edenai/openai/gpt-6-luna` | 1.1M | | | | | | $0.10 | $0.50 |
|
|
306
306
|
| `edenai/openai/gpt-6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
307
307
|
| `edenai/openai/gpt-6.1-sol` | 1.1M | | | | | | $2 | $10 |
|
|
308
|
+
| `edenai/openai/gpt-6.1-terra` | 1.1M | | | | | | $1 | $5 |
|
|
308
309
|
| `edenai/openai/gpt-latest` | 1.1M | | | | | | $10 | $50 |
|
|
309
310
|
| `edenai/openai/gpt-mini-latest` | 1.1M | | | | | | $0.20 | $1 |
|
|
310
311
|
| `edenai/openai/gpt-pro-latest` | 1.1M | | | | | | $4 | $20 |
|
|
@@ -341,6 +342,7 @@ for await (const chunk of stream) {
|
|
|
341
342
|
| `edenai/sference/deepseek-ai/DeepSeek-V4.1-Flash-1017` | 1.0M | | | | | | $0.50 | $2 |
|
|
342
343
|
| `edenai/tencent/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.66 | $2 |
|
|
343
344
|
| `edenai/tencent/deepseek-v4.1-flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
345
|
+
| `edenai/tencent/deepseek-v4.1-flash-1017` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
344
346
|
| `edenai/tencent/hy3` | 256K | | | | | | $0.13 | $0.53 |
|
|
345
347
|
| `edenai/tencent/hy4-preview` | 1.0M | | | | | | $0.83 | $3 |
|
|
346
348
|
| `edenai/tencent/step-5-preview` | 1.0M | | | | | | $1 | $3 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# EmpirioLabs AI
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 62 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
|
|
|
@@ -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: "empiriolabs/deepseek-v4-1-flash"
|
|
22
|
+
model: "empiriolabs/deepseek-v4-1-flash-1017"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Generate a response
|
|
@@ -111,7 +111,7 @@ const agent = new Agent({
|
|
|
111
111
|
name: "custom-agent",
|
|
112
112
|
model: {
|
|
113
113
|
url: "https://api.empiriolabs.ai/v1",
|
|
114
|
-
id: "empiriolabs/deepseek-v4-1-flash",
|
|
114
|
+
id: "empiriolabs/deepseek-v4-1-flash-1017",
|
|
115
115
|
apiKey: process.env.EMPIRIOLABS_API_KEY,
|
|
116
116
|
headers: {
|
|
117
117
|
"X-Custom-Header": "value"
|
|
@@ -132,7 +132,7 @@ const agent = new Agent({
|
|
|
132
132
|
const useAdvanced = requestContext.task === "complex";
|
|
133
133
|
return useAdvanced
|
|
134
134
|
? "empiriolabs/step-5-preview"
|
|
135
|
-
: "empiriolabs/deepseek-v4-1-flash";
|
|
135
|
+
: "empiriolabs/deepseek-v4-1-flash-1017";
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Hugging Face
|
|
6
6
|
|
|
7
|
-
Access
|
|
7
|
+
Access 82 Hugging Face models through Mastra's model router. Authentication is handled automatically using the `HF_TOKEN` environment variable.
|
|
8
8
|
|
|
9
9
|
Learn more in the [Hugging Face documentation](https://huggingface.co).
|
|
10
10
|
|
|
@@ -65,6 +65,7 @@ for await (const chunk of stream) {
|
|
|
65
65
|
| `huggingface/MiniMaxAI/MiniMax-M2.5` | 205K | | | | | | $0.30 | $1 |
|
|
66
66
|
| `huggingface/MiniMaxAI/MiniMax-M2.7` | 205K | | | | | | $0.30 | $1 |
|
|
67
67
|
| `huggingface/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
|
|
68
|
+
| `huggingface/MiniMaxAI/MiniMax-M3.1-Flash` | 1.0M | | | | | | $0.15 | $0.60 |
|
|
68
69
|
| `huggingface/moonshotai/Kimi-K2-Instruct` | 131K | | | | | | $1 | $3 |
|
|
69
70
|
| `huggingface/moonshotai/Kimi-K2-Instruct-0905` | 262K | | | | | | $1 | $3 |
|
|
70
71
|
| `huggingface/moonshotai/Kimi-K2-Thinking` | 262K | | | | | | $0.60 | $3 |
|