@mastra/mcp-docs-server 1.3.10-alpha.0 → 1.3.10-alpha.10

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.
Files changed (466) hide show
  1. package/.docs/docs/agents/guardrails.md +8 -0
  2. package/.docs/docs/agents/human-in-the-loop.md +9 -0
  3. package/.docs/docs/agents/processors.md +3 -0
  4. package/.docs/docs/agents/tools.md +5 -0
  5. package/.docs/docs/channels.md +15 -0
  6. package/.docs/docs/deployment/mastra-server.md +2 -0
  7. package/.docs/docs/deployment/monorepo.md +2 -0
  8. package/.docs/docs/evals/overview.md +2 -0
  9. package/.docs/docs/harness/background-tasks.md +4 -0
  10. package/.docs/docs/harness/durable-agents.md +6 -1
  11. package/.docs/docs/harness/goals.md +2 -0
  12. package/.docs/docs/harness/schedules.md +5 -0
  13. package/.docs/docs/mastra-platform/connect/providers.md +27 -26
  14. package/.docs/docs/mastra-platform/deploy.md +2 -0
  15. package/.docs/docs/mastra-platform/server.md +10 -6
  16. package/.docs/docs/mastra-platform/studio.md +1 -1
  17. package/.docs/docs/mastra-platform/system-environment-variables.md +3 -0
  18. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  19. package/.docs/docs/memory/message-history.md +3 -0
  20. package/.docs/docs/memory/observational-memory.md +10 -0
  21. package/.docs/docs/memory/overview.md +6 -0
  22. package/.docs/docs/memory/semantic-recall.md +5 -1
  23. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -1
  24. package/.docs/docs/observability/logging.md +3 -0
  25. package/.docs/docs/observability/tracing/overview.md +16 -0
  26. package/.docs/docs/sandbox/search.md +11 -0
  27. package/.docs/docs/server/custom-adapters.md +53 -1
  28. package/.docs/docs/server/custom-api-routes.md +2 -0
  29. package/.docs/docs/server/request-context.md +6 -0
  30. package/.docs/docs/signals/thread-streams.md +34 -3
  31. package/.docs/docs/studio/overview.md +2 -0
  32. package/.docs/docs/subagents.md +7 -1
  33. package/.docs/docs/workflows/agents-and-tools.md +16 -1
  34. package/.docs/docs/workflows/control-flow.md +57 -0
  35. package/.docs/docs/workflows/human-in-the-loop.md +3 -0
  36. package/.docs/docs/workflows/overview.md +9 -1
  37. package/.docs/docs/workflows/scheduled-workflows.md +10 -2
  38. package/.docs/docs/workflows/suspend-and-resume.md +6 -0
  39. package/.docs/docs/workflows/workflow-state.md +12 -0
  40. package/.docs/integrations/agentic-ui/copilotkit.md +2 -0
  41. package/.docs/integrations/auth/better-auth.md +2 -0
  42. package/.docs/integrations/auth/google.md +2 -0
  43. package/.docs/integrations/auth/okta.md +2 -0
  44. package/.docs/integrations/databases/aurora-dsql.md +2 -2
  45. package/.docs/integrations/databases/dynamodb.md +4 -4
  46. package/.docs/integrations/databases/postgresql.md +4 -4
  47. package/.docs/integrations/deploy/inngest.md +1 -0
  48. package/.docs/integrations/file-storage/archil.md +3 -3
  49. package/.docs/integrations/file-storage/mesa.md +1 -1
  50. package/.docs/integrations/observability/datadog.md +5 -0
  51. package/.docs/integrations/observability/langsmith.md +33 -0
  52. package/.docs/integrations/observability/opentelemetry.md +27 -4
  53. package/.docs/integrations/observability/sentry.md +22 -22
  54. package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
  55. package/.docs/integrations/sandboxes/daytona.md +3 -3
  56. package/.docs/integrations/sandboxes/docker.md +1 -1
  57. package/.docs/integrations/sandboxes/e2b.md +5 -5
  58. package/.docs/integrations/sandboxes/modal.md +3 -3
  59. package/.docs/integrations/sandboxes/railway.md +3 -3
  60. package/.docs/integrations/sandboxes/vercel.md +4 -4
  61. package/.docs/integrations/tools/brightdata.md +1 -1
  62. package/.docs/integrations/tools/parallel.md +3 -3
  63. package/.docs/integrations/tools/perplexity.md +1 -1
  64. package/.docs/integrations/tools/tavily.md +1 -1
  65. package/.docs/integrations/voice/azure.md +4 -4
  66. package/.docs/integrations/voice/cloudflare.md +3 -3
  67. package/.docs/integrations/voice/deepgram.md +2 -2
  68. package/.docs/integrations/voice/elevenlabs.md +4 -4
  69. package/.docs/integrations/voice/gladia.md +10 -10
  70. package/.docs/integrations/voice/google.md +11 -11
  71. package/.docs/integrations/voice/inworld.md +23 -23
  72. package/.docs/integrations/voice/livekit.md +9 -6
  73. package/.docs/integrations/voice/mistral.md +2 -2
  74. package/.docs/integrations/voice/modelslab.md +1 -1
  75. package/.docs/integrations/voice/murf.md +1 -1
  76. package/.docs/integrations/voice/openai.md +5 -5
  77. package/.docs/integrations/voice/sarvam.md +6 -6
  78. package/.docs/integrations/voice/speechify.md +25 -12
  79. package/.docs/integrations/voice/xai.md +3 -3
  80. package/.docs/models/environment-variables.md +2 -0
  81. package/.docs/models/gateways/merge-gateway.md +3 -1
  82. package/.docs/models/gateways/neon.md +2 -1
  83. package/.docs/models/gateways/netlify.md +2 -5
  84. package/.docs/models/gateways/openrouter.md +5 -6
  85. package/.docs/models/gateways/vercel.md +5 -6
  86. package/.docs/models/index.md +9 -1
  87. package/.docs/models/providers/302ai.md +4 -0
  88. package/.docs/models/providers/abacus.md +4 -0
  89. package/.docs/models/providers/abliteration-ai.md +4 -0
  90. package/.docs/models/providers/above.md +4 -0
  91. package/.docs/models/providers/agentrouter.md +4 -0
  92. package/.docs/models/providers/agnes.md +4 -0
  93. package/.docs/models/providers/ai-router.md +4 -0
  94. package/.docs/models/providers/ai21.md +4 -0
  95. package/.docs/models/providers/aiand.md +8 -7
  96. package/.docs/models/providers/aimlapi.md +9 -10
  97. package/.docs/models/providers/ainetcafe.md +4 -0
  98. package/.docs/models/providers/aixy.md +4 -0
  99. package/.docs/models/providers/aki-io.md +4 -0
  100. package/.docs/models/providers/alibaba-cn.md +4 -0
  101. package/.docs/models/providers/alibaba-coding-plan-cn.md +4 -0
  102. package/.docs/models/providers/alibaba-coding-plan.md +4 -0
  103. package/.docs/models/providers/alibaba-token-plan-cn.md +4 -0
  104. package/.docs/models/providers/alibaba-token-plan.md +4 -0
  105. package/.docs/models/providers/alibaba.md +4 -0
  106. package/.docs/models/providers/ambient.md +5 -1
  107. package/.docs/models/providers/amd.md +4 -0
  108. package/.docs/models/providers/anthropic.md +4 -0
  109. package/.docs/models/providers/anyapi.md +4 -0
  110. package/.docs/models/providers/arcee.md +4 -0
  111. package/.docs/models/providers/atomic-chat.md +4 -0
  112. package/.docs/models/providers/auriko.md +4 -0
  113. package/.docs/models/providers/bailing.md +4 -0
  114. package/.docs/models/providers/baseten.md +4 -0
  115. package/.docs/models/providers/bee.md +4 -0
  116. package/.docs/models/providers/berget.md +4 -0
  117. package/.docs/models/providers/blueclaw.md +4 -0
  118. package/.docs/models/providers/bothub.md +4 -0
  119. package/.docs/models/providers/boundless.md +4 -0
  120. package/.docs/models/providers/cerebras.md +4 -0
  121. package/.docs/models/providers/chutes.md +18 -11
  122. package/.docs/models/providers/clarifai.md +4 -0
  123. package/.docs/models/providers/claudinio.md +4 -0
  124. package/.docs/models/providers/cline-pass.md +6 -0
  125. package/.docs/models/providers/cloudferro-sherlock.md +4 -0
  126. package/.docs/models/providers/cloudflare-workers-ai.md +4 -0
  127. package/.docs/models/providers/commandcode.md +6 -1
  128. package/.docs/models/providers/coralbricks.md +4 -0
  129. package/.docs/models/providers/cortecs.md +8 -3
  130. package/.docs/models/providers/crof.md +4 -0
  131. package/.docs/models/providers/crossmodel.md +4 -0
  132. package/.docs/models/providers/crusoe.md +4 -0
  133. package/.docs/models/providers/daoxe.md +4 -0
  134. package/.docs/models/providers/databricks.md +4 -0
  135. package/.docs/models/providers/deepinfra.md +4 -0
  136. package/.docs/models/providers/deepseek.md +4 -0
  137. package/.docs/models/providers/digitalocean.md +6 -1
  138. package/.docs/models/providers/dinference.md +4 -0
  139. package/.docs/models/providers/drun.md +4 -0
  140. package/.docs/models/providers/ebcloud.md +4 -0
  141. package/.docs/models/providers/echo.md +4 -0
  142. package/.docs/models/providers/edenai.md +22 -8
  143. package/.docs/models/providers/empiriolabs.md +8 -4
  144. package/.docs/models/providers/engy.md +4 -0
  145. package/.docs/models/providers/evroc.md +4 -0
  146. package/.docs/models/providers/fastrouter.md +4 -0
  147. package/.docs/models/providers/firepass.md +4 -0
  148. package/.docs/models/providers/fireworks-ai.md +4 -0
  149. package/.docs/models/providers/firmware.md +4 -0
  150. package/.docs/models/providers/freemodel.md +4 -0
  151. package/.docs/models/providers/friendli.md +15 -12
  152. package/.docs/models/providers/frogbot.md +4 -0
  153. package/.docs/models/providers/github-models.md +4 -0
  154. package/.docs/models/providers/gmicloud.md +4 -0
  155. package/.docs/models/providers/google.md +4 -0
  156. package/.docs/models/providers/greenpt.md +4 -0
  157. package/.docs/models/providers/groq.md +4 -0
  158. package/.docs/models/providers/helicone.md +4 -0
  159. package/.docs/models/providers/hetzner.md +4 -0
  160. package/.docs/models/providers/hpc-ai.md +4 -0
  161. package/.docs/models/providers/huggingface.md +6 -1
  162. package/.docs/models/providers/hyper.md +4 -0
  163. package/.docs/models/providers/iflowcn.md +4 -0
  164. package/.docs/models/providers/impossibl.md +4 -0
  165. package/.docs/models/providers/inception.md +4 -0
  166. package/.docs/models/providers/inceptron.md +10 -6
  167. package/.docs/models/providers/inco.md +4 -0
  168. package/.docs/models/providers/infer.md +4 -0
  169. package/.docs/models/providers/inference.md +4 -0
  170. package/.docs/models/providers/inferx.md +4 -0
  171. package/.docs/models/providers/infomaniak.md +4 -0
  172. package/.docs/models/providers/io-net.md +4 -0
  173. package/.docs/models/providers/iteracompute.md +4 -0
  174. package/.docs/models/providers/jalapeno.md +4 -0
  175. package/.docs/models/providers/jiekou.md +4 -0
  176. package/.docs/models/providers/kenari.md +4 -0
  177. package/.docs/models/providers/kilo.md +27 -24
  178. package/.docs/models/providers/kimi-code-plan-cn.md +7 -1
  179. package/.docs/models/providers/kimi-code-plan-global.md +7 -1
  180. package/.docs/models/providers/kimi-for-coding.md +4 -0
  181. package/.docs/models/providers/kiro.md +4 -0
  182. package/.docs/models/providers/klokintegration.md +4 -0
  183. package/.docs/models/providers/kosmik.md +4 -0
  184. package/.docs/models/providers/kuae-cloud-coding-plan.md +4 -0
  185. package/.docs/models/providers/lilac.md +4 -0
  186. package/.docs/models/providers/liquid.md +4 -0
  187. package/.docs/models/providers/llama.md +4 -0
  188. package/.docs/models/providers/llmgateway-providers.md +19 -9
  189. package/.docs/models/providers/llmgateway.md +12 -6
  190. package/.docs/models/providers/llmtech.md +4 -0
  191. package/.docs/models/providers/llmtr.md +4 -0
  192. package/.docs/models/providers/lmstudio.md +4 -0
  193. package/.docs/models/providers/longcat.md +4 -0
  194. package/.docs/models/providers/lowrouter.md +6 -1
  195. package/.docs/models/providers/lucidquery.md +4 -0
  196. package/.docs/models/providers/lynkr.md +4 -0
  197. package/.docs/models/providers/meganova.md +4 -0
  198. package/.docs/models/providers/melious.md +4 -0
  199. package/.docs/models/providers/meta.md +4 -0
  200. package/.docs/models/providers/minimax-cn-coding-plan.md +4 -0
  201. package/.docs/models/providers/minimax-cn.md +4 -0
  202. package/.docs/models/providers/minimax-coding-plan.md +4 -0
  203. package/.docs/models/providers/minimax.md +4 -0
  204. package/.docs/models/providers/mistral.md +4 -0
  205. package/.docs/models/providers/mixlayer.md +4 -0
  206. package/.docs/models/providers/moark.md +4 -0
  207. package/.docs/models/providers/modal.md +4 -0
  208. package/.docs/models/providers/model-oracle-ai.md +4 -0
  209. package/.docs/models/providers/modelis.md +4 -0
  210. package/.docs/models/providers/modelscope.md +4 -0
  211. package/.docs/models/providers/moonshotai-cn.md +8 -2
  212. package/.docs/models/providers/moonshotai.md +8 -2
  213. package/.docs/models/providers/morph.md +18 -6
  214. package/.docs/models/providers/munito-eu.md +84 -0
  215. package/.docs/models/providers/munito.md +85 -0
  216. package/.docs/models/providers/nan.md +4 -0
  217. package/.docs/models/providers/nano-gpt.md +651 -619
  218. package/.docs/models/providers/nearai.md +5 -1
  219. package/.docs/models/providers/nebius.md +33 -27
  220. package/.docs/models/providers/neosmith.md +4 -0
  221. package/.docs/models/providers/neuralwatt.md +4 -0
  222. package/.docs/models/providers/nova.md +4 -0
  223. package/.docs/models/providers/novita-ai.md +7 -1
  224. package/.docs/models/providers/nvidia.md +4 -0
  225. package/.docs/models/providers/oci.md +4 -0
  226. package/.docs/models/providers/ofox.md +4 -0
  227. package/.docs/models/providers/ollama-cloud.md +4 -0
  228. package/.docs/models/providers/openai.md +6 -1
  229. package/.docs/models/providers/opencode-go.md +8 -2
  230. package/.docs/models/providers/opencode.md +4 -1
  231. package/.docs/models/providers/openreason.md +4 -0
  232. package/.docs/models/providers/opper.md +4 -0
  233. package/.docs/models/providers/orcarouter.md +4 -0
  234. package/.docs/models/providers/ovhcloud.md +4 -0
  235. package/.docs/models/providers/pareto.md +4 -0
  236. package/.docs/models/providers/pendra.md +4 -0
  237. package/.docs/models/providers/perplexity-agent.md +4 -0
  238. package/.docs/models/providers/perplexity.md +4 -0
  239. package/.docs/models/providers/pioneer.md +4 -0
  240. package/.docs/models/providers/poe.md +4 -0
  241. package/.docs/models/providers/poolside.md +4 -0
  242. package/.docs/models/providers/prime.md +7 -2
  243. package/.docs/models/providers/privatemode-ai.md +4 -0
  244. package/.docs/models/providers/qihang-ai.md +4 -0
  245. package/.docs/models/providers/qiniu-ai.md +4 -0
  246. package/.docs/models/providers/reflection.md +4 -0
  247. package/.docs/models/providers/regolo-ai.md +4 -0
  248. package/.docs/models/providers/requesty.md +10 -1
  249. package/.docs/models/providers/routing-run.md +4 -0
  250. package/.docs/models/providers/runinfra.md +4 -0
  251. package/.docs/models/providers/sakana.md +4 -0
  252. package/.docs/models/providers/sambanova.md +4 -0
  253. package/.docs/models/providers/sarvam.md +4 -0
  254. package/.docs/models/providers/scaleway.md +4 -0
  255. package/.docs/models/providers/scnet-token-plan.md +4 -0
  256. package/.docs/models/providers/scx-ai.md +4 -0
  257. package/.docs/models/providers/scx.md +4 -0
  258. package/.docs/models/providers/sensenova.md +4 -0
  259. package/.docs/models/providers/siliconflow-cn.md +4 -0
  260. package/.docs/models/providers/siliconflow.md +4 -0
  261. package/.docs/models/providers/snowflake-cortex.md +4 -0
  262. package/.docs/models/providers/stackit.md +4 -0
  263. package/.docs/models/providers/standardcompute.md +4 -0
  264. package/.docs/models/providers/stepfun-ai-step-plan.md +4 -0
  265. package/.docs/models/providers/stepfun-ai.md +4 -0
  266. package/.docs/models/providers/stepfun-step-plan.md +4 -0
  267. package/.docs/models/providers/stepfun.md +4 -0
  268. package/.docs/models/providers/subconscious.md +4 -0
  269. package/.docs/models/providers/submodel.md +4 -0
  270. package/.docs/models/providers/synthetic.md +4 -0
  271. package/.docs/models/providers/tempr.md +4 -0
  272. package/.docs/models/providers/tencent-coding-plan.md +4 -0
  273. package/.docs/models/providers/tencent-token-plan.md +4 -0
  274. package/.docs/models/providers/tencent-tokenhub.md +4 -0
  275. package/.docs/models/providers/tensorx.md +4 -0
  276. package/.docs/models/providers/the-grid-ai.md +4 -0
  277. package/.docs/models/providers/thinkingmachines.md +4 -0
  278. package/.docs/models/providers/tinfoil.md +4 -0
  279. package/.docs/models/providers/togetherai.md +4 -0
  280. package/.docs/models/providers/tokengo.md +4 -0
  281. package/.docs/models/providers/tokenrouter.md +4 -0
  282. package/.docs/models/providers/trustedrouter.md +4 -0
  283. package/.docs/models/providers/umans-ai-coding-plan.md +4 -0
  284. package/.docs/models/providers/umans-ai.md +4 -0
  285. package/.docs/models/providers/unorouter.md +4 -0
  286. package/.docs/models/providers/upstage.md +4 -0
  287. package/.docs/models/providers/vancine.md +4 -0
  288. package/.docs/models/providers/vispark.md +4 -0
  289. package/.docs/models/providers/vivgrid.md +30 -39
  290. package/.docs/models/providers/volcengine-coding-plan.md +4 -0
  291. package/.docs/models/providers/volcengine.md +4 -0
  292. package/.docs/models/providers/vultr.md +4 -0
  293. package/.docs/models/providers/wafer.ai.md +4 -0
  294. package/.docs/models/providers/wallaby.md +4 -0
  295. package/.docs/models/providers/wandb.md +9 -5
  296. package/.docs/models/providers/xai.md +4 -0
  297. package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -0
  298. package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -0
  299. package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -0
  300. package/.docs/models/providers/xiaomi.md +4 -0
  301. package/.docs/models/providers/xpersona.md +4 -0
  302. package/.docs/models/providers/zai-coding-plan.md +4 -0
  303. package/.docs/models/providers/zai.md +4 -0
  304. package/.docs/models/providers/zeldoc.md +4 -0
  305. package/.docs/models/providers/zenifra.md +4 -0
  306. package/.docs/models/providers/zenmux.md +4 -0
  307. package/.docs/models/providers/zhipuai-coding-plan.md +4 -0
  308. package/.docs/models/providers/zhipuai.md +4 -0
  309. package/.docs/models/providers.md +2 -0
  310. package/.docs/reference/acp/acp-agent.md +1 -1
  311. package/.docs/reference/acp/create-acp-tool.md +1 -1
  312. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  313. package/.docs/reference/agent-controller/session.md +5 -5
  314. package/.docs/reference/agents/agent.md +8 -4
  315. package/.docs/reference/agents/channels.md +26 -7
  316. package/.docs/reference/agents/createSkill.md +1 -1
  317. package/.docs/reference/agents/durable-agent.md +29 -21
  318. package/.docs/reference/agents/generate.md +4 -1
  319. package/.docs/reference/agents/generateLegacy.md +2 -2
  320. package/.docs/reference/agents/inngest-agent.md +2 -0
  321. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  322. package/.docs/reference/auth/auth0.md +2 -2
  323. package/.docs/reference/auth/better-auth.md +7 -3
  324. package/.docs/reference/auth/clerk.md +1 -1
  325. package/.docs/reference/auth/firebase.md +4 -4
  326. package/.docs/reference/auth/google.md +6 -6
  327. package/.docs/reference/auth/jwt.md +1 -1
  328. package/.docs/reference/auth/neon.md +6 -6
  329. package/.docs/reference/auth/okta.md +9 -8
  330. package/.docs/reference/auth/workos.md +3 -3
  331. package/.docs/reference/browser/agent-browser.md +1 -1
  332. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  333. package/.docs/reference/browser/stagehand-browser.md +1 -1
  334. package/.docs/reference/channels/slack-provider.md +4 -2
  335. package/.docs/reference/channels/teams-provider.md +2 -2
  336. package/.docs/reference/channels/telegram-provider.md +2 -2
  337. package/.docs/reference/client-js/agent-controller.md +4 -1
  338. package/.docs/reference/client-js/agents.md +21 -1
  339. package/.docs/reference/client-js/conversations.md +3 -3
  340. package/.docs/reference/client-js/datasets.md +1 -1
  341. package/.docs/reference/client-js/observability.md +13 -14
  342. package/.docs/reference/client-js/responses.md +4 -4
  343. package/.docs/reference/client-js/workflows.md +2 -0
  344. package/.docs/reference/code-sdk/mount-agent-controller.md +2 -2
  345. package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
  346. package/.docs/reference/configuration.md +1 -1
  347. package/.docs/reference/connect/channels.md +2 -2
  348. package/.docs/reference/connect/providers.md +166 -112
  349. package/.docs/reference/connect/tools.md +16 -16
  350. package/.docs/reference/core/mastra-class.md +7 -5
  351. package/.docs/reference/core/mastra-model-gateway.md +6 -1
  352. package/.docs/reference/datasets/startExperiment.md +17 -2
  353. package/.docs/reference/deployer.md +6 -3
  354. package/.docs/reference/editor/blob-store-provider.md +2 -2
  355. package/.docs/reference/editor/tool-provider.md +1 -1
  356. package/.docs/reference/evals/answer-relevancy.md +2 -2
  357. package/.docs/reference/evals/answer-similarity.md +4 -2
  358. package/.docs/reference/evals/bias.md +2 -2
  359. package/.docs/reference/evals/content-similarity.md +2 -2
  360. package/.docs/reference/evals/hallucination.md +3 -3
  361. package/.docs/reference/evals/noise-sensitivity.md +1 -1
  362. package/.docs/reference/evals/prompt-alignment.md +10 -9
  363. package/.docs/reference/evals/rubric.md +1 -1
  364. package/.docs/reference/evals/run-evals.md +1 -1
  365. package/.docs/reference/evals/scorer-utils.md +6 -4
  366. package/.docs/reference/evals/tone-consistency.md +5 -5
  367. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  368. package/.docs/reference/evals/trajectory-accuracy.md +1 -1
  369. package/.docs/reference/file-based-agents/schedules.md +1 -1
  370. package/.docs/reference/logging/pino-logger.md +1 -1
  371. package/.docs/reference/memory/memory-class.md +2 -2
  372. package/.docs/reference/memory/observational-memory.md +10 -10
  373. package/.docs/reference/memory/summarizeConversation.md +1 -1
  374. package/.docs/reference/memory/summarizeThread.md +1 -1
  375. package/.docs/reference/migrations/upgrade-to-v1/storage.md +1 -1
  376. package/.docs/reference/migrations/upgrade-to-v1/tools.md +7 -1
  377. package/.docs/reference/migrations/vnext-to-standard-apis.md +1 -1
  378. package/.docs/reference/observability/metrics/automatic-metrics.md +10 -8
  379. package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
  380. package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
  381. package/.docs/reference/observability/tracing/exporters/console-exporter.md +3 -3
  382. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  383. package/.docs/reference/observability/tracing/exporters/langsmith.md +8 -0
  384. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -0
  385. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -1
  386. package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
  387. package/.docs/reference/observability/tracing/interfaces.md +21 -1
  388. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  389. package/.docs/reference/processors/classifier-processor.md +1 -1
  390. package/.docs/reference/processors/file-upload-processor.md +8 -8
  391. package/.docs/reference/processors/moderation-processor.md +1 -1
  392. package/.docs/reference/processors/processor-interface.md +5 -5
  393. package/.docs/reference/processors/provider-history-compat.md +13 -12
  394. package/.docs/reference/processors/response-cache.md +1 -1
  395. package/.docs/reference/processors/stream-error-retry-processor.md +9 -5
  396. package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
  397. package/.docs/reference/processors/token-limiter-processor.md +1 -1
  398. package/.docs/reference/processors/tool-call-filter.md +1 -1
  399. package/.docs/reference/processors/tool-search-processor.md +3 -3
  400. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  401. package/.docs/reference/pubsub/redis-streams.md +10 -0
  402. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  403. package/.docs/reference/rag/chunking-and-embedding.md +1 -1
  404. package/.docs/reference/rag/database-config.md +20 -15
  405. package/.docs/reference/rag/extract-params.md +2 -2
  406. package/.docs/reference/rag/retrieval.md +11 -0
  407. package/.docs/reference/schedules/overview.md +17 -1
  408. package/.docs/reference/server/koa-adapter.md +2 -0
  409. package/.docs/reference/signals/notifications.md +2 -2
  410. package/.docs/reference/storage/overview.md +30 -13
  411. package/.docs/reference/storage/retention.md +1 -1
  412. package/.docs/reference/streaming/ChunkType.md +20 -2
  413. package/.docs/reference/streaming/agents/MastraModelOutput.md +3 -3
  414. package/.docs/reference/streaming/agents/stream.md +4 -4
  415. package/.docs/reference/streaming/agents/streamLegacy.md +2 -2
  416. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  417. package/.docs/reference/tools/ask-user-tool.md +1 -1
  418. package/.docs/reference/tools/bedrock-kb-tool.md +2 -2
  419. package/.docs/reference/tools/create-code-mode.md +1 -1
  420. package/.docs/reference/tools/create-tool.md +2 -2
  421. package/.docs/reference/tools/document-chunker-tool.md +1 -1
  422. package/.docs/reference/tools/mcp-client.md +6 -6
  423. package/.docs/reference/tools/mcp-server.md +4 -4
  424. package/.docs/reference/tools/task-tools.md +3 -1
  425. package/.docs/reference/tools/vector-query-tool.md +1 -0
  426. package/.docs/reference/vectors/astra.md +3 -1
  427. package/.docs/reference/vectors/azure-ai-search.md +2 -2
  428. package/.docs/reference/vectors/chroma.md +2 -2
  429. package/.docs/reference/vectors/convex.md +1 -1
  430. package/.docs/reference/vectors/couchbase.md +12 -5
  431. package/.docs/reference/vectors/duckdb.md +5 -5
  432. package/.docs/reference/vectors/mongodb.md +6 -6
  433. package/.docs/reference/vectors/pg.md +1 -1
  434. package/.docs/reference/vectors/pinecone.md +1 -1
  435. package/.docs/reference/vectors/qdrant.md +1 -1
  436. package/.docs/reference/vectors/s3vectors.md +3 -0
  437. package/.docs/reference/vectors/turbopuffer.md +1 -1
  438. package/.docs/reference/vectors/upstash.md +8 -4
  439. package/.docs/reference/vectors/vectorize.md +4 -2
  440. package/.docs/reference/vectors/weaviate.md +1 -1
  441. package/.docs/reference/voice/voice.send.md +1 -1
  442. package/.docs/reference/voice/voice.speak.md +1 -1
  443. package/.docs/reference/voice/voice.updateConfig.md +1 -1
  444. package/.docs/reference/workflows/run-methods/restart.md +1 -1
  445. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  446. package/.docs/reference/workflows/run-methods/start.md +1 -1
  447. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  448. package/.docs/reference/workflows/run.md +2 -2
  449. package/.docs/reference/workflows/step.md +4 -0
  450. package/.docs/reference/workflows/workflow-methods/agent.md +2 -0
  451. package/.docs/reference/workflows/workflow-methods/classifier.md +5 -0
  452. package/.docs/reference/workflows/workflow-methods/dountil.md +1 -1
  453. package/.docs/reference/workflows/workflow-methods/map.md +2 -0
  454. package/.docs/reference/workflows/workflow.md +2 -2
  455. package/.docs/reference/workspace/factory-sandbox.md +11 -2
  456. package/.docs/reference/workspace/filesystem.md +2 -2
  457. package/.docs/reference/workspace/local-sandbox.md +3 -3
  458. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  459. package/.docs/reference/workspace/platform-sandbox.md +10 -8
  460. package/.docs/reference/workspace/sandbox.md +1 -1
  461. package/.docs/reference/workspace/workspace-class.md +13 -13
  462. package/dist/index.js +1 -1
  463. package/dist/{src-DnH_jHt9.js → src-Cv7bX2-6.js} +10 -19
  464. package/dist/{src-DnH_jHt9.js.map → src-Cv7bX2-6.js.map} +1 -1
  465. package/dist/stdio.js +2 -3
  466. package/package.json +14 -14
@@ -55,7 +55,7 @@ type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
55
55
 
56
56
  - **realtime**: Immediately persists each event to storage
57
57
  - **batch-with-updates**: Batches creates and updates separately, applies in order
58
- - **insert-only**: Only processes SPAN\_ENDED events, ignores updates
58
+ - **insert-only**: Only processes SPAN_ENDED events, ignores updates
59
59
 
60
60
  ## Properties
61
61
 
@@ -86,6 +86,14 @@ const exporter = new LangSmithExporter({
86
86
  | `PROVIDER_TOOL_CALL` | `tool` |
87
87
  | All others | `chain` |
88
88
 
89
+ ## `langsmithRunIdFor`
90
+
91
+ ```typescript
92
+ function langsmithRunIdFor(spanId: string): string
93
+ ```
94
+
95
+ Returns the LangSmith run id the exporter uses for a Mastra span id. Scores submitted with `mastra.observability.addScore()` are attached to these runs as feedback, so no in-process state is needed.
96
+
89
97
  ## `withLangsmithMetadata`
90
98
 
91
99
  Helper function to add LangSmith-specific metadata to tracing options.
@@ -10,6 +10,10 @@ Sends tracing spans, logs, metrics, scores, and feedback to the Mastra platform
10
10
 
11
11
  > **Note:** `MastraPlatformExporter` was previously called `CloudExporter`. The original `CloudExporter` class is still exported from `@mastra/observability` so existing imports keep working, but it's deprecated and will be removed in a future major version. New code should use `MastraPlatformExporter`.
12
12
 
13
+ ## Span previews
14
+
15
+ `MastraPlatformExporter` automatically generates short, readable `inputPreview`, `outputPreview`, and `errorPreview` summaries based on the span type. Each preview contains up to 100 characters plus an ellipsis when truncated. Full payloads remain available separately.
16
+
13
17
  ## Constructor
14
18
 
15
19
  ```typescript
@@ -8,6 +8,10 @@ Persists traces to Mastra's configured storage with automatic batching and retry
8
8
 
9
9
  > **Note:** `MastraStorageExporter` was previously called `DefaultExporter`. The original `DefaultExporter` class is still exported from `@mastra/observability` so existing imports keep working, but it's deprecated and will be removed in a future major version. New code should use `MastraStorageExporter`.
10
10
 
11
+ ## Span previews
12
+
13
+ `MastraStorageExporter` automatically generates short, readable `inputPreview`, `outputPreview`, and `errorPreview` summaries based on the span type. Each preview contains up to 100 characters plus an ellipsis when truncated. Full payloads remain available separately.
14
+
11
15
  ## Constructor
12
16
 
13
17
  ```typescript
@@ -53,7 +57,7 @@ type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
53
57
 
54
58
  - **realtime**: Immediately persists each event to storage
55
59
  - **batch-with-updates**: Batches creates and updates separately, applies in order
56
- - **insert-only**: Only processes SPAN\_ENDED events, ignores updates
60
+ - **insert-only**: Only processes SPAN_ENDED events, ignores updates
57
61
 
58
62
  ## Properties
59
63
 
@@ -37,7 +37,7 @@ Extends `BaseExporterConfig`, which includes:
37
37
  async exportTracingEvent(event: TracingEvent): Promise<void>
38
38
  ```
39
39
 
40
- Exports a tracing event to Sentry. Handles SPAN\_STARTED, SPAN\_UPDATED, and SPAN\_ENDED events.
40
+ Exports a tracing event to Sentry. Handles SPAN_STARTED, SPAN_UPDATED, and SPAN_ENDED events.
41
41
 
42
42
  ### flush
43
43
 
@@ -131,7 +131,7 @@ Mastra span types are mapped to Sentry operations:
131
131
  | `PROCESSOR_RUN` | `ai.processor` |
132
132
  | `GENERIC` | `ai.span` |
133
133
 
134
- MODEL\_STEP and MODEL\_CHUNK spans are skipped to simplify trace hierarchy. Their data is aggregated into MODEL\_GENERATION spans.
134
+ MODEL_STEP and MODEL_CHUNK spans are skipped to simplify trace hierarchy. Their data is aggregated into MODEL_GENERATION spans.
135
135
 
136
136
  ## Environment variables
137
137
 
@@ -153,7 +153,7 @@ The exporter sets these standard OpenTelemetry attributes:
153
153
  - `ai.span.type`: Mastra span type
154
154
  - `gen_ai.conversation.id`: Chat thread identifier, set from `metadata.threadId` to group spans in Sentry's Conversations view
155
155
 
156
- **MODEL\_GENERATION spans:**
156
+ **MODEL_GENERATION spans:**
157
157
 
158
158
  - `gen_ai.operation.name`: `chat`
159
159
  - `gen_ai.system`: Model provider
@@ -169,7 +169,7 @@ The exporter sets these standard OpenTelemetry attributes:
169
169
  - `gen_ai.request.temperature`: Temperature parameter
170
170
  - `gen_ai.completion_start_time`: First token time
171
171
 
172
- **TOOL\_CALL spans:**
172
+ **TOOL_CALL spans:**
173
173
 
174
174
  - `gen_ai.operation.name`: `execute_tool`
175
175
  - `gen_ai.tool.name`: Tool identifier
@@ -179,7 +179,7 @@ The exporter sets these standard OpenTelemetry attributes:
179
179
  - `gen_ai.tool.output`: Tool output
180
180
  - `tool.success`: Success flag
181
181
 
182
- **AGENT\_RUN spans:**
182
+ **AGENT_RUN spans:**
183
183
 
184
184
  - `gen_ai.operation.name`: `invoke_agent`
185
185
  - `gen_ai.agent.name`: Agent identifier
@@ -362,7 +362,7 @@ Structured event emitted when the exporter pipeline drops observability events.
362
362
  ```typescript
363
363
  type ObservabilityDropSignal = 'tracing' | 'log' | 'metric' | 'score' | 'feedback'
364
364
 
365
- type ObservabilityDropReason = 'unsupported-storage' | 'retry-exhausted'
365
+ type ObservabilityDropReason = 'unsupported-storage' | 'retry-exhausted' | 'span-not-updatable'
366
366
 
367
367
  interface ObservabilityDropEvent {
368
368
  type: 'drop'
@@ -543,6 +543,16 @@ interface AgentRunAttributes {
543
543
  /** Maximum steps allowed */
544
544
  maxSteps?: number
545
545
 
546
+ /**
547
+ * Model the run was configured with, resolved at run preparation (call-time
548
+ * override, then agent config). The first enabled candidate of a fallback list.
549
+ * Never updated by later steps; see MODEL_STEP `model` for what each step ran.
550
+ */
551
+ model?: string
552
+
553
+ /** Provider of `model`, taken from the same model object */
554
+ provider?: string
555
+
546
556
  /** When the run's model streamed its first chunk, copied from the agent's own first generation */
547
557
  completionStartTime?: Date
548
558
  }
@@ -631,6 +641,16 @@ interface ModelStepAttributes {
631
641
  /** Index of this step in the generation (0, 1, 2, ...) */
632
642
  stepIndex?: number
633
643
 
644
+ /**
645
+ * Model actually invoked for this step, after per-step overrides (input
646
+ * processors, fallback). Recorded at invocation, so a failed provider call
647
+ * still carries it. Absent when no model was invoked, e.g. a cached response.
648
+ */
649
+ model?: string
650
+
651
+ /** Provider of `model`, taken from the same model object */
652
+ provider?: string
653
+
634
654
  /** Token usage statistics */
635
655
  usage?: UsageStats
636
656
 
@@ -34,7 +34,7 @@ const processor = new BatchPartsProcessor({
34
34
 
35
35
  **name** (`string`): Processor display name. Always Batch Parts.
36
36
 
37
- **processOutputStream** (`(args: { part: ChunkType; streamParts: ChunkType[]; state: Record<string, any>; abort: (reason?: string) => never }) => Promise<ChunkType | null>`): Processes streaming output parts to batch them together
37
+ **processOutputStream** (`(args: { part: ChunkType; streamParts: ChunkType[]; state: Record<string, any>; abort: (reason?: string) => never; writer?: { custom: (data: ChunkType) => Promise<void> } }) => Promise<ChunkType | null>`): Processes streaming output parts to batch them together
38
38
 
39
39
  **flush** (`(state?: BatchPartsState) => ChunkType | null`): Force flush any remaining batched parts when the stream ends
40
40
 
@@ -72,7 +72,7 @@ inputProcessors: [
72
72
 
73
73
  **options.lastMessageOnly** (`boolean`): When true, only the last message is classified in the input and output phases.
74
74
 
75
- **options.chunkWindow** (`number`): Non-negative integer number of trailing stream chunks to classify together, including the current text-delta chunk. A value of 0 classifies only the current chunk. Each text chunk triggers a classifier call, so larger windows increase cost.
75
+ **options.chunkWindow** (`number`): Non-negative integer number of trailing stream chunks to classify together, including the current text-delta chunk. A value of 0 classifies only the current chunk. Each text chunk triggers a classifier call unless the windowed text is whitespace-only, so larger windows increase cost.
76
76
 
77
77
  **options.maxInputLength** (`number`): Non-negative integer maximum number of characters sent to the classifier. Longer text is truncated.
78
78
 
@@ -121,7 +121,7 @@ The processor looks at the files of every user message the model receives, the t
121
121
  Files sent inline, as binary, base64, or a data URL, are uploaded. The processor never downloads anything itself, so a request made by the server can't be pointed at an internal address:
122
122
 
123
123
  - A link the model fetches itself, or a provider file ID, stays in the prompt, and `filter` isn't called for it.
124
- - A link the model can't fetch is downloaded by Mastra before the model call. The model would receive those bytes, so the processor handles them like any other file.
124
+ - A link the model can't fetch is downloaded by Mastra before the model call. The processor handles the downloaded bytes like any other file the model would receive.
125
125
 
126
126
  ## Upload location
127
127
 
@@ -170,7 +170,7 @@ The constructor throws a `MastraError` with the ID `FILE_UPLOAD_PROCESSOR_NO_SAN
170
170
 
171
171
  The files of the current turn are checked as they were sent, before anything is written. A file that can't be uploaded stops the turn, and nothing is uploaded.
172
172
 
173
- A file of the thread history that is too large or can't be decoded doesn't stop the turn: a file stored in the thread would stop every turn after it. The processor replaces it with a note that says why, and the turn goes on:
173
+ For a file in thread history that's too large or can't be decoded, the processor substitutes a note explaining the problem and lets the turn continue. This prevents a stored file from blocking every subsequent turn:
174
174
 
175
175
  ```text
176
176
  [File not uploaded]
@@ -178,7 +178,7 @@ name: report.pdf
178
178
  reason: File "report.pdf" is 31457280 bytes, over the 10485760 byte limit.
179
179
  ```
180
180
 
181
- When the sandbox can't take the files, because there is no sandbox, it can't write, or a write fails, a file of the current turn stops the turn. A file of the thread history gets a note with the reason instead, and the turn goes on. A `filter` or `maxFileSize` that fails stops the turn, whichever file it affects. Nothing is changed in storage, so the thread works again once the setup is fixed. A turn without a file to upload checks nothing, so scorers, agent networks, and calls without a thread keep working.
181
+ When the sandbox can't take the files, because there is no sandbox, it can't write, or a write fails, a file of the current turn stops the turn. A file of the thread history gets a note with the reason instead, and the turn goes on. A `filter` or `maxFileSize` that fails stops the turn, whichever file it affects. Storage remains unchanged, allowing the thread to work again once the setup is fixed. A turn without a file to upload checks nothing, so scorers, agent networks, and calls without a thread keep working.
182
182
 
183
183
  The processor stops a turn by calling `abort()` with `retry: false`. The model isn't called. `agent.generate()` resolves with `result.tripwire` set instead of rejecting, and `agent.stream()` emits a `tripwire` chunk.
184
184
 
@@ -186,19 +186,19 @@ The tripwire metadata has this shape:
186
186
 
187
187
  **processorId** (`'file-upload'`): Processor identifier.
188
188
 
189
- **code** (`FileUploadErrorCode`): One of the values of FILE\_UPLOAD\_ERROR\_CODES.
189
+ **code** (`FileUploadErrorCode`): One of the values of FILE_UPLOAD_ERROR_CODES.
190
190
 
191
191
  **fileName** (`string`): Name of the file that caused the stop, when a file did and it has a name.
192
192
 
193
193
  **mimeType** (`string`): MIME type of that file.
194
194
 
195
- **size** (`number`): Size of the file in bytes. Set with FILE\_TOO\_LARGE.
195
+ **size** (`number`): Size of the file in bytes. Set with FILE_TOO_LARGE.
196
196
 
197
- **maxFileSize** (`number`): Limit the file was checked against, in bytes. Set with FILE\_TOO\_LARGE.
197
+ **maxFileSize** (`number`): Limit the file was checked against, in bytes. Set with FILE_TOO_LARGE.
198
198
 
199
199
  **cause** (`string`): Message of the underlying error, or the invalid value returned by maxFileSize.
200
200
 
201
- **orphanPaths** (`string[]`): Sandbox paths that may still exist because cleanup after a failed upload did not succeed. Set with UPLOAD\_FAILED.
201
+ **orphanPaths** (`string[]`): Sandbox paths that may still exist because cleanup after a failed upload did not succeed. Set with UPLOAD_FAILED.
202
202
 
203
203
  `FILE_UPLOAD_ERROR_CODES` lists every code:
204
204
 
@@ -220,7 +220,7 @@ The processor handles files sent with `agent.sendMessage()` and `agent.sendSigna
220
220
 
221
221
  - A signal that wakes an idle agent is processed like the input of `agent.stream()`.
222
222
  - A signal delivered to an active run is checked and uploaded before the next model call of that run.
223
- - On a durable agent, a signal that arrives before the first model call of a run joins the prompt after the checks of the turn. Its files are uploaded like files of the thread history.
223
+ - Signals that arrive on a durable agent before a run's first model call join the prompt after the turn's checks. Their files are uploaded like files in thread history.
224
224
 
225
225
  ## Limitations
226
226
 
@@ -84,7 +84,7 @@ export const agent = new Agent({
84
84
 
85
85
  ### Output processing with batching
86
86
 
87
- For production streaming, set `bufferSize` (for example `bufferSize: 200`) so `ModerationProcessor` makes one moderation call per sentence instead of one per chunk. Buffering also catches content that is split across chunks. Text then reaches the client in sentence-sized pieces.
87
+ For production streaming, set `bufferSize` (for example `bufferSize: 200`) so `ModerationProcessor` makes one moderation call per sentence instead of one per chunk. Buffering also catches content that's split across chunks. Text then reaches the client in sentence-sized pieces.
88
88
 
89
89
  When using `ModerationProcessor` as an output processor, it's recommended to combine it with `BatchPartsProcessor` to optimize performance. The `BatchPartsProcessor` batches stream chunks together before passing them to the moderator, reducing the number of LLM calls required for moderation.
90
90
 
@@ -111,11 +111,11 @@ interface Processor<TId extends string = string, TTripwireMetadata = unknown> {
111
111
 
112
112
  **processDataParts** (`boolean`): When true, the processOutputStream method also receives data-\* chunks emitted by tools via writer.custom(). Defaults to false.
113
113
 
114
- **spanType** (`ProcessorSpanType`): Span type to trace this processor as, instead of the default PROCESSOR\_RUN. Use it when a processor belongs to a subsystem the user configured directly, so the trace names that subsystem rather than a pipeline phase. Restricted to span types whose attributes extend ProcessorPipelineAttributes, so the runtime can always record the processor position and message-list mutations on the span.
114
+ **spanType** (`ProcessorSpanType`): Span type to trace this processor as, instead of the default PROCESSOR_RUN. Use it when a processor belongs to a subsystem the user configured directly, so the trace names that subsystem rather than a pipeline phase. Restricted to span types whose attributes extend ProcessorPipelineAttributes, so the runtime can always record the processor position and message-list mutations on the span.
115
115
 
116
116
  **spanName** (`string | ((phase: ProcessorSpanPhase) => string)`): Span name, instead of the default \<phase> processor: \<id>. Pass a function to name each phase separately, which a processor that runs in more than one phase usually needs.
117
117
 
118
- **spanAttributes** (`Partial<SpanTypeMap[ProcessorSpanType]> | ((phase: ProcessorSpanPhase) => Partial<SpanTypeMap[ProcessorSpanType]>)`): Attributes set when the span is created. Needed when the declared span type has required attributes of its own, such as WORKSPACE\_ACTION.category. The pairing with spanType is not enforced by the type system.
118
+ **spanAttributes** (`Partial<SpanTypeMap[ProcessorSpanType]> | ((phase: ProcessorSpanPhase) => Partial<SpanTypeMap[ProcessorSpanType]>)`): Attributes set when the span is created. Needed when the declared span type has required attributes of its own, such as WORKSPACE_ACTION.category. The pairing with spanType is not enforced by the type system.
119
119
 
120
120
  **onViolation** (`(violation: ProcessorViolation) => void | Promise<void>`): Optional callback invoked when the processor detects a policy violation, regardless of strategy (block or warn). Use for side effects like alerting, logging to external systems, or emailing users. Errors thrown by this callback are silently caught to prevent interfering with processor logic. The violation object contains processorId, message, and a processor-specific detail field.
121
121
 
@@ -794,9 +794,9 @@ processToolResult?(args: ProcessToolResultArgs): ProcessorMessageResult;
794
794
 
795
795
  **args** (`unknown`): Arguments the LLM passed to the tool.
796
796
 
797
- **result** (`unknown`): Value returned by the tool. For client-executed tools this is the output of tool.execute() after it has passed through ensureSerializable. For provider-executed tools (e.g. Anthropic web\_search) it is the raw result from the provider stream, which is not run through ensureSerializable.
797
+ **result** (`unknown`): Value returned by the tool. For client-executed tools this is the output of tool.execute() after it has passed through ensureSerializable. For provider-executed tools (e.g. Anthropic web_search) it is the raw result from the provider stream, which is not run through ensureSerializable.
798
798
 
799
- **providerExecuted** (`boolean`): Whether this result came from a provider-executed tool such as Anthropic web\_search. Defaults to undefined for client-executed tools.
799
+ **providerExecuted** (`boolean`): Whether this result came from a provider-executed tool such as Anthropic web_search. Defaults to undefined for client-executed tools.
800
800
 
801
801
  **systemMessages** (`CoreMessage[]`): All system messages for read access.
802
802
 
@@ -1212,7 +1212,7 @@ await agent.stream('Summarize this', {
1212
1212
  })
1213
1213
  ```
1214
1214
 
1215
- `maxProcessorRetries` passed on the call overrides the agent default. If neither is set, processor-requested retries are treated as aborts.
1215
+ `maxProcessorRetries` passed on the call overrides the agent default. If neither is set, retries requested by input and output processors are treated as aborts, while error processors (such as [`StreamErrorRetryProcessor`](https://mastra.ai/reference/processors/stream-error-retry-processor)) are capped at 3 retries.
1216
1216
 
1217
1217
  ## Related
1218
1218
 
@@ -54,18 +54,19 @@ Registering in `errorProcessors` alone, as the example above does, covers both h
54
54
 
55
55
  `ProviderHistoryCompat` includes these built-in compatibility rules:
56
56
 
57
- | Rule | Provider | Timing | Behavior |
58
- | ------------------------------------------------ | ---------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
- | `strip-foreign-provider-executed-tools` | Anthropic, OpenAI, Azure OpenAI, Google/Vertex | Preemptive prompt rewrite | Removes provider-executed tool calls and their paired results from the outbound prompt when they came from a different provider family, since the receiving provider can't resolve another provider's tool IDs. Persisted history is left untouched. |
60
- | `anthropic-tool-id-format` | Anthropic | Preemptive prompt rewrite | Rewrites tool call IDs that contain characters outside `[a-zA-Z0-9_-]` in the outbound prompt, on both the call and its result. A sanitized ID that would collide with one already in the prompt gets a `_2`, `_3`, … suffix. The provider's rejection never fires, and persisted history keeps the original IDs. A reactive fallback covers providers the preemptive check doesn't recognize, such as Vertex-hosted Claude. |
61
- | `cerebras-strip-reasoning-content` | Cerebras | Preemptive prompt rewrite | Removes assistant `reasoning` parts from the outbound prompt so they're not serialized as unsupported `reasoning_content` fields. |
62
- | `anthropic-strip-empty-signed-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes assistant `reasoning` parts that carry an Anthropic signature but have empty text, which legacy records can contain. Anthropic signs the exact thinking text, so the mismatched pair would be rejected. |
63
- | `anthropic-strip-foreign-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes non-Anthropic assistant `reasoning` parts from the outbound prompt. Anthropic-native thinking history is preserved. |
64
- | `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-5-5`), since the receiving provider can't verify another provider's signature. Turns emptied of all content by the drop are removed from the prompt. Unstamped history is left untouched. |
65
- | `azure-system-reminder-transform` | Azure OpenAI | Preemptive prompt rewrite | Renames `<system-reminder>` wrappers in user text and system instructions to `<memory-context>` for the outbound request. Stored history remains unchanged. |
66
- | `openai-orphan-item-id` | OpenAI, Azure OpenAI (Responses) | Reactive API error recovery | Recovers history that OpenAI rejects with `Item 'msg_…' of type 'message' was provided without its required 'reasoning' item`. Drops the Responses `itemId` from every item-bearing part of an assistant message that carries one but has no `reasoning` part, and retries. The message then replays by value instead of as an unsatisfiable `item_reference`. The repair is applied to the in-memory list for the current turn. |
67
- | `anthropic-orphaned-thinking-step` | Anthropic | Reactive API error recovery | Recovers history that Anthropic rejects because `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. Removes steps that contain only reasoning when more assistant content follows them, and retries. Covers history saved by older `@mastra/memory` releases ([#22798](https://github.com/mastra-ai/mastra/issues/22798)). |
68
- | `ensure-user-first-turn` | Amazon Bedrock, Google/Vertex Gemini | Preemptive prompt rewrite | Inserts a minimal user turn (`.`) before a leading assistant turn, because these providers reject conversations whose first non-system turn is the assistant's. This happens when an agent greets first or `lastMessages` cuts into a thread. Runs last, so it sees the prompt after other rules have dropped emptied turns. |
57
+ | Rule | Provider | Timing | Behavior |
58
+ | ------------------------------------------------ | ---------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
+ | `strip-foreign-provider-executed-tools` | Anthropic, OpenAI, Azure OpenAI, Google/Vertex | Preemptive prompt rewrite | Removes provider-executed tool calls and their paired results from the outbound prompt when they came from a different provider family, since the receiving provider can't resolve another provider's tool IDs. Persisted history is left untouched. |
60
+ | `anthropic-tool-id-format` | Anthropic | Preemptive prompt rewrite | Rewrites tool call IDs that contain characters outside `[a-zA-Z0-9_-]` in the outbound prompt, on both the call and its result. A sanitized ID that would collide with one already in the prompt gets a `_2`, `_3`, … suffix. The provider's rejection never fires, and persisted history keeps the original IDs. A reactive fallback covers providers the preemptive check doesn't recognize, such as Vertex-hosted Claude. |
61
+ | `cerebras-strip-reasoning-content` | Cerebras | Preemptive prompt rewrite | Removes assistant `reasoning` parts from the outbound prompt so they're not serialized as unsupported `reasoning_content` fields. |
62
+ | `anthropic-strip-empty-signed-reasoning-content` | Anthropic | Reactive (matches Anthropic's 400 rejecting modified thinking blocks) | Removes assistant `reasoning` parts that carry an Anthropic signature but have empty text, which legacy records can contain, from earlier messages. Runs only after Anthropic rejects the history, because Claude 5.x returns empty-text signed blocks as normal output and they must be replayed unchanged to keep prompt caching. |
63
+ | `anthropic-strip-foreign-reasoning-content` | Anthropic | Preemptive prompt rewrite | Removes non-Anthropic assistant `reasoning` parts from the outbound prompt. Anthropic-native thinking history is preserved. |
64
+ | `anthropic-strip-foreign-signed-reasoning` | Anthropic-compatible | Preemptive prompt rewrite | Drops signed thinking from the outbound prompt when its origin turn was stamped with a different provider (for example Kimi For Coding ↔ `anthropic/claude-sonnet-5-5`), since the receiving provider can't verify another provider's signature. Turns emptied of all content by the drop are removed from the prompt. Unstamped history is left untouched. |
65
+ | `azure-system-reminder-transform` | Azure OpenAI | Preemptive prompt rewrite | Renames `<system-reminder>` wrappers in user text and system instructions to `<memory-context>` for the outbound request. Stored history remains unchanged. |
66
+ | `openai-orphan-item-id` | OpenAI, Azure OpenAI (Responses) | Reactive API error recovery | Recovers history that OpenAI rejects with `Item 'msg_…' of type 'message' was provided without its required 'reasoning' item`. Drops the Responses `itemId` from every item-bearing part of an assistant message that carries one but has no `reasoning` part, and retries. The message then replays by value instead of as an unsatisfiable `item_reference`. The repair is applied to the in-memory list for the current turn. |
67
+ | `anthropic-orphaned-thinking-step` | Anthropic | Reactive API error recovery | Recovers history that Anthropic rejects because `thinking` or `redacted_thinking` blocks in the latest assistant message can't be modified. Removes steps that contain only reasoning when more assistant content follows them, and retries. Covers history saved by older `@mastra/memory` releases ([#22798](https://github.com/mastra-ai/mastra/issues/22798)). |
68
+ | `tool-call-empty-input` | All providers | Preemptive prompt rewrite | Sends an assistant tool call whose stored input is missing (`undefined` or `null`) as `{}` in the outbound prompt, because providers reject a tool call without input (Anthropic: `tool_use.input: Field required`). A call whose arguments couldn't be parsed is stored this way. The call keeps its paired error result, and persisted history is left untouched. An empty-string input is a real stored value and is sent as is. |
69
+ | `ensure-user-first-turn` | Amazon Bedrock, Google/Vertex Gemini | Preemptive prompt rewrite | Inserts a minimal user turn (`.`) before a leading assistant turn, because these providers reject conversations whose first non-system turn is the assistant's. This happens when an agent greets first or `lastMessages` cuts into a thread. Runs last, so it sees the prompt after other rules have dropped emptied turns. |
69
70
 
70
71
  Preemptive rules run through `processLLMRequest` after Mastra converts messages to the model prompt format and before the prompt is sent to the provider. These rewrites affect only the current provider call. Persisted history is never changed, so the IDs and content in memory and in the Studio stay exactly as written.
71
72
 
@@ -49,7 +49,7 @@ See [Response caching](https://mastra.ai/docs/agents/processors) for the concept
49
49
 
50
50
  **ttl** (`number`): Time-to-live (seconds) for entries written by this processor. Defaults to 300 seconds (5 minutes), matching OpenRouter's reference implementation. (Default: `300`)
51
51
 
52
- **scope** (`string | null`): Tenant scope appended to the cache key. null opts out of scoping. When omitted, the processor falls back to the resource id resolved from the request context (MASTRA\_RESOURCE\_ID\_KEY) for automatic per-user isolation.
52
+ **scope** (`string | null`): Tenant scope appended to the cache key. null opts out of scoping. When omitted, the processor falls back to the resource id resolved from the request context (MASTRA_RESOURCE_ID_KEY) for automatic per-user isolation.
53
53
 
54
54
  **key** (`string | (inputs: ResponseCacheKeyInputs) => string | Promise<string>`): Override the auto-derived cache key. Pass a string to pin a key, or a function that receives { agentId, scope, model, prompt, stepNumber } and returns a key. If the function throws, the processor falls back to the deterministic hash so the call still benefits from caching.
55
55
 
@@ -32,14 +32,18 @@ To run only the processors you configure, with none of the defaults merged in, s
32
32
 
33
33
  ## How it works
34
34
 
35
- The processor checks the error and its cause chain for:
35
+ The processor checks the error and its cause chain, in this order, for:
36
36
 
37
- - Provider retry metadata: `isRetryable === true`
38
- - Built-in OpenAI Responses stream error matching
39
37
  - Matcher results: Any configured matcher that returns `true`
38
+ - Built-in OpenAI Responses stream error matching
39
+ - Provider retry metadata: `isRetryable === true`
40
+
41
+ The first match decides the retry policy, so a configured matcher's `maxRetries`, `delayMs` and `onRetry` apply even when the built-in matcher would also match.
40
42
 
41
43
  When the error is retryable, the processor returns `{ retry: true }`. It doesn't mutate messages.
42
44
 
45
+ Unless one of your own matchers matches it, the processor never retries a credential or quota refusal, even when provider metadata marks it retryable. The AI SDK marks every `429` retryable, including an exhausted quota.
46
+
43
47
  When `delayMs` is set, the processor waits before signaling a retry. This is useful for transient network errors like `ECONNRESET` where immediately retrying is likely to fail again. The delay can be a fixed number of milliseconds or a function evaluated with the error args (for example, to implement exponential backoff).
44
48
 
45
49
  ### Retry limits
@@ -56,7 +60,7 @@ For retryable errors with a `Retry-After` response header, the processor reads c
56
60
 
57
61
  ## Retry unknown errors
58
62
 
59
- Set `retryUnknownErrors` to retry errors that don't match provider metadata or the built-in OpenAI matcher, including a custom matcher. Unknown-error retries use the processor-level `maxRetries` and `delayMs` values. Known authorization failures, including HTTP `401` and `403` responses, aren't retried:
63
+ Set `retryUnknownErrors` to retry errors that don't match provider metadata or the built-in OpenAI matcher, including a custom matcher. Unknown-error retries use the processor-level `maxRetries` and `delayMs` values. Known credential and quota refusals, including HTTP `401` and `403` responses, aren't retried:
60
64
 
61
65
  ```typescript
62
66
  import { Agent } from '@mastra/core/agent'
@@ -112,7 +116,7 @@ export const agent = new Agent({
112
116
 
113
117
  ## Default OpenAI Responses matcher
114
118
 
115
- `isRetryableOpenAIResponsesStreamError` matches OpenAI Responses stream error chunks with `type: 'error'` or `type: 'response.failed'`. It retries known transient OpenAI error codes. As a fallback, it retries errors with explicit retry guidance such as `You can retry your request`.
119
+ `isRetryableOpenAIResponsesStreamError` matches OpenAI Responses stream error chunks with `type: 'error'` or `type: 'response.failed'`. It reads each chunk with the shared provider-failure reader from `@mastra/core/error` and retries chunks that report a rate limit, a provider outage, or a timeout. As a fallback, it retries errors with explicit retry guidance such as `You can retry your request`. It never retries a credential or quota refusal.
116
120
 
117
121
  `StreamErrorRetryProcessor` includes this matcher by default. You can also import it and reuse it in custom retry logic.
118
122
 
@@ -56,7 +56,7 @@ const processor = new SystemPromptScrubber({
56
56
 
57
57
  ## Extended usage example
58
58
 
59
- For production streaming, set `bufferSize` (for example `bufferSize: 200`) so `SystemPromptScrubber` makes one detection call per sentence instead of one per chunk. Buffering also catches content that is split across chunks. Text then reaches the client in sentence-sized pieces.
59
+ For production streaming, set `bufferSize` (for example `bufferSize: 200`) so `SystemPromptScrubber` makes one detection call per sentence instead of one per chunk. Buffering also catches content that's split across chunks. Text then reaches the client in sentence-sized pieces.
60
60
 
61
61
  When using `SystemPromptScrubber` as an output processor, it's recommended to combine it with `BatchPartsProcessor` to optimize performance. The `BatchPartsProcessor` batches stream chunks together before passing them to the scrubber, reducing the number of LLM calls required for detection.
62
62
 
@@ -117,7 +117,7 @@ export const agent = new Agent({
117
117
 
118
118
  ### As a per-step processor (limit multi-step token growth)
119
119
 
120
- When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. `TokenLimiterProcessor` applies its limit at every step, measuring the prompt that's about to be sent after any earlier prompt processors have run. Register prompt-shrinking processors such as `ToolCallFilter` before it, so the limiter counts the prompt the model actually receives:
120
+ When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. `TokenLimiterProcessor` applies its limit at every step, measuring the prompt that's about to be sent after any earlier prompt processors have run. To count the prompt the model actually receives, register the limiter after prompt-shrinking processors such as `ToolCallFilter`:
121
121
 
122
122
  ```typescript
123
123
  import { Agent } from '@mastra/core/agent'
@@ -66,7 +66,7 @@ const filter = new ToolCallFilter({
66
66
 
67
67
  ## Preserve compact model output
68
68
 
69
- Set `preserveModelOutput: true` to retain compact `toModelOutput` history for tool results that the filter removes. The removed tool call and result are replaced with a single text part in the prompt, so the model still sees the output while the raw tool arguments are dropped.
69
+ Set `preserveModelOutput: true` to retain compact `toModelOutput` history for tool results that the filter removes. Replacing the removed tool call and result with a single text part in the prompt lets the model see the output without the raw tool arguments.
70
70
 
71
71
  Tool results without model output that can be represented as text are removed entirely.
72
72
 
@@ -39,9 +39,9 @@ const toolSearch = new ToolSearchProcessor({
39
39
 
40
40
  **options.search.minScore** (`number`): Minimum relevance score for including a tool in search results. Scores are raw BM25 relevance plus name-match boosts (+5 when a query term equals the tool ID, +2 when it appears in the ID). They are not normalized and often exceed 1. Scores depend on the tools in the catalog and their descriptions, so a threshold tuned for one tool set may not carry over to another. Tools scoring less than or equal to this value are excluded. Use small values such as 0 to 0.5 to require some term overlap.
41
41
 
42
- **options.search.autoLoad** (`boolean`): When true, tools returned by search\_tools are activated immediately as part of the search. The load\_tool meta-tool is not exposed, collapsing the two-step search then load flow into a single search step. Discovered tools become available on the next turn. Keep topK conservative since every match is activated.
42
+ **options.search.autoLoad** (`boolean`): When true, tools returned by search_tools are activated immediately as part of the search. The load_tool meta-tool is not exposed, collapsing the two-step search then load flow into a single search step. Discovered tools become available on the next turn. Keep topK conservative since every match is activated.
43
43
 
44
- **options.storage** (`'in-memory' | 'context'`): Where loaded-tool state lives. 'in-memory' (default) tracks loaded tools in an in-memory map per thread with TTL cleanup (see ttl); state is lost on restart and anonymous requests share a 'default' entry. 'context' derives loaded state from the conversation messages — a tool is loaded while a search\_tools/load\_tool result naming it remains in the messages; it works without memory (same-process only, and only for requests with a real thread ID), survives a restart whenever the messages are available again (memory with message history, or the caller resending the conversation), and de-loads automatically once that result is no longer present in the messages. The 'context' store is opt-in.
44
+ **options.storage** (`'in-memory' | 'context'`): Where loaded-tool state lives. 'in-memory' (default) tracks loaded tools in an in-memory map per thread with TTL cleanup (see ttl); state is lost on restart and anonymous requests share a 'default' entry. 'context' derives loaded state from the conversation messages — a tool is loaded while a search_tools/load_tool result naming it remains in the messages; it works without memory (same-process only, and only for requests with a real thread ID), survives a restart whenever the messages are available again (memory with message history, or the caller resending the conversation), and de-loads automatically once that result is no longer present in the messages. The 'context' store is opt-in.
45
45
 
46
46
  **options.ttl** (`number`): Time-to-live for in-memory thread state, in milliseconds. Only applies to the default storage: 'in-memory' store; after this duration of inactivity thread state is cleaned up. Set to 0 to disable cleanup. Ignored by the 'context' store.
47
47
 
@@ -238,7 +238,7 @@ Use `clearState`, `clearAllState`, `getStateStats`, and `cleanupNow` to inspect
238
238
 
239
239
  Loaded state is derived from the conversation messages: a tool is loaded while a `search_tools` or `load_tool` result naming it remains in the messages. This mode:
240
240
 
241
- - Works without memory configuration. Without memory, loaded tools are kept for the current process only, and only for requests with a real thread ID; anonymous requests retain nothing between calls unless the caller resends the relevant messages.
241
+ - Works without memory configuration. Without memory, loaded tools are kept for the current process only, and only for requests with a real thread ID. Anonymous requests require the caller to resend the relevant messages to retain loaded tools between calls.
242
242
  - Survives a restart whenever the messages are available again: from memory with message history, or because the caller resends the conversation. Without memory, a restart restores only what's in the messages the caller sends.
243
243
  - De-loads a tool automatically once that result is no longer present in the messages.
244
244
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # UnicodeNormalizer
6
6
 
7
- The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor handles Unicode representations and removes control characters. It also standardizes whitespace formatting.
7
+ The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor always normalizes text to Unicode NFKC form. The normalization form isn't configurable. It also standardizes whitespace formatting. Control character removal is opt-in: set `stripControlChars` to `true` to enable it.
8
8
 
9
9
  ## Usage example
10
10
 
@@ -181,6 +181,16 @@ When a subscriber calls `nack`, the event is republished with an incremented `de
181
181
 
182
182
  A subscription never reclaims an event its own handler is still processing, so a slow handler isn't invoked twice for the same event. If a handler hangs, a different consumer in the group reclaims the event once it has been idle for `reclaimIdleMs`. In a single-consumer group there's no sibling to do that, so set `inFlightTimeoutMs` to have the subscription nack the event itself after that long.
183
183
 
184
+ ### Evented agent worker takeover
185
+
186
+ With Postgres storage, distributed evented agents publish worker orchestration events through Redis. If a worker exits before acknowledging an event, another worker can reclaim it and finish the run while the original API process stays alive. Configure the API process with `MASTRA_WORKERS=false` and worker processes with `MASTRA_WORKERS=orchestration`. All processes must share the same Postgres database, Redis connection settings, and `keyPrefix`.
187
+
188
+ Keep `reclaimIdleMs` above 30 seconds (the default is 60 seconds). A lower value can reclaim an event while the stopped worker's step lease is still held, causing the event to be acknowledged without running.
189
+
190
+ Runs started on older versions can finish after upgrading, but don't have guaranteed crash recovery. Saved steps without occurrence identifiers keep their existing unguarded behavior. Other storage adapters keep distributed internal orchestration on the worker process.
191
+
192
+ An interrupted step can execute again, so make external side effects idempotent. Completed step occurrences are protected against stale redeliveries, and a completed loop iteration reuses its saved result and loop decision. Guarded execution persists the records needed for recovery even when `shouldPersistSnapshot` returns `false`. Resume, time travel, restart races, and individual `foreach` items aren't covered by these occurrence guards.
193
+
184
194
  ## Distributed leasing
185
195
 
186
196
  `RedisStreamsPubSub` implements the [`LeaseProvider`](https://mastra.ai/reference/pubsub/lease-provider) contract on top of the same Redis connection. The [signals runtime](https://mastra.ai/docs/signals/overview) uses it to elect a single owner (usually per thread key) so that across instances only one process wakes and runs the agent, and others route follow-up work to the holder. This is what makes signals work on serverless and multi-instance deployments; without a shared lease, each instance would start its own competing run.
@@ -53,7 +53,7 @@ await pubsub.close()
53
53
 
54
54
  ## Broker election
55
55
 
56
- The broker is the first process to link its socket into place at the shared path. It routes events between all connected clients, and other processes connect to it as clients. Each candidate binds a socket at a private name and hard-links it to the shared path. The link fails if a socket is already there, so a candidate never replaces a live broker by accident.
56
+ The broker is the first process to link its socket into place at the shared path. It routes events between all connected clients, and other processes connect to it as clients. Each candidate binds a socket at a private name and hard-links it to the shared path. The link fails if a socket is already there, preventing a candidate from accidentally replacing a live broker.
57
57
 
58
58
  When the broker exits cleanly, it removes the shared path. Clients then reconnect, and the first to link its socket into place becomes the new broker. The remaining clients resubscribe to it.
59
59
 
@@ -118,7 +118,7 @@ const { embeddings } = await embedMany({
118
118
  })
119
119
  ```
120
120
 
121
- Google (text-embedding-001):
121
+ Google (gemini-embedding-001):
122
122
 
123
123
  ```ts
124
124
  const { embeddings } = await embedMany({
@@ -67,7 +67,7 @@ Configuration options specific to Chroma vector store.
67
67
 
68
68
  **where** (`Where`): Metadata filtering conditions. Each field maps to a literal value or an operator expression ($gt, $gte, $lt, $lte, $ne, $eq, $in, $nin). Combine conditions with $and and $or.
69
69
 
70
- **whereDocument** (`WhereDocument`): Document content filtering conditions using $contains and $not\_contains. Combine conditions with $and and $or.
70
+ **whereDocument** (`WhereDocument`): Document content filtering conditions using $contains and $not_contains. Combine conditions with $and and $or.
71
71
 
72
72
  **Filter Syntax Examples:**
73
73
 
@@ -172,26 +172,31 @@ await vectorTool.execute({ queryText: 'search query' }, { mastra, requestContext
172
172
  ### Multi-Database Configuration
173
173
 
174
174
  ```typescript
175
+ import { RequestContext } from '@mastra/core/request-context'
176
+
175
177
  const vectorTool = createVectorQueryTool({
176
- vectorStoreName: 'dynamic', // Will be determined at runtime
178
+ vectorStoreName: 'pinecone',
177
179
  indexName: 'documents',
178
180
  model: embedModel,
179
- databaseConfig: {
180
- pinecone: {
181
- namespace: 'default',
182
- },
183
- pgvector: {
184
- minScore: 0.8,
185
- ef: 150,
186
- },
187
- chroma: {
188
- where: { type: 'documentation' },
189
- },
190
- },
191
181
  })
182
+
183
+ // Select the store per request and pass only its matching config block
184
+ const pineconeContext = new RequestContext()
185
+ pineconeContext.set('vectorStoreName', 'pinecone')
186
+ pineconeContext.set('databaseConfig', {
187
+ pinecone: { namespace: 'default' },
188
+ })
189
+
190
+ const pgVectorContext = new RequestContext()
191
+ pgVectorContext.set('vectorStoreName', 'pgVector')
192
+ pgVectorContext.set('databaseConfig', {
193
+ pgvector: { minScore: 0.8, ef: 150 },
194
+ })
195
+
196
+ await vectorTool.execute({ queryText: 'search query' }, { mastra, requestContext: pgVectorContext })
192
197
  ```
193
198
 
194
- > **Note:** **Multi-Database Support**: When you configure multiple databases, only the configuration matching the actual vector store being used will be applied.
199
+ > **Note:** **Multi-Database Support**: Settings from every database block you configure are merged into the query parameters, regardless of which vector store is queried. Shared keys apply to whichever store runs the query. For example, `pgvector.minScore` is passed as `minScore`, which other stores such as LibSQL also read to filter results. Pass only the block for the vector store you query.
195
200
 
196
201
  **Performance Tuning**:
197
202
 
@@ -70,7 +70,7 @@ The `extract` parameter accepts the following fields:
70
70
 
71
71
  **promptTemplate** (`string`): Custom prompt template for question generation. Must include both {context} and {numQuestions} placeholders
72
72
 
73
- **embeddingOnly** (`boolean`): If true, only generate embeddings without actual questions
73
+ **embeddingOnly** (`boolean`): Accepted but currently has no effect. Questions are still generated and returned in questionsThisExcerptCanAnswer
74
74
 
75
75
  ### `KeywordExtractArgs`
76
76
 
@@ -84,7 +84,7 @@ The `extract` parameter accepts the following fields:
84
84
 
85
85
  **schema** (`ZodType`): Zod schema defining the structure of the data to extract.
86
86
 
87
- **llm** (`MastraLanguageModel`): AI SDK language model to use for extraction.
87
+ **llm** (`MastraLanguageModel | MastraLegacyLanguageModel`): AI SDK language model to use for extraction.
88
88
 
89
89
  **instructions** (`string`): Instructions for the LLM on what to extract.
90
90