@mastra/mcp-docs-server 1.1.5 → 1.1.6-alpha.0

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 (556) hide show
  1. package/.docs/docs/agents/adding-voice.md +349 -0
  2. package/.docs/docs/agents/agent-approval.md +558 -0
  3. package/.docs/docs/agents/agent-memory.md +209 -0
  4. package/.docs/docs/agents/guardrails.md +374 -0
  5. package/.docs/docs/agents/network-approval.md +275 -0
  6. package/.docs/docs/agents/networks.md +299 -0
  7. package/.docs/docs/agents/overview.md +304 -0
  8. package/.docs/docs/agents/processors.md +622 -0
  9. package/.docs/docs/agents/structured-output.md +273 -0
  10. package/.docs/docs/agents/supervisor-agents.md +304 -0
  11. package/.docs/docs/agents/using-tools.md +214 -0
  12. package/.docs/docs/build-with-ai/mcp-docs-server.md +238 -0
  13. package/.docs/docs/build-with-ai/skills.md +35 -0
  14. package/.docs/docs/community/contributing-templates.md +3 -0
  15. package/.docs/docs/community/discord.md +9 -0
  16. package/.docs/docs/community/licensing.md +66 -0
  17. package/.docs/docs/deployment/cloud-providers.md +15 -0
  18. package/.docs/docs/deployment/mastra-server.md +122 -0
  19. package/.docs/docs/deployment/monorepo.md +142 -0
  20. package/.docs/docs/deployment/overview.md +62 -0
  21. package/.docs/docs/deployment/studio.md +239 -0
  22. package/.docs/docs/deployment/web-framework.md +52 -0
  23. package/.docs/docs/deployment/workflow-runners.md +9 -0
  24. package/.docs/docs/evals/built-in-scorers.md +47 -0
  25. package/.docs/docs/evals/custom-scorers.md +519 -0
  26. package/.docs/docs/evals/overview.md +141 -0
  27. package/.docs/docs/evals/running-in-ci.md +124 -0
  28. package/.docs/docs/getting-started/build-with-ai.md +68 -0
  29. package/.docs/docs/getting-started/manual-install.md +226 -0
  30. package/.docs/docs/getting-started/project-structure.md +60 -0
  31. package/.docs/docs/getting-started/start.md +28 -0
  32. package/.docs/docs/getting-started/studio.md +101 -0
  33. package/.docs/docs/index.md +43 -0
  34. package/.docs/docs/mastra-cloud/deployment.md +77 -0
  35. package/.docs/docs/mastra-cloud/observability.md +38 -0
  36. package/.docs/docs/mastra-cloud/overview.md +23 -0
  37. package/.docs/docs/mastra-cloud/setup.md +42 -0
  38. package/.docs/docs/mastra-cloud/studio.md +24 -0
  39. package/.docs/docs/mastra-code/configuration.md +299 -0
  40. package/.docs/docs/mastra-code/customization.md +228 -0
  41. package/.docs/docs/mastra-code/modes.md +104 -0
  42. package/.docs/docs/mastra-code/overview.md +135 -0
  43. package/.docs/docs/mastra-code/tools.md +229 -0
  44. package/.docs/docs/mcp/overview.md +373 -0
  45. package/.docs/docs/mcp/publishing-mcp-server.md +95 -0
  46. package/.docs/docs/memory/memory-processors.md +314 -0
  47. package/.docs/docs/memory/message-history.md +260 -0
  48. package/.docs/docs/memory/observational-memory.md +248 -0
  49. package/.docs/docs/memory/overview.md +45 -0
  50. package/.docs/docs/memory/semantic-recall.md +272 -0
  51. package/.docs/docs/memory/storage.md +261 -0
  52. package/.docs/docs/memory/working-memory.md +400 -0
  53. package/.docs/docs/observability/datasets/overview.md +198 -0
  54. package/.docs/docs/observability/datasets/running-experiments.md +274 -0
  55. package/.docs/docs/observability/logging.md +99 -0
  56. package/.docs/docs/observability/overview.md +70 -0
  57. package/.docs/docs/observability/tracing/bridges/otel.md +209 -0
  58. package/.docs/docs/observability/tracing/exporters/arize.md +272 -0
  59. package/.docs/docs/observability/tracing/exporters/braintrust.md +111 -0
  60. package/.docs/docs/observability/tracing/exporters/cloud.md +127 -0
  61. package/.docs/docs/observability/tracing/exporters/datadog.md +187 -0
  62. package/.docs/docs/observability/tracing/exporters/default.md +209 -0
  63. package/.docs/docs/observability/tracing/exporters/laminar.md +100 -0
  64. package/.docs/docs/observability/tracing/exporters/langfuse.md +213 -0
  65. package/.docs/docs/observability/tracing/exporters/langsmith.md +198 -0
  66. package/.docs/docs/observability/tracing/exporters/otel.md +476 -0
  67. package/.docs/docs/observability/tracing/exporters/posthog.md +148 -0
  68. package/.docs/docs/observability/tracing/exporters/sentry.md +208 -0
  69. package/.docs/docs/observability/tracing/overview.md +1112 -0
  70. package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +300 -0
  71. package/.docs/docs/rag/chunking-and-embedding.md +183 -0
  72. package/.docs/docs/rag/graph-rag.md +215 -0
  73. package/.docs/docs/rag/overview.md +72 -0
  74. package/.docs/docs/rag/retrieval.md +515 -0
  75. package/.docs/docs/rag/vector-databases.md +645 -0
  76. package/.docs/docs/server/auth/auth0.md +220 -0
  77. package/.docs/docs/server/auth/better-auth.md +203 -0
  78. package/.docs/docs/server/auth/clerk.md +132 -0
  79. package/.docs/docs/server/auth/composite-auth.md +234 -0
  80. package/.docs/docs/server/auth/custom-auth-provider.md +513 -0
  81. package/.docs/docs/server/auth/firebase.md +272 -0
  82. package/.docs/docs/server/auth/jwt.md +110 -0
  83. package/.docs/docs/server/auth/simple-auth.md +180 -0
  84. package/.docs/docs/server/auth/supabase.md +117 -0
  85. package/.docs/docs/server/auth/workos.md +186 -0
  86. package/.docs/docs/server/auth.md +38 -0
  87. package/.docs/docs/server/custom-adapters.md +378 -0
  88. package/.docs/docs/server/custom-api-routes.md +267 -0
  89. package/.docs/docs/server/mastra-client.md +243 -0
  90. package/.docs/docs/server/mastra-server.md +71 -0
  91. package/.docs/docs/server/middleware.md +225 -0
  92. package/.docs/docs/server/request-context.md +471 -0
  93. package/.docs/docs/server/server-adapters.md +547 -0
  94. package/.docs/docs/streaming/events.md +237 -0
  95. package/.docs/docs/streaming/overview.md +175 -0
  96. package/.docs/docs/streaming/tool-streaming.md +175 -0
  97. package/.docs/docs/streaming/workflow-streaming.md +109 -0
  98. package/.docs/docs/voice/overview.md +959 -0
  99. package/.docs/docs/voice/speech-to-speech.md +102 -0
  100. package/.docs/docs/voice/speech-to-text.md +79 -0
  101. package/.docs/docs/voice/text-to-speech.md +83 -0
  102. package/.docs/docs/workflows/agents-and-tools.md +166 -0
  103. package/.docs/docs/workflows/control-flow.md +822 -0
  104. package/.docs/docs/workflows/error-handling.md +360 -0
  105. package/.docs/docs/workflows/human-in-the-loop.md +215 -0
  106. package/.docs/docs/workflows/overview.md +370 -0
  107. package/.docs/docs/workflows/snapshots.md +238 -0
  108. package/.docs/docs/workflows/suspend-and-resume.md +205 -0
  109. package/.docs/docs/workflows/time-travel.md +309 -0
  110. package/.docs/docs/workflows/workflow-state.md +181 -0
  111. package/.docs/docs/workspace/filesystem.md +164 -0
  112. package/.docs/docs/workspace/overview.md +239 -0
  113. package/.docs/docs/workspace/sandbox.md +63 -0
  114. package/.docs/docs/workspace/search.md +243 -0
  115. package/.docs/docs/workspace/skills.md +169 -0
  116. package/.docs/guides/agent-frameworks/ai-sdk.md +140 -0
  117. package/.docs/guides/build-your-ui/ai-sdk-ui.md +1499 -0
  118. package/.docs/guides/build-your-ui/assistant-ui.md +156 -0
  119. package/.docs/guides/build-your-ui/copilotkit.md +289 -0
  120. package/.docs/guides/deployment/amazon-ec2.md +130 -0
  121. package/.docs/guides/deployment/aws-lambda.md +248 -0
  122. package/.docs/guides/deployment/azure-app-services.md +114 -0
  123. package/.docs/guides/deployment/cloudflare.md +99 -0
  124. package/.docs/guides/deployment/digital-ocean.md +168 -0
  125. package/.docs/guides/deployment/inngest.md +682 -0
  126. package/.docs/guides/deployment/netlify.md +77 -0
  127. package/.docs/guides/deployment/vercel.md +101 -0
  128. package/.docs/guides/getting-started/astro.md +398 -0
  129. package/.docs/guides/getting-started/electron.md +504 -0
  130. package/.docs/guides/getting-started/express.md +251 -0
  131. package/.docs/guides/getting-started/hono.md +190 -0
  132. package/.docs/guides/getting-started/next-js.md +347 -0
  133. package/.docs/guides/getting-started/nuxt.md +497 -0
  134. package/.docs/guides/getting-started/quickstart.md +67 -0
  135. package/.docs/guides/getting-started/sveltekit.md +296 -0
  136. package/.docs/guides/getting-started/vite-react.md +425 -0
  137. package/.docs/guides/guide/ai-recruiter.md +226 -0
  138. package/.docs/guides/guide/chef-michel.md +211 -0
  139. package/.docs/guides/guide/code-review-bot.md +226 -0
  140. package/.docs/guides/guide/dev-assistant.md +307 -0
  141. package/.docs/guides/guide/docs-manager.md +238 -0
  142. package/.docs/guides/guide/github-actions-pr-description.md +236 -0
  143. package/.docs/guides/guide/notes-mcp-server.md +416 -0
  144. package/.docs/guides/guide/research-assistant.md +348 -0
  145. package/.docs/guides/guide/research-coordinator.md +416 -0
  146. package/.docs/guides/guide/stock-agent.md +132 -0
  147. package/.docs/guides/guide/web-search.md +320 -0
  148. package/.docs/guides/guide/whatsapp-chat-bot.md +405 -0
  149. package/.docs/guides/index.md +3 -0
  150. package/.docs/guides/migrations/agentnetwork.md +97 -0
  151. package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +112 -0
  152. package/.docs/guides/migrations/network-to-supervisor.md +261 -0
  153. package/.docs/guides/migrations/upgrade-to-v1/agent.md +404 -0
  154. package/.docs/guides/migrations/upgrade-to-v1/cli.md +57 -0
  155. package/.docs/guides/migrations/upgrade-to-v1/client.md +337 -0
  156. package/.docs/guides/migrations/upgrade-to-v1/deployment.md +37 -0
  157. package/.docs/guides/migrations/upgrade-to-v1/evals.md +239 -0
  158. package/.docs/guides/migrations/upgrade-to-v1/mastra.md +143 -0
  159. package/.docs/guides/migrations/upgrade-to-v1/mcp.md +97 -0
  160. package/.docs/guides/migrations/upgrade-to-v1/memory.md +285 -0
  161. package/.docs/guides/migrations/upgrade-to-v1/overview.md +119 -0
  162. package/.docs/guides/migrations/upgrade-to-v1/processors.md +68 -0
  163. package/.docs/guides/migrations/upgrade-to-v1/rag.md +42 -0
  164. package/.docs/guides/migrations/upgrade-to-v1/storage.md +553 -0
  165. package/.docs/guides/migrations/upgrade-to-v1/tools.md +180 -0
  166. package/.docs/guides/migrations/upgrade-to-v1/tracing.md +412 -0
  167. package/.docs/guides/migrations/upgrade-to-v1/vectors.md +87 -0
  168. package/.docs/guides/migrations/upgrade-to-v1/voice.md +30 -0
  169. package/.docs/guides/migrations/upgrade-to-v1/workflows.md +341 -0
  170. package/.docs/guides/migrations/vnext-to-standard-apis.md +362 -0
  171. package/.docs/models/embeddings.md +161 -0
  172. package/.docs/models/gateways/azure-openai.md +128 -0
  173. package/.docs/models/gateways/custom-gateways.md +545 -0
  174. package/.docs/models/gateways/netlify.md +88 -0
  175. package/.docs/models/gateways/openrouter.md +219 -0
  176. package/.docs/models/gateways/vercel.md +225 -0
  177. package/.docs/models/gateways.md +14 -0
  178. package/.docs/models/index.md +286 -0
  179. package/.docs/models/providers/302ai.md +134 -0
  180. package/.docs/models/providers/abacus.md +125 -0
  181. package/.docs/models/providers/agentrouter.md +90 -0
  182. package/.docs/models/providers/aihubmix.md +107 -0
  183. package/.docs/models/providers/alibaba-cn.md +135 -0
  184. package/.docs/models/providers/alibaba.md +111 -0
  185. package/.docs/models/providers/amazon-bedrock.md +33 -0
  186. package/.docs/models/providers/anthropic.md +153 -0
  187. package/.docs/models/providers/azure.md +33 -0
  188. package/.docs/models/providers/bailing.md +72 -0
  189. package/.docs/models/providers/baseten.md +77 -0
  190. package/.docs/models/providers/berget.md +78 -0
  191. package/.docs/models/providers/cerebras.md +101 -0
  192. package/.docs/models/providers/chutes.md +136 -0
  193. package/.docs/models/providers/cloudflare-ai-gateway.md +33 -0
  194. package/.docs/models/providers/cloudflare-workers-ai.md +109 -0
  195. package/.docs/models/providers/cohere.md +33 -0
  196. package/.docs/models/providers/cortecs.md +91 -0
  197. package/.docs/models/providers/deepinfra.md +112 -0
  198. package/.docs/models/providers/deepseek.md +88 -0
  199. package/.docs/models/providers/fastrouter.md +84 -0
  200. package/.docs/models/providers/fireworks-ai.md +89 -0
  201. package/.docs/models/providers/firmware.md +85 -0
  202. package/.docs/models/providers/friendli.md +78 -0
  203. package/.docs/models/providers/github-models.md +125 -0
  204. package/.docs/models/providers/google-vertex.md +33 -0
  205. package/.docs/models/providers/google.md +159 -0
  206. package/.docs/models/providers/groq.md +107 -0
  207. package/.docs/models/providers/helicone.md +161 -0
  208. package/.docs/models/providers/huggingface.md +90 -0
  209. package/.docs/models/providers/iflowcn.md +84 -0
  210. package/.docs/models/providers/inception.md +72 -0
  211. package/.docs/models/providers/inference.md +79 -0
  212. package/.docs/models/providers/io-intelligence.md +87 -0
  213. package/.docs/models/providers/io-net.md +87 -0
  214. package/.docs/models/providers/jiekou.md +131 -0
  215. package/.docs/models/providers/kilo.md +333 -0
  216. package/.docs/models/providers/kimi-for-coding.md +100 -0
  217. package/.docs/models/providers/kuae-cloud-coding-plan.md +71 -0
  218. package/.docs/models/providers/llama.md +77 -0
  219. package/.docs/models/providers/lmstudio.md +73 -0
  220. package/.docs/models/providers/lucidquery.md +72 -0
  221. package/.docs/models/providers/minimax-cn-coding-plan.md +102 -0
  222. package/.docs/models/providers/minimax-cn.md +102 -0
  223. package/.docs/models/providers/minimax-coding-plan.md +102 -0
  224. package/.docs/models/providers/minimax.md +104 -0
  225. package/.docs/models/providers/mistral.md +124 -0
  226. package/.docs/models/providers/moark.md +72 -0
  227. package/.docs/models/providers/modelscope.md +77 -0
  228. package/.docs/models/providers/moonshotai-cn.md +76 -0
  229. package/.docs/models/providers/moonshotai.md +76 -0
  230. package/.docs/models/providers/morph.md +73 -0
  231. package/.docs/models/providers/nano-gpt.md +103 -0
  232. package/.docs/models/providers/nebius.md +116 -0
  233. package/.docs/models/providers/nova.md +72 -0
  234. package/.docs/models/providers/novita-ai.md +154 -0
  235. package/.docs/models/providers/nvidia.md +141 -0
  236. package/.docs/models/providers/ollama-cloud.md +103 -0
  237. package/.docs/models/providers/ollama.md +33 -0
  238. package/.docs/models/providers/openai.md +193 -0
  239. package/.docs/models/providers/opencode.md +100 -0
  240. package/.docs/models/providers/ovhcloud.md +83 -0
  241. package/.docs/models/providers/perplexity.md +100 -0
  242. package/.docs/models/providers/poe.md +183 -0
  243. package/.docs/models/providers/privatemode-ai.md +75 -0
  244. package/.docs/models/providers/requesty.md +90 -0
  245. package/.docs/models/providers/scaleway.md +84 -0
  246. package/.docs/models/providers/siliconflow-cn.md +138 -0
  247. package/.docs/models/providers/siliconflow.md +140 -0
  248. package/.docs/models/providers/stackit.md +78 -0
  249. package/.docs/models/providers/stepfun.md +73 -0
  250. package/.docs/models/providers/submodel.md +79 -0
  251. package/.docs/models/providers/synthetic.md +96 -0
  252. package/.docs/models/providers/togetherai.md +115 -0
  253. package/.docs/models/providers/upstage.md +73 -0
  254. package/.docs/models/providers/venice.md +95 -0
  255. package/.docs/models/providers/vivgrid.md +106 -0
  256. package/.docs/models/providers/vultr.md +75 -0
  257. package/.docs/models/providers/wandb.md +80 -0
  258. package/.docs/models/providers/xai.md +141 -0
  259. package/.docs/models/providers/xiaomi.md +71 -0
  260. package/.docs/models/providers/zai-coding-plan.md +80 -0
  261. package/.docs/models/providers/zai.md +79 -0
  262. package/.docs/models/providers/zenmux.md +161 -0
  263. package/.docs/models/providers/zhipuai-coding-plan.md +79 -0
  264. package/.docs/models/providers/zhipuai.md +79 -0
  265. package/.docs/models/providers.md +81 -0
  266. package/.docs/reference/agents/agent.md +141 -0
  267. package/.docs/reference/agents/generate.md +186 -0
  268. package/.docs/reference/agents/generateLegacy.md +173 -0
  269. package/.docs/reference/agents/getDefaultGenerateOptions.md +36 -0
  270. package/.docs/reference/agents/getDefaultOptions.md +34 -0
  271. package/.docs/reference/agents/getDefaultStreamOptions.md +36 -0
  272. package/.docs/reference/agents/getDescription.md +21 -0
  273. package/.docs/reference/agents/getInstructions.md +34 -0
  274. package/.docs/reference/agents/getLLM.md +37 -0
  275. package/.docs/reference/agents/getMemory.md +34 -0
  276. package/.docs/reference/agents/getModel.md +34 -0
  277. package/.docs/reference/agents/getTools.md +29 -0
  278. package/.docs/reference/agents/getVoice.md +34 -0
  279. package/.docs/reference/agents/listAgents.md +35 -0
  280. package/.docs/reference/agents/listScorers.md +34 -0
  281. package/.docs/reference/agents/listTools.md +34 -0
  282. package/.docs/reference/agents/listWorkflows.md +34 -0
  283. package/.docs/reference/agents/network.md +133 -0
  284. package/.docs/reference/ai-sdk/chat-route.md +82 -0
  285. package/.docs/reference/ai-sdk/handle-chat-stream.md +53 -0
  286. package/.docs/reference/ai-sdk/handle-network-stream.md +37 -0
  287. package/.docs/reference/ai-sdk/handle-workflow-stream.md +55 -0
  288. package/.docs/reference/ai-sdk/network-route.md +74 -0
  289. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +231 -0
  290. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +79 -0
  291. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +76 -0
  292. package/.docs/reference/ai-sdk/with-mastra.md +59 -0
  293. package/.docs/reference/ai-sdk/workflow-route.md +79 -0
  294. package/.docs/reference/auth/auth0.md +73 -0
  295. package/.docs/reference/auth/better-auth.md +71 -0
  296. package/.docs/reference/auth/clerk.md +36 -0
  297. package/.docs/reference/auth/firebase.md +80 -0
  298. package/.docs/reference/auth/jwt.md +26 -0
  299. package/.docs/reference/auth/supabase.md +33 -0
  300. package/.docs/reference/auth/workos.md +84 -0
  301. package/.docs/reference/cli/create-mastra.md +137 -0
  302. package/.docs/reference/cli/mastra.md +336 -0
  303. package/.docs/reference/client-js/agents.md +437 -0
  304. package/.docs/reference/client-js/error-handling.md +16 -0
  305. package/.docs/reference/client-js/logs.md +24 -0
  306. package/.docs/reference/client-js/mastra-client.md +63 -0
  307. package/.docs/reference/client-js/memory.md +221 -0
  308. package/.docs/reference/client-js/observability.md +72 -0
  309. package/.docs/reference/client-js/telemetry.md +20 -0
  310. package/.docs/reference/client-js/tools.md +44 -0
  311. package/.docs/reference/client-js/vectors.md +79 -0
  312. package/.docs/reference/client-js/workflows.md +199 -0
  313. package/.docs/reference/configuration.md +752 -0
  314. package/.docs/reference/core/addGateway.md +42 -0
  315. package/.docs/reference/core/getAgent.md +21 -0
  316. package/.docs/reference/core/getAgentById.md +21 -0
  317. package/.docs/reference/core/getDeployer.md +22 -0
  318. package/.docs/reference/core/getGateway.md +38 -0
  319. package/.docs/reference/core/getGatewayById.md +41 -0
  320. package/.docs/reference/core/getLogger.md +22 -0
  321. package/.docs/reference/core/getMCPServer.md +47 -0
  322. package/.docs/reference/core/getMCPServerById.md +55 -0
  323. package/.docs/reference/core/getMemory.md +50 -0
  324. package/.docs/reference/core/getScorer.md +54 -0
  325. package/.docs/reference/core/getScorerById.md +54 -0
  326. package/.docs/reference/core/getServer.md +22 -0
  327. package/.docs/reference/core/getStorage.md +22 -0
  328. package/.docs/reference/core/getStoredAgentById.md +89 -0
  329. package/.docs/reference/core/getTelemetry.md +22 -0
  330. package/.docs/reference/core/getVector.md +22 -0
  331. package/.docs/reference/core/getWorkflow.md +42 -0
  332. package/.docs/reference/core/listAgents.md +21 -0
  333. package/.docs/reference/core/listGateways.md +40 -0
  334. package/.docs/reference/core/listLogs.md +38 -0
  335. package/.docs/reference/core/listLogsByRunId.md +36 -0
  336. package/.docs/reference/core/listMCPServers.md +55 -0
  337. package/.docs/reference/core/listMemory.md +56 -0
  338. package/.docs/reference/core/listScorers.md +29 -0
  339. package/.docs/reference/core/listStoredAgents.md +93 -0
  340. package/.docs/reference/core/listVectors.md +22 -0
  341. package/.docs/reference/core/listWorkflows.md +21 -0
  342. package/.docs/reference/core/mastra-class.md +66 -0
  343. package/.docs/reference/core/mastra-model-gateway.md +153 -0
  344. package/.docs/reference/core/setLogger.md +26 -0
  345. package/.docs/reference/core/setStorage.md +27 -0
  346. package/.docs/reference/datasets/addItem.md +37 -0
  347. package/.docs/reference/datasets/addItems.md +35 -0
  348. package/.docs/reference/datasets/compareExperiments.md +52 -0
  349. package/.docs/reference/datasets/create.md +51 -0
  350. package/.docs/reference/datasets/dataset.md +82 -0
  351. package/.docs/reference/datasets/datasets-manager.md +94 -0
  352. package/.docs/reference/datasets/delete.md +25 -0
  353. package/.docs/reference/datasets/deleteExperiment.md +27 -0
  354. package/.docs/reference/datasets/deleteItem.md +27 -0
  355. package/.docs/reference/datasets/deleteItems.md +29 -0
  356. package/.docs/reference/datasets/get.md +31 -0
  357. package/.docs/reference/datasets/getDetails.md +47 -0
  358. package/.docs/reference/datasets/getExperiment.md +30 -0
  359. package/.docs/reference/datasets/getItem.md +33 -0
  360. package/.docs/reference/datasets/getItemHistory.md +31 -0
  361. package/.docs/reference/datasets/list.md +31 -0
  362. package/.docs/reference/datasets/listExperimentResults.md +39 -0
  363. package/.docs/reference/datasets/listExperiments.md +33 -0
  364. package/.docs/reference/datasets/listItems.md +46 -0
  365. package/.docs/reference/datasets/listVersions.md +33 -0
  366. package/.docs/reference/datasets/startExperiment.md +62 -0
  367. package/.docs/reference/datasets/startExperimentAsync.md +43 -0
  368. package/.docs/reference/datasets/update.md +48 -0
  369. package/.docs/reference/datasets/updateItem.md +38 -0
  370. package/.docs/reference/deployer/cloudflare.md +79 -0
  371. package/.docs/reference/deployer/netlify.md +80 -0
  372. package/.docs/reference/deployer/vercel.md +91 -0
  373. package/.docs/reference/deployer.md +100 -0
  374. package/.docs/reference/evals/answer-relevancy.md +105 -0
  375. package/.docs/reference/evals/answer-similarity.md +99 -0
  376. package/.docs/reference/evals/bias.md +120 -0
  377. package/.docs/reference/evals/completeness.md +136 -0
  378. package/.docs/reference/evals/content-similarity.md +101 -0
  379. package/.docs/reference/evals/context-precision.md +196 -0
  380. package/.docs/reference/evals/context-relevance.md +531 -0
  381. package/.docs/reference/evals/create-scorer.md +270 -0
  382. package/.docs/reference/evals/faithfulness.md +114 -0
  383. package/.docs/reference/evals/hallucination.md +213 -0
  384. package/.docs/reference/evals/keyword-coverage.md +128 -0
  385. package/.docs/reference/evals/mastra-scorer.md +123 -0
  386. package/.docs/reference/evals/noise-sensitivity.md +675 -0
  387. package/.docs/reference/evals/prompt-alignment.md +614 -0
  388. package/.docs/reference/evals/run-evals.md +179 -0
  389. package/.docs/reference/evals/scorer-utils.md +326 -0
  390. package/.docs/reference/evals/textual-difference.md +113 -0
  391. package/.docs/reference/evals/tone-consistency.md +119 -0
  392. package/.docs/reference/evals/tool-call-accuracy.md +533 -0
  393. package/.docs/reference/evals/toxicity.md +123 -0
  394. package/.docs/reference/harness/harness-class.md +708 -0
  395. package/.docs/reference/index.md +277 -0
  396. package/.docs/reference/logging/pino-logger.md +117 -0
  397. package/.docs/reference/mastra-code/createMastraCode.md +108 -0
  398. package/.docs/reference/memory/clone-utilities.md +199 -0
  399. package/.docs/reference/memory/cloneThread.md +130 -0
  400. package/.docs/reference/memory/createThread.md +68 -0
  401. package/.docs/reference/memory/deleteMessages.md +38 -0
  402. package/.docs/reference/memory/getThreadById.md +24 -0
  403. package/.docs/reference/memory/listThreads.md +145 -0
  404. package/.docs/reference/memory/memory-class.md +147 -0
  405. package/.docs/reference/memory/observational-memory.md +565 -0
  406. package/.docs/reference/memory/recall.md +91 -0
  407. package/.docs/reference/observability/tracing/bridges/otel.md +131 -0
  408. package/.docs/reference/observability/tracing/configuration.md +178 -0
  409. package/.docs/reference/observability/tracing/exporters/arize.md +141 -0
  410. package/.docs/reference/observability/tracing/exporters/braintrust.md +93 -0
  411. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +163 -0
  412. package/.docs/reference/observability/tracing/exporters/console-exporter.md +138 -0
  413. package/.docs/reference/observability/tracing/exporters/datadog.md +116 -0
  414. package/.docs/reference/observability/tracing/exporters/default-exporter.md +174 -0
  415. package/.docs/reference/observability/tracing/exporters/laminar.md +78 -0
  416. package/.docs/reference/observability/tracing/exporters/langfuse.md +134 -0
  417. package/.docs/reference/observability/tracing/exporters/langsmith.md +108 -0
  418. package/.docs/reference/observability/tracing/exporters/otel.md +199 -0
  419. package/.docs/reference/observability/tracing/exporters/posthog.md +92 -0
  420. package/.docs/reference/observability/tracing/exporters/sentry.md +184 -0
  421. package/.docs/reference/observability/tracing/instances.md +107 -0
  422. package/.docs/reference/observability/tracing/interfaces.md +743 -0
  423. package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +144 -0
  424. package/.docs/reference/observability/tracing/spans.md +224 -0
  425. package/.docs/reference/processors/batch-parts-processor.md +61 -0
  426. package/.docs/reference/processors/language-detector.md +82 -0
  427. package/.docs/reference/processors/message-history-processor.md +85 -0
  428. package/.docs/reference/processors/moderation-processor.md +104 -0
  429. package/.docs/reference/processors/pii-detector.md +108 -0
  430. package/.docs/reference/processors/processor-interface.md +521 -0
  431. package/.docs/reference/processors/prompt-injection-detector.md +72 -0
  432. package/.docs/reference/processors/semantic-recall-processor.md +117 -0
  433. package/.docs/reference/processors/system-prompt-scrubber.md +80 -0
  434. package/.docs/reference/processors/token-limiter-processor.md +115 -0
  435. package/.docs/reference/processors/tool-call-filter.md +85 -0
  436. package/.docs/reference/processors/tool-search-processor.md +111 -0
  437. package/.docs/reference/processors/unicode-normalizer.md +62 -0
  438. package/.docs/reference/processors/working-memory-processor.md +152 -0
  439. package/.docs/reference/rag/chunk.md +221 -0
  440. package/.docs/reference/rag/database-config.md +261 -0
  441. package/.docs/reference/rag/document.md +114 -0
  442. package/.docs/reference/rag/embeddings.md +92 -0
  443. package/.docs/reference/rag/extract-params.md +168 -0
  444. package/.docs/reference/rag/graph-rag.md +111 -0
  445. package/.docs/reference/rag/metadata-filters.md +216 -0
  446. package/.docs/reference/rag/rerank.md +75 -0
  447. package/.docs/reference/rag/rerankWithScorer.md +80 -0
  448. package/.docs/reference/server/create-route.md +262 -0
  449. package/.docs/reference/server/express-adapter.md +176 -0
  450. package/.docs/reference/server/fastify-adapter.md +90 -0
  451. package/.docs/reference/server/hono-adapter.md +162 -0
  452. package/.docs/reference/server/koa-adapter.md +127 -0
  453. package/.docs/reference/server/mastra-server.md +298 -0
  454. package/.docs/reference/server/register-api-route.md +249 -0
  455. package/.docs/reference/server/routes.md +306 -0
  456. package/.docs/reference/storage/cloudflare-d1.md +218 -0
  457. package/.docs/reference/storage/cloudflare.md +88 -0
  458. package/.docs/reference/storage/composite.md +235 -0
  459. package/.docs/reference/storage/convex.md +161 -0
  460. package/.docs/reference/storage/dynamodb.md +282 -0
  461. package/.docs/reference/storage/lance.md +131 -0
  462. package/.docs/reference/storage/libsql.md +135 -0
  463. package/.docs/reference/storage/mongodb.md +262 -0
  464. package/.docs/reference/storage/mssql.md +157 -0
  465. package/.docs/reference/storage/overview.md +121 -0
  466. package/.docs/reference/storage/postgresql.md +526 -0
  467. package/.docs/reference/storage/upstash.md +160 -0
  468. package/.docs/reference/streaming/ChunkType.md +292 -0
  469. package/.docs/reference/streaming/agents/MastraModelOutput.md +182 -0
  470. package/.docs/reference/streaming/agents/stream.md +221 -0
  471. package/.docs/reference/streaming/agents/streamLegacy.md +142 -0
  472. package/.docs/reference/streaming/workflows/observeStream.md +42 -0
  473. package/.docs/reference/streaming/workflows/resumeStream.md +61 -0
  474. package/.docs/reference/streaming/workflows/stream.md +88 -0
  475. package/.docs/reference/streaming/workflows/timeTravelStream.md +142 -0
  476. package/.docs/reference/templates/overview.md +194 -0
  477. package/.docs/reference/tools/create-tool.md +237 -0
  478. package/.docs/reference/tools/document-chunker-tool.md +89 -0
  479. package/.docs/reference/tools/graph-rag-tool.md +182 -0
  480. package/.docs/reference/tools/mcp-client.md +954 -0
  481. package/.docs/reference/tools/mcp-server.md +1271 -0
  482. package/.docs/reference/tools/vector-query-tool.md +459 -0
  483. package/.docs/reference/vectors/astra.md +121 -0
  484. package/.docs/reference/vectors/chroma.md +264 -0
  485. package/.docs/reference/vectors/convex.md +300 -0
  486. package/.docs/reference/vectors/couchbase.md +226 -0
  487. package/.docs/reference/vectors/duckdb.md +318 -0
  488. package/.docs/reference/vectors/elasticsearch.md +189 -0
  489. package/.docs/reference/vectors/lance.md +220 -0
  490. package/.docs/reference/vectors/libsql.md +305 -0
  491. package/.docs/reference/vectors/mongodb.md +295 -0
  492. package/.docs/reference/vectors/opensearch.md +99 -0
  493. package/.docs/reference/vectors/pg.md +408 -0
  494. package/.docs/reference/vectors/pinecone.md +168 -0
  495. package/.docs/reference/vectors/qdrant.md +222 -0
  496. package/.docs/reference/vectors/s3vectors.md +277 -0
  497. package/.docs/reference/vectors/turbopuffer.md +157 -0
  498. package/.docs/reference/vectors/upstash.md +294 -0
  499. package/.docs/reference/vectors/vectorize.md +147 -0
  500. package/.docs/reference/voice/azure.md +148 -0
  501. package/.docs/reference/voice/cloudflare.md +83 -0
  502. package/.docs/reference/voice/composite-voice.md +121 -0
  503. package/.docs/reference/voice/deepgram.md +79 -0
  504. package/.docs/reference/voice/elevenlabs.md +98 -0
  505. package/.docs/reference/voice/google-gemini-live.md +378 -0
  506. package/.docs/reference/voice/google.md +228 -0
  507. package/.docs/reference/voice/mastra-voice.md +311 -0
  508. package/.docs/reference/voice/murf.md +122 -0
  509. package/.docs/reference/voice/openai-realtime.md +203 -0
  510. package/.docs/reference/voice/openai.md +88 -0
  511. package/.docs/reference/voice/playai.md +80 -0
  512. package/.docs/reference/voice/sarvam.md +126 -0
  513. package/.docs/reference/voice/speechify.md +75 -0
  514. package/.docs/reference/voice/voice.addInstructions.md +55 -0
  515. package/.docs/reference/voice/voice.addTools.md +67 -0
  516. package/.docs/reference/voice/voice.answer.md +54 -0
  517. package/.docs/reference/voice/voice.close.md +51 -0
  518. package/.docs/reference/voice/voice.connect.md +94 -0
  519. package/.docs/reference/voice/voice.events.md +37 -0
  520. package/.docs/reference/voice/voice.getSpeakers.md +129 -0
  521. package/.docs/reference/voice/voice.listen.md +164 -0
  522. package/.docs/reference/voice/voice.off.md +54 -0
  523. package/.docs/reference/voice/voice.on.md +111 -0
  524. package/.docs/reference/voice/voice.send.md +65 -0
  525. package/.docs/reference/voice/voice.speak.md +157 -0
  526. package/.docs/reference/voice/voice.updateConfig.md +60 -0
  527. package/.docs/reference/workflows/run-methods/cancel.md +86 -0
  528. package/.docs/reference/workflows/run-methods/restart.md +33 -0
  529. package/.docs/reference/workflows/run-methods/resume.md +59 -0
  530. package/.docs/reference/workflows/run-methods/start.md +58 -0
  531. package/.docs/reference/workflows/run-methods/startAsync.md +67 -0
  532. package/.docs/reference/workflows/run-methods/timeTravel.md +142 -0
  533. package/.docs/reference/workflows/run.md +59 -0
  534. package/.docs/reference/workflows/step.md +119 -0
  535. package/.docs/reference/workflows/workflow-methods/branch.md +25 -0
  536. package/.docs/reference/workflows/workflow-methods/commit.md +17 -0
  537. package/.docs/reference/workflows/workflow-methods/create-run.md +63 -0
  538. package/.docs/reference/workflows/workflow-methods/dountil.md +25 -0
  539. package/.docs/reference/workflows/workflow-methods/dowhile.md +25 -0
  540. package/.docs/reference/workflows/workflow-methods/foreach.md +118 -0
  541. package/.docs/reference/workflows/workflow-methods/map.md +93 -0
  542. package/.docs/reference/workflows/workflow-methods/parallel.md +21 -0
  543. package/.docs/reference/workflows/workflow-methods/sleep.md +35 -0
  544. package/.docs/reference/workflows/workflow-methods/sleepUntil.md +35 -0
  545. package/.docs/reference/workflows/workflow-methods/then.md +21 -0
  546. package/.docs/reference/workflows/workflow.md +157 -0
  547. package/.docs/reference/workspace/e2b-sandbox.md +289 -0
  548. package/.docs/reference/workspace/filesystem.md +255 -0
  549. package/.docs/reference/workspace/gcs-filesystem.md +174 -0
  550. package/.docs/reference/workspace/local-filesystem.md +343 -0
  551. package/.docs/reference/workspace/local-sandbox.md +301 -0
  552. package/.docs/reference/workspace/s3-filesystem.md +175 -0
  553. package/.docs/reference/workspace/sandbox.md +87 -0
  554. package/.docs/reference/workspace/workspace-class.md +244 -0
  555. package/CHANGELOG.md +8 -0
  556. package/package.json +5 -5
@@ -0,0 +1,107 @@
1
+ # ![AIHubMix logo](https://models.dev/logos/aihubmix.svg)AIHubMix
2
+
3
+ Access 37 AIHubMix models through Mastra's model router. Authentication is handled automatically using the `AIHUBMIX_API_KEY` environment variable.
4
+
5
+ Learn more in the [AIHubMix documentation](https://docs.aihubmix.com).
6
+
7
+ ```bash
8
+ AIHUBMIX_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "aihubmix/Kimi-K2-0905"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [AIHubMix documentation](https://docs.aihubmix.com) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ----------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `aihubmix/claude-haiku-4-5` | 200K | | | | | | $1 | $6 |
38
+ | `aihubmix/claude-opus-4-1` | 200K | | | | | | $17 | $83 |
39
+ | `aihubmix/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
40
+ | `aihubmix/claude-sonnet-4-5` | 200K | | | | | | $3 | $17 |
41
+ | `aihubmix/coding-glm-4.7` | 205K | | | | | | $0.27 | $1 |
42
+ | `aihubmix/coding-glm-4.7-free` | 205K | | | | | | — | — |
43
+ | `aihubmix/coding-minimax-m2.1-free` | 205K | | | | | | — | — |
44
+ | `aihubmix/deepseek-v3.2` | 131K | | | | | | $0.30 | $0.45 |
45
+ | `aihubmix/deepseek-v3.2-fast` | 128K | | | | | | $1 | $3 |
46
+ | `aihubmix/deepseek-v3.2-think` | 131K | | | | | | $0.30 | $0.45 |
47
+ | `aihubmix/gemini-2.5-flash` | 1.0M | | | | | | $0.07 | $0.30 |
48
+ | `aihubmix/gemini-2.5-pro` | 2.0M | | | | | | $1 | $5 |
49
+ | `aihubmix/gemini-3-pro-preview` | 1.0M | | | | | | $2 | $12 |
50
+ | `aihubmix/glm-4.6v` | 128K | | | | | | $0.14 | $0.41 |
51
+ | `aihubmix/glm-4.7` | 205K | | | | | | $0.27 | $1 |
52
+ | `aihubmix/gpt-4.1` | 1.0M | | | | | | $2 | $8 |
53
+ | `aihubmix/gpt-4.1-mini` | 1.0M | | | | | | $0.40 | $2 |
54
+ | `aihubmix/gpt-4.1-nano` | 1.0M | | | | | | $0.10 | $0.40 |
55
+ | `aihubmix/gpt-4o` | 128K | | | | | | $3 | $10 |
56
+ | `aihubmix/gpt-5` | 400K | | | | | | $5 | $20 |
57
+ | `aihubmix/gpt-5-codex` | 400K | | | | | | $1 | $10 |
58
+ | `aihubmix/gpt-5-mini` | 200K | | | | | | $2 | $6 |
59
+ | `aihubmix/gpt-5-nano` | 128K | | | | | | $0.50 | $2 |
60
+ | `aihubmix/gpt-5-pro` | 400K | | | | | | $7 | $28 |
61
+ | `aihubmix/gpt-5.1` | 400K | | | | | | $1 | $10 |
62
+ | `aihubmix/gpt-5.1-codex` | 400K | | | | | | $1 | $10 |
63
+ | `aihubmix/gpt-5.1-codex-max` | 400K | | | | | | $1 | $10 |
64
+ | `aihubmix/gpt-5.1-codex-mini` | 400K | | | | | | $0.25 | $2 |
65
+ | `aihubmix/gpt-5.2` | 400K | | | | | | $2 | $14 |
66
+ | `aihubmix/Kimi-K2-0905` | 262K | | | | | | $0.55 | $2 |
67
+ | `aihubmix/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
68
+ | `aihubmix/minimax-m2.1` | 205K | | | | | | $0.29 | $1 |
69
+ | `aihubmix/o4-mini` | 200K | | | | | | $2 | $6 |
70
+ | `aihubmix/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.28 | $1 |
71
+ | `aihubmix/qwen3-235b-a22b-thinking-2507` | 262K | | | | | | $0.28 | $3 |
72
+ | `aihubmix/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.82 | $3 |
73
+ | `aihubmix/qwen3-max-2026-01-23` | 262K | | | | | | $0.34 | $1 |
74
+
75
+ ## Advanced Configuration
76
+
77
+ ### Custom Headers
78
+
79
+ ```typescript
80
+ const agent = new Agent({
81
+ id: "custom-agent",
82
+ name: "custom-agent",
83
+ model: {
84
+ url: "https://aihubmix.com/v1",
85
+ id: "aihubmix/Kimi-K2-0905",
86
+ apiKey: process.env.AIHUBMIX_API_KEY,
87
+ headers: {
88
+ "X-Custom-Header": "value"
89
+ }
90
+ }
91
+ });
92
+ ```
93
+
94
+ ### Dynamic Model Selection
95
+
96
+ ```typescript
97
+ const agent = new Agent({
98
+ id: "dynamic-agent",
99
+ name: "Dynamic Agent",
100
+ model: ({ requestContext }) => {
101
+ const useAdvanced = requestContext.task === "complex";
102
+ return useAdvanced
103
+ ? "aihubmix/qwen3-max-2026-01-23"
104
+ : "aihubmix/Kimi-K2-0905";
105
+ }
106
+ });
107
+ ```
@@ -0,0 +1,135 @@
1
+ # ![Alibaba (China) logo](https://models.dev/logos/alibaba-cn.svg)Alibaba (China)
2
+
3
+ Access 65 Alibaba (China) models through Mastra's model router. Authentication is handled automatically using the `DASHSCOPE_API_KEY` environment variable.
4
+
5
+ Learn more in the [Alibaba (China) documentation](https://www.alibabacloud.com/help/en/model-studio/models).
6
+
7
+ ```bash
8
+ DASHSCOPE_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "alibaba-cn/deepseek-r1"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Alibaba (China) documentation](https://www.alibabacloud.com/help/en/model-studio/models) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `alibaba-cn/deepseek-r1` | 131K | | | | | | $0.57 | $2 |
38
+ | `alibaba-cn/deepseek-r1-0528` | 131K | | | | | | $0.57 | $2 |
39
+ | `alibaba-cn/deepseek-r1-distill-llama-70b` | 33K | | | | | | $0.29 | $0.86 |
40
+ | `alibaba-cn/deepseek-r1-distill-llama-8b` | 33K | | | | | | — | — |
41
+ | `alibaba-cn/deepseek-r1-distill-qwen-1-5b` | 33K | | | | | | — | — |
42
+ | `alibaba-cn/deepseek-r1-distill-qwen-14b` | 33K | | | | | | $0.14 | $0.43 |
43
+ | `alibaba-cn/deepseek-r1-distill-qwen-32b` | 33K | | | | | | $0.29 | $0.86 |
44
+ | `alibaba-cn/deepseek-r1-distill-qwen-7b` | 33K | | | | | | $0.07 | $0.14 |
45
+ | `alibaba-cn/deepseek-v3` | 66K | | | | | | $0.29 | $1 |
46
+ | `alibaba-cn/deepseek-v3-1` | 131K | | | | | | $0.57 | $2 |
47
+ | `alibaba-cn/deepseek-v3-2-exp` | 131K | | | | | | $0.29 | $0.43 |
48
+ | `alibaba-cn/kimi-k2-thinking` | 262K | | | | | | $0.57 | $2 |
49
+ | `alibaba-cn/kimi-k2.5` | 262K | | | | | | $0.57 | $2 |
50
+ | `alibaba-cn/moonshot-kimi-k2-instruct` | 131K | | | | | | $0.57 | $2 |
51
+ | `alibaba-cn/qvq-max` | 131K | | | | | | $1 | $5 |
52
+ | `alibaba-cn/qwen-deep-research` | 1.0M | | | | | | $8 | $23 |
53
+ | `alibaba-cn/qwen-doc-turbo` | 131K | | | | | | $0.09 | $0.14 |
54
+ | `alibaba-cn/qwen-flash` | 1.0M | | | | | | $0.02 | $0.22 |
55
+ | `alibaba-cn/qwen-long` | 10.0M | | | | | | $0.07 | $0.29 |
56
+ | `alibaba-cn/qwen-math-plus` | 4K | | | | | | $0.57 | $2 |
57
+ | `alibaba-cn/qwen-math-turbo` | 4K | | | | | | $0.29 | $0.86 |
58
+ | `alibaba-cn/qwen-max` | 131K | | | | | | $0.34 | $1 |
59
+ | `alibaba-cn/qwen-mt-plus` | 16K | | | | | | $0.26 | $0.78 |
60
+ | `alibaba-cn/qwen-mt-turbo` | 16K | | | | | | $0.10 | $0.28 |
61
+ | `alibaba-cn/qwen-omni-turbo` | 33K | | | | | | $0.06 | $0.23 |
62
+ | `alibaba-cn/qwen-omni-turbo-realtime` | 33K | | | | | | $0.23 | $0.92 |
63
+ | `alibaba-cn/qwen-plus` | 1.0M | | | | | | $0.12 | $0.29 |
64
+ | `alibaba-cn/qwen-plus-character` | 33K | | | | | | $0.12 | $0.29 |
65
+ | `alibaba-cn/qwen-turbo` | 1.0M | | | | | | $0.04 | $0.09 |
66
+ | `alibaba-cn/qwen-vl-max` | 131K | | | | | | $0.23 | $0.57 |
67
+ | `alibaba-cn/qwen-vl-ocr` | 34K | | | | | | $0.72 | $0.72 |
68
+ | `alibaba-cn/qwen-vl-plus` | 131K | | | | | | $0.12 | $0.29 |
69
+ | `alibaba-cn/qwen2-5-14b-instruct` | 131K | | | | | | $0.14 | $0.43 |
70
+ | `alibaba-cn/qwen2-5-32b-instruct` | 131K | | | | | | $0.29 | $0.86 |
71
+ | `alibaba-cn/qwen2-5-72b-instruct` | 131K | | | | | | $0.57 | $2 |
72
+ | `alibaba-cn/qwen2-5-7b-instruct` | 131K | | | | | | $0.07 | $0.14 |
73
+ | `alibaba-cn/qwen2-5-coder-32b-instruct` | 131K | | | | | | $0.29 | $0.86 |
74
+ | `alibaba-cn/qwen2-5-coder-7b-instruct` | 131K | | | | | | $0.14 | $0.29 |
75
+ | `alibaba-cn/qwen2-5-math-72b-instruct` | 4K | | | | | | $0.57 | $2 |
76
+ | `alibaba-cn/qwen2-5-math-7b-instruct` | 4K | | | | | | $0.14 | $0.29 |
77
+ | `alibaba-cn/qwen2-5-omni-7b` | 33K | | | | | | $0.09 | $0.34 |
78
+ | `alibaba-cn/qwen2-5-vl-72b-instruct` | 131K | | | | | | $2 | $7 |
79
+ | `alibaba-cn/qwen2-5-vl-7b-instruct` | 131K | | | | | | $0.29 | $0.72 |
80
+ | `alibaba-cn/qwen3-14b` | 131K | | | | | | $0.14 | $0.57 |
81
+ | `alibaba-cn/qwen3-235b-a22b` | 131K | | | | | | $0.29 | $1 |
82
+ | `alibaba-cn/qwen3-32b` | 131K | | | | | | $0.29 | $1 |
83
+ | `alibaba-cn/qwen3-8b` | 131K | | | | | | $0.07 | $0.29 |
84
+ | `alibaba-cn/qwen3-asr-flash` | 53K | | | | | | $0.03 | $0.03 |
85
+ | `alibaba-cn/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.22 | $0.86 |
86
+ | `alibaba-cn/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.86 | $3 |
87
+ | `alibaba-cn/qwen3-coder-flash` | 1.0M | | | | | | $0.14 | $0.57 |
88
+ | `alibaba-cn/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
89
+ | `alibaba-cn/qwen3-max` | 262K | | | | | | $0.86 | $3 |
90
+ | `alibaba-cn/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.14 | $0.57 |
91
+ | `alibaba-cn/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.14 | $1 |
92
+ | `alibaba-cn/qwen3-omni-flash` | 66K | | | | | | $0.06 | $0.23 |
93
+ | `alibaba-cn/qwen3-omni-flash-realtime` | 66K | | | | | | $0.23 | $0.92 |
94
+ | `alibaba-cn/qwen3-vl-235b-a22b` | 131K | | | | | | $0.29 | $1 |
95
+ | `alibaba-cn/qwen3-vl-30b-a3b` | 131K | | | | | | $0.11 | $0.43 |
96
+ | `alibaba-cn/qwen3-vl-plus` | 262K | | | | | | $0.14 | $1 |
97
+ | `alibaba-cn/qwen3.5-397b-a17b` | 262K | | | | | | $0.43 | $3 |
98
+ | `alibaba-cn/qwen3.5-plus` | 1.0M | | | | | | $0.57 | $3 |
99
+ | `alibaba-cn/qwq-32b` | 131K | | | | | | $0.29 | $0.86 |
100
+ | `alibaba-cn/qwq-plus` | 131K | | | | | | $0.23 | $0.57 |
101
+ | `alibaba-cn/tongyi-intent-detect-v3` | 8K | | | | | | $0.06 | $0.14 |
102
+
103
+ ## Advanced Configuration
104
+
105
+ ### Custom Headers
106
+
107
+ ```typescript
108
+ const agent = new Agent({
109
+ id: "custom-agent",
110
+ name: "custom-agent",
111
+ model: {
112
+ url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
113
+ id: "alibaba-cn/deepseek-r1",
114
+ apiKey: process.env.DASHSCOPE_API_KEY,
115
+ headers: {
116
+ "X-Custom-Header": "value"
117
+ }
118
+ }
119
+ });
120
+ ```
121
+
122
+ ### Dynamic Model Selection
123
+
124
+ ```typescript
125
+ const agent = new Agent({
126
+ id: "dynamic-agent",
127
+ name: "Dynamic Agent",
128
+ model: ({ requestContext }) => {
129
+ const useAdvanced = requestContext.task === "complex";
130
+ return useAdvanced
131
+ ? "alibaba-cn/tongyi-intent-detect-v3"
132
+ : "alibaba-cn/deepseek-r1";
133
+ }
134
+ });
135
+ ```
@@ -0,0 +1,111 @@
1
+ # ![Alibaba logo](https://models.dev/logos/alibaba.svg)Alibaba
2
+
3
+ Access 41 Alibaba models through Mastra's model router. Authentication is handled automatically using the `DASHSCOPE_API_KEY` environment variable.
4
+
5
+ Learn more in the [Alibaba documentation](https://www.alibabacloud.com/help/en/model-studio/models).
6
+
7
+ ```bash
8
+ DASHSCOPE_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "alibaba/qvq-max"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Alibaba documentation](https://www.alibabacloud.com/help/en/model-studio/models) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | -------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `alibaba/qvq-max` | 131K | | | | | | $1 | $5 |
38
+ | `alibaba/qwen-flash` | 1.0M | | | | | | $0.05 | $0.40 |
39
+ | `alibaba/qwen-max` | 33K | | | | | | $2 | $6 |
40
+ | `alibaba/qwen-mt-plus` | 16K | | | | | | $2 | $7 |
41
+ | `alibaba/qwen-mt-turbo` | 16K | | | | | | $0.16 | $0.49 |
42
+ | `alibaba/qwen-omni-turbo` | 33K | | | | | | $0.07 | $0.27 |
43
+ | `alibaba/qwen-omni-turbo-realtime` | 33K | | | | | | $0.27 | $1 |
44
+ | `alibaba/qwen-plus` | 1.0M | | | | | | $0.40 | $1 |
45
+ | `alibaba/qwen-plus-character-ja` | 8K | | | | | | $0.50 | $1 |
46
+ | `alibaba/qwen-turbo` | 1.0M | | | | | | $0.05 | $0.20 |
47
+ | `alibaba/qwen-vl-max` | 131K | | | | | | $0.80 | $3 |
48
+ | `alibaba/qwen-vl-ocr` | 34K | | | | | | $0.72 | $0.72 |
49
+ | `alibaba/qwen-vl-plus` | 131K | | | | | | $0.21 | $0.63 |
50
+ | `alibaba/qwen2-5-14b-instruct` | 131K | | | | | | $0.35 | $1 |
51
+ | `alibaba/qwen2-5-32b-instruct` | 131K | | | | | | $0.70 | $3 |
52
+ | `alibaba/qwen2-5-72b-instruct` | 131K | | | | | | $1 | $6 |
53
+ | `alibaba/qwen2-5-7b-instruct` | 131K | | | | | | $0.17 | $0.70 |
54
+ | `alibaba/qwen2-5-omni-7b` | 33K | | | | | | $0.10 | $0.40 |
55
+ | `alibaba/qwen2-5-vl-72b-instruct` | 131K | | | | | | $3 | $8 |
56
+ | `alibaba/qwen2-5-vl-7b-instruct` | 131K | | | | | | $0.35 | $1 |
57
+ | `alibaba/qwen3-14b` | 131K | | | | | | $0.35 | $1 |
58
+ | `alibaba/qwen3-235b-a22b` | 131K | | | | | | $0.70 | $3 |
59
+ | `alibaba/qwen3-32b` | 131K | | | | | | $0.70 | $3 |
60
+ | `alibaba/qwen3-8b` | 131K | | | | | | $0.18 | $0.70 |
61
+ | `alibaba/qwen3-asr-flash` | 53K | | | | | | $0.04 | $0.04 |
62
+ | `alibaba/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.45 | $2 |
63
+ | `alibaba/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $2 | $8 |
64
+ | `alibaba/qwen3-coder-flash` | 1.0M | | | | | | $0.30 | $2 |
65
+ | `alibaba/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
66
+ | `alibaba/qwen3-livetranslate-flash-realtime` | 53K | | | | | | $10 | $10 |
67
+ | `alibaba/qwen3-max` | 262K | | | | | | $1 | $6 |
68
+ | `alibaba/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.50 | $2 |
69
+ | `alibaba/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.50 | $6 |
70
+ | `alibaba/qwen3-omni-flash` | 66K | | | | | | $0.43 | $2 |
71
+ | `alibaba/qwen3-omni-flash-realtime` | 66K | | | | | | $0.52 | $2 |
72
+ | `alibaba/qwen3-vl-235b-a22b` | 131K | | | | | | $0.70 | $3 |
73
+ | `alibaba/qwen3-vl-30b-a3b` | 131K | | | | | | $0.20 | $0.80 |
74
+ | `alibaba/qwen3-vl-plus` | 262K | | | | | | $0.20 | $2 |
75
+ | `alibaba/qwen3.5-397b-a17b` | 262K | | | | | | $0.60 | $4 |
76
+ | `alibaba/qwen3.5-plus` | 1.0M | | | | | | $0.40 | $2 |
77
+ | `alibaba/qwq-plus` | 131K | | | | | | $0.80 | $2 |
78
+
79
+ ## Advanced Configuration
80
+
81
+ ### Custom Headers
82
+
83
+ ```typescript
84
+ const agent = new Agent({
85
+ id: "custom-agent",
86
+ name: "custom-agent",
87
+ model: {
88
+ url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
89
+ id: "alibaba/qvq-max",
90
+ apiKey: process.env.DASHSCOPE_API_KEY,
91
+ headers: {
92
+ "X-Custom-Header": "value"
93
+ }
94
+ }
95
+ });
96
+ ```
97
+
98
+ ### Dynamic Model Selection
99
+
100
+ ```typescript
101
+ const agent = new Agent({
102
+ id: "dynamic-agent",
103
+ name: "Dynamic Agent",
104
+ model: ({ requestContext }) => {
105
+ const useAdvanced = requestContext.task === "complex";
106
+ return useAdvanced
107
+ ? "alibaba/qwq-plus"
108
+ : "alibaba/qvq-max";
109
+ }
110
+ });
111
+ ```
@@ -0,0 +1,33 @@
1
+ # ![Amazon Bedrock logo](https://models.dev/logos/amazon-bedrock.svg)Amazon Bedrock
2
+
3
+ Amazon Bedrock is available through the AI SDK. Install the provider package to use their models with Mastra.
4
+
5
+ For detailed provider-specific documentation, see the [AI SDK Amazon Bedrock provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock).
6
+
7
+ To use this provider with Mastra agents, see the [Agent Overview documentation](https://mastra.ai/docs/agents/overview).
8
+
9
+ ## Installation
10
+
11
+ **npm**:
12
+
13
+ ```bash
14
+ npm install @ai-sdk/amazon-bedrock
15
+ ```
16
+
17
+ **pnpm**:
18
+
19
+ ```bash
20
+ pnpm add @ai-sdk/amazon-bedrock
21
+ ```
22
+
23
+ **Yarn**:
24
+
25
+ ```bash
26
+ yarn add @ai-sdk/amazon-bedrock
27
+ ```
28
+
29
+ **Bun**:
30
+
31
+ ```bash
32
+ bun add @ai-sdk/amazon-bedrock
33
+ ```
@@ -0,0 +1,153 @@
1
+ # ![Anthropic logo](https://models.dev/logos/anthropic.svg)Anthropic
2
+
3
+ Access 22 Anthropic models through Mastra's model router. Authentication is handled automatically using the `ANTHROPIC_API_KEY` environment variable.
4
+
5
+ Learn more in the [Anthropic documentation](https://docs.anthropic.com/en/docs/about-claude/models).
6
+
7
+ ```bash
8
+ ANTHROPIC_API_KEY=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "anthropic/claude-3-5-haiku-20241022"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ ## Models
32
+
33
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
34
+ | -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
35
+ | `anthropic/claude-3-5-haiku-20241022` | 200K | | | | | | $0.80 | $4 |
36
+ | `anthropic/claude-3-5-haiku-latest` | 200K | | | | | | $0.80 | $4 |
37
+ | `anthropic/claude-3-5-sonnet-20240620` | 200K | | | | | | $3 | $15 |
38
+ | `anthropic/claude-3-5-sonnet-20241022` | 200K | | | | | | $3 | $15 |
39
+ | `anthropic/claude-3-7-sonnet-20250219` | 200K | | | | | | $3 | $15 |
40
+ | `anthropic/claude-3-7-sonnet-latest` | 200K | | | | | | $3 | $15 |
41
+ | `anthropic/claude-3-haiku-20240307` | 200K | | | | | | $0.25 | $1 |
42
+ | `anthropic/claude-3-opus-20240229` | 200K | | | | | | $15 | $75 |
43
+ | `anthropic/claude-3-sonnet-20240229` | 200K | | | | | | $3 | $15 |
44
+ | `anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
45
+ | `anthropic/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
46
+ | `anthropic/claude-opus-4-0` | 200K | | | | | | $15 | $75 |
47
+ | `anthropic/claude-opus-4-1` | 200K | | | | | | $15 | $75 |
48
+ | `anthropic/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
49
+ | `anthropic/claude-opus-4-20250514` | 200K | | | | | | $15 | $75 |
50
+ | `anthropic/claude-opus-4-5` | 200K | | | | | | $5 | $25 |
51
+ | `anthropic/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
52
+ | `anthropic/claude-opus-4-6` | 200K | | | | | | $5 | $25 |
53
+ | `anthropic/claude-sonnet-4-0` | 200K | | | | | | $3 | $15 |
54
+ | `anthropic/claude-sonnet-4-20250514` | 200K | | | | | | $3 | $15 |
55
+ | `anthropic/claude-sonnet-4-5` | 200K | | | | | | $3 | $15 |
56
+ | `anthropic/claude-sonnet-4-5-20250929` | 200K | | | | | | $3 | $15 |
57
+
58
+ ## Advanced Configuration
59
+
60
+ ### Custom Headers
61
+
62
+ ```typescript
63
+ const agent = new Agent({
64
+ id: "custom-agent",
65
+ name: "custom-agent",
66
+ model: {
67
+ id: "anthropic/claude-3-5-haiku-20241022",
68
+ apiKey: process.env.ANTHROPIC_API_KEY,
69
+ headers: {
70
+ "X-Custom-Header": "value"
71
+ }
72
+ }
73
+ });
74
+ ```
75
+
76
+ ### Dynamic Model Selection
77
+
78
+ ```typescript
79
+ const agent = new Agent({
80
+ id: "dynamic-agent",
81
+ name: "Dynamic Agent",
82
+ model: ({ requestContext }) => {
83
+ const useAdvanced = requestContext.task === "complex";
84
+ return useAdvanced
85
+ ? "anthropic/claude-sonnet-4-5-20250929"
86
+ : "anthropic/claude-3-5-haiku-20241022";
87
+ }
88
+ });
89
+ ```
90
+
91
+ ## Provider Options
92
+
93
+ Anthropic supports the following provider-specific options via the `providerOptions` parameter:
94
+
95
+ ```typescript
96
+ const response = await agent.generate("Hello!", {
97
+ providerOptions: {
98
+ anthropic: {
99
+ // See available options in the table below
100
+ }
101
+ }
102
+ });
103
+ ```
104
+
105
+ ### Available Options
106
+
107
+ **sendReasoning?:** (`boolean | undefined`)
108
+
109
+ **structuredOutputMode?:** (`"outputFormat" | "jsonTool" | "auto" | undefined`)
110
+
111
+ **thinking?:** (`{ type: "adaptive"; } | { type: "enabled"; budgetTokens?: number | undefined; } | { type: "disabled"; } | undefined`)
112
+
113
+ **disableParallelToolUse?:** (`boolean | undefined`)
114
+
115
+ **cacheControl?:** (`{ type: "ephemeral"; ttl?: "5m" | "1h" | undefined; } | undefined`)
116
+
117
+ **container?:** (`{ id?: string | undefined; skills?: { type: "anthropic" | "custom"; skillId: string; version?: string | undefined; }[] | undefined; } | undefined`)
118
+
119
+ **effort?:** (`"low" | "medium" | "high" | "max" | undefined`)
120
+
121
+ **speed?:** (`"fast" | undefined`)
122
+
123
+ **contextManagement?:** (`{ edits: ({ type: "clear_01"; trigger?: { type: "input_tokens"; value: number; } | undefined; keep?: "all" | { type: "thinking_turns"; value: number; } | undefined; } | { type: "compact_20260112"; trigger?: { ...; } | undefined; pauseAfterCompaction?: boolean | undefined; instructions?: string | undefined; })[]; } |...`)
124
+
125
+ ## Direct Provider Installation
126
+
127
+ This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the [package documentation](https://www.npmjs.com/package/@ai-sdk/anthropic) for more details.
128
+
129
+ **npm**:
130
+
131
+ ```bash
132
+ npm install @ai-sdk/anthropic
133
+ ```
134
+
135
+ **pnpm**:
136
+
137
+ ```bash
138
+ pnpm add @ai-sdk/anthropic
139
+ ```
140
+
141
+ **Yarn**:
142
+
143
+ ```bash
144
+ yarn add @ai-sdk/anthropic
145
+ ```
146
+
147
+ **Bun**:
148
+
149
+ ```bash
150
+ bun add @ai-sdk/anthropic
151
+ ```
152
+
153
+ For detailed provider-specific documentation, see the [AI SDK Anthropic provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic).
@@ -0,0 +1,33 @@
1
+ # ![Azure logo](https://models.dev/logos/azure.svg)Azure
2
+
3
+ Azure is available through the AI SDK. Install the provider package to use their models with Mastra.
4
+
5
+ For detailed provider-specific documentation, see the [AI SDK Azure provider docs](https://ai-sdk.dev/providers/ai-sdk-providers/azure).
6
+
7
+ To use this provider with Mastra agents, see the [Agent Overview documentation](https://mastra.ai/docs/agents/overview).
8
+
9
+ ## Installation
10
+
11
+ **npm**:
12
+
13
+ ```bash
14
+ npm install @ai-sdk/azure
15
+ ```
16
+
17
+ **pnpm**:
18
+
19
+ ```bash
20
+ pnpm add @ai-sdk/azure
21
+ ```
22
+
23
+ **Yarn**:
24
+
25
+ ```bash
26
+ yarn add @ai-sdk/azure
27
+ ```
28
+
29
+ **Bun**:
30
+
31
+ ```bash
32
+ bun add @ai-sdk/azure
33
+ ```
@@ -0,0 +1,72 @@
1
+ # ![Bailing logo](https://models.dev/logos/bailing.svg)Bailing
2
+
3
+ Access 2 Bailing models through Mastra's model router. Authentication is handled automatically using the `BAILING_API_TOKEN` environment variable.
4
+
5
+ Learn more in the [Bailing documentation](https://alipaytbox.yuque.com/sxs0ba/ling/intro).
6
+
7
+ ```bash
8
+ BAILING_API_TOKEN=your-api-key
9
+ ```
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "bailing/Ling-1T"
19
+ });
20
+
21
+ // Generate a response
22
+ const response = await agent.generate("Hello!");
23
+
24
+ // Stream a response
25
+ const stream = await agent.stream("Tell me a story");
26
+ for await (const chunk of stream) {
27
+ console.log(chunk);
28
+ }
29
+ ```
30
+
31
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Bailing documentation](https://alipaytbox.yuque.com/sxs0ba/ling/intro) for details.
32
+
33
+ ## Models
34
+
35
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
36
+ | ----------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
37
+ | `bailing/Ling-1T` | 128K | | | | | | $0.57 | $2 |
38
+ | `bailing/Ring-1T` | 128K | | | | | | $0.57 | $2 |
39
+
40
+ ## Advanced Configuration
41
+
42
+ ### Custom Headers
43
+
44
+ ```typescript
45
+ const agent = new Agent({
46
+ id: "custom-agent",
47
+ name: "custom-agent",
48
+ model: {
49
+ url: "https://api.tbox.cn/api/llm/v1/chat/completions",
50
+ id: "bailing/Ling-1T",
51
+ apiKey: process.env.BAILING_API_TOKEN,
52
+ headers: {
53
+ "X-Custom-Header": "value"
54
+ }
55
+ }
56
+ });
57
+ ```
58
+
59
+ ### Dynamic Model Selection
60
+
61
+ ```typescript
62
+ const agent = new Agent({
63
+ id: "dynamic-agent",
64
+ name: "Dynamic Agent",
65
+ model: ({ requestContext }) => {
66
+ const useAdvanced = requestContext.task === "complex";
67
+ return useAdvanced
68
+ ? "bailing/Ring-1T"
69
+ : "bailing/Ling-1T";
70
+ }
71
+ });
72
+ ```