@mastra/core 1.88.0-alpha.0 → 1.88.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +17 -1
- package/dist/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +1 -1
- package/dist/agent-controller/index.js +1 -1
- package/dist/agent-controller/model-catalog-cache.d.ts +9 -5
- package/dist/agent-controller/session.d.ts +17 -0
- package/dist/{agent-controller-NQKYmY0W.cjs → agent-controller-Bt7DwpZy.cjs} +57 -53
- package/dist/{agent-controller-CQDCmsFD.js → agent-controller-CFNkjF3l.js} +57 -53
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-B7UygDdO.js → background-tasks-DJHuKMQC.js} +1 -1
- package/dist/{background-tasks-CeARf1DK.cjs → background-tasks-DbPzYpIZ.cjs} +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-Dmf04g9P.cjs → builder-961mB1xC.cjs} +2 -2
- package/dist/{builder-CpAEmMdR.js → builder-BD6HtwKv.js} +2 -2
- package/dist/capabilities/302ai.json +200 -200
- package/dist/capabilities/abliteratedllm.json +37 -37
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +22 -22
- package/dist/capabilities/adaption.json +13 -13
- package/dist/capabilities/adzuki.json +22 -22
- package/dist/capabilities/agentrouter.json +10 -10
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +7 -7
- package/dist/capabilities/aiand.json +22 -23
- package/dist/capabilities/aigrow.json +14 -14
- package/dist/capabilities/aimlapi.json +149 -158
- package/dist/capabilities/aixy.json +28 -28
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +99 -99
- package/dist/capabilities/alibaba-coding-plan-cn.json +4 -4
- package/dist/capabilities/alibaba-coding-plan.json +4 -4
- package/dist/capabilities/alibaba-token-plan-cn.json +55 -55
- package/dist/capabilities/alibaba-token-plan.json +56 -56
- package/dist/capabilities/alibaba.json +77 -77
- package/dist/capabilities/ambient.json +7 -7
- package/dist/capabilities/amd-tokenlab.json +5 -5
- package/dist/capabilities/amd.json +6 -6
- package/dist/capabilities/anthropic.json +31 -31
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +4 -4
- package/dist/capabilities/augure.json +5 -5
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +34 -34
- package/dist/capabilities/bee.json +2 -2
- package/dist/capabilities/bothub.json +15 -15
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +38 -38
- package/dist/capabilities/byteplus.json +26 -26
- package/dist/capabilities/cheapaimodel.json +7 -7
- package/dist/capabilities/cheapest-token.json +32 -32
- package/dist/capabilities/chutes.json +33 -33
- package/dist/capabilities/cline-pass.json +37 -37
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudflare-ai-gateway.json +716 -0
- package/dist/capabilities/cloudflare-workers-ai.json +12 -12
- package/dist/capabilities/cohere.json +67 -0
- package/dist/capabilities/commandcode.json +146 -146
- package/dist/capabilities/concentrate.json +281 -281
- package/dist/capabilities/cortecs.json +103 -103
- package/dist/capabilities/crossmodel.json +190 -190
- package/dist/capabilities/crusoe.json +11 -11
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +133 -133
- package/dist/capabilities/deepinfra.json +96 -96
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +115 -115
- package/dist/capabilities/dothoosh.json +34 -34
- package/dist/capabilities/doubleword.json +30 -30
- package/dist/capabilities/edenai.json +288 -279
- package/dist/capabilities/empiriolabs.json +187 -178
- package/dist/capabilities/engy.json +22 -22
- package/dist/capabilities/entrim.json +6 -6
- package/dist/capabilities/evroc.json +15 -15
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +90 -90
- package/dist/capabilities/fireworks-ai.json +93 -82
- package/dist/capabilities/freemodel.json +8 -8
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +87 -87
- package/dist/capabilities/gisoo.json +18 -18
- package/dist/capabilities/gmicloud.json +16 -16
- package/dist/capabilities/google.json +59 -59
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +32 -32
- package/dist/capabilities/helicone.json +80 -80
- package/dist/capabilities/hetzner.json +5 -5
- package/dist/capabilities/hostinger-router.json +11 -11
- package/dist/capabilities/hpc-ai.json +8 -8
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +26 -26
- package/dist/capabilities/huggingface.json +93 -85
- package/dist/capabilities/hyper.json +23 -23
- package/dist/capabilities/impossibl.json +153 -153
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +3 -3
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +6 -6
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +25 -25
- package/dist/capabilities/inferris.json +3 -3
- package/dist/capabilities/infersia.json +9 -9
- package/dist/capabilities/inferx.json +2 -2
- package/dist/capabilities/infomaniak.json +2 -2
- package/dist/capabilities/iteracompute.json +44 -44
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +31 -31
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +49 -49
- package/dist/capabilities/keln.json +23 -23
- package/dist/capabilities/kenari.json +125 -125
- package/dist/capabilities/kilo.json +667 -626
- package/dist/capabilities/kimchi.json +16 -16
- package/dist/capabilities/kimi-code-plan-cn.json +6 -6
- package/dist/capabilities/kimi-code-plan-global.json +6 -6
- package/dist/capabilities/kitani.json +6 -6
- package/dist/capabilities/klavo.json +26 -26
- package/dist/capabilities/korouter.json +34 -34
- package/dist/capabilities/kunavo.json +6 -6
- package/dist/capabilities/liquid.json +11 -11
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +933 -931
- package/dist/capabilities/llmgateway.json +350 -348
- package/dist/capabilities/llmtr.json +20 -20
- package/dist/capabilities/lowrouter.json +62 -62
- package/dist/capabilities/lyceum.json +13 -13
- package/dist/capabilities/melious.json +12 -12
- package/dist/capabilities/merge-gateway.json +296 -296
- package/dist/capabilities/meta.json +10 -10
- package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +5 -5
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +22 -14
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/modal.json +10 -10
- package/dist/capabilities/model-oracle-ai.json +21 -21
- package/dist/capabilities/modelis.json +20 -20
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +12 -12
- package/dist/capabilities/moneo.json +6 -6
- package/dist/capabilities/moonshotai-cn.json +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +12 -12
- package/dist/capabilities/munito-eu.json +6 -6
- package/dist/capabilities/munito.json +8 -8
- package/dist/capabilities/nan.json +25 -25
- package/dist/capabilities/nano-gpt.json +585 -571
- package/dist/capabilities/nearai.json +112 -112
- package/dist/capabilities/nebius.json +36 -36
- package/dist/capabilities/neon.json +123 -123
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +127 -127
- package/dist/capabilities/nvidia.json +16 -16
- package/dist/capabilities/oathbreaker.json +4 -4
- package/dist/capabilities/obscurify.json +31 -31
- package/dist/capabilities/oci.json +5 -5
- package/dist/capabilities/ofox.json +252 -252
- package/dist/capabilities/ollama-cloud.json +55 -55
- package/dist/capabilities/openai.json +54 -54
- package/dist/capabilities/opencode-go.json +109 -93
- package/dist/capabilities/openreason.json +4 -4
- package/dist/capabilities/openrouter.json +529 -529
- package/dist/capabilities/opper.json +27 -27
- package/dist/capabilities/orcarouter.json +263 -263
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +18 -18
- package/dist/capabilities/pareto.json +4 -4
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +64 -64
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +37 -37
- package/dist/capabilities/pioneer.json +2 -2
- package/dist/capabilities/poe.json +140 -140
- package/dist/capabilities/powerspring.json +11 -11
- package/dist/capabilities/primalabs.json +6 -6
- package/dist/capabilities/prime.json +119 -119
- package/dist/capabilities/privatemode-ai.json +7 -7
- package/dist/capabilities/proxystacks.json +3 -3
- package/dist/capabilities/qiniu-ai.json +11 -11
- package/dist/capabilities/refuseless.json +9 -9
- package/dist/capabilities/regolo-ai.json +9 -9
- package/dist/capabilities/requesty.json +201 -201
- package/dist/capabilities/ruapi.json +25 -25
- package/dist/capabilities/runcrate.json +15 -15
- package/dist/capabilities/runinfra.json +17 -17
- package/dist/capabilities/sakana.json +7 -7
- package/dist/capabilities/sambanova.json +5 -5
- package/dist/capabilities/sandbase.json +32 -32
- package/dist/capabilities/sarvam.json +9 -9
- package/dist/capabilities/scaleway.json +14 -14
- package/dist/capabilities/scnet-token-plan.json +4 -4
- package/dist/capabilities/scx-ai.json +21 -21
- package/dist/capabilities/sensenova.json +13 -13
- package/dist/capabilities/siliconflow-cn.json +56 -56
- package/dist/capabilities/siliconflow.json +63 -63
- package/dist/capabilities/snowflake-cortex.json +27 -27
- package/dist/capabilities/sokkan.json +2 -2
- package/dist/capabilities/sparrowcodes.json +18 -18
- package/dist/capabilities/standardcompute.json +83 -83
- package/dist/capabilities/steadyrouter.json +46 -46
- package/dist/capabilities/stepfun-ai-step-plan.json +8 -8
- package/dist/capabilities/stepfun-ai.json +8 -8
- package/dist/capabilities/stepfun-step-plan.json +8 -8
- package/dist/capabilities/stepfun.json +8 -8
- package/dist/capabilities/stepping-stone.json +21 -21
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/synthetic.json +12 -12
- package/dist/capabilities/synthorai.json +22 -22
- package/dist/capabilities/teamorouter.json +24 -24
- package/dist/capabilities/teapot-router.json +8 -8
- package/dist/capabilities/tencent-token-plan-intl.json +24 -24
- package/dist/capabilities/tencent-token-plan.json +35 -35
- package/dist/capabilities/tencent-tokenhub.json +50 -50
- package/dist/capabilities/tensorx.json +47 -47
- package/dist/capabilities/the-grid-ai.json +26 -26
- package/dist/capabilities/thinkingmachines.json +77 -77
- package/dist/capabilities/tinfoil.json +13 -13
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +58 -58
- package/dist/capabilities/tokengo.json +27 -27
- package/dist/capabilities/tokenharbor.json +216 -216
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +13 -13
- package/dist/capabilities/umans-ai-coding-plan.json +14 -14
- package/dist/capabilities/umans-ai.json +11 -11
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +4 -4
- package/dist/capabilities/uplinkswitch.json +22 -22
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +594 -590
- package/dist/capabilities/verda.json +4 -4
- package/dist/capabilities/vivgrid.json +68 -68
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +22 -22
- package/dist/capabilities/vultr.json +19 -19
- package/dist/capabilities/wafer.ai.json +19 -19
- package/dist/capabilities/wallaby.json +4 -4
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +25 -25
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +28 -28
- package/dist/capabilities/zai-coding-plan.json +11 -11
- package/dist/capabilities/zai.json +31 -31
- package/dist/capabilities/zenifra.json +30 -30
- package/dist/capabilities/zenmux.json +175 -175
- package/dist/capabilities/zerogpu.json +9 -9
- package/dist/capabilities/zhipuai-coding-plan.json +3 -3
- package/dist/capabilities/zhipuai.json +33 -33
- package/dist/capabilities/zro.json +4 -4
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-BQ--aLCA.js → channels-Dn6LqqK1.js} +1 -1
- package/dist/{channels-CTCBsS5M.cjs → channels-dYHpz7m2.cjs} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- package/dist/{constants-Dro9fuhk.js → constants-C2Q-ZI5d.js} +6 -0
- package/dist/{constants-B2FVV_2e.cjs → constants-DPHwzvan.cjs} +6 -0
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1079 -1074
- package/dist/docs/references/docs-channels.md +42 -1
- package/dist/docs/references/docs-develop.md +2 -0
- package/dist/docs/references/docs-evals-experiments.md +2 -0
- package/dist/docs/references/docs-guides-build-an-eval-loop.md +5 -1
- package/dist/docs/references/docs-guides-overview.md +2 -1
- package/dist/docs/references/docs-knowledge-importers.md +11 -1
- package/dist/docs/references/docs-knowledge-scopes-and-access.md +26 -0
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +60 -0
- package/dist/docs/references/docs-memory-message-history.md +24 -16
- package/dist/docs/references/docs-memory-overview.md +21 -17
- package/dist/docs/references/docs-sandbox-overview.md +12 -10
- package/dist/docs/references/docs-workflows-control-flow.md +20 -0
- package/dist/docs/references/integrations-observability-arthur.md +1 -1
- package/dist/docs/references/reference-agent-controller-agent-controller-class.md +1 -1
- package/dist/docs/references/reference-agent-controller-session.md +9 -0
- package/dist/docs/references/reference-knowledge-knowledge-class.md +1 -1
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +1 -1
- package/dist/docs/references/reference-observability-tracing-bridges-datadog.md +12 -11
- package/dist/docs/references/reference-processors-processor-interface.md +1 -1
- package/dist/docs/references/reference-storage-overview.md +1 -1
- package/dist/docs/references/reference-voice-overview.md +0 -27
- package/dist/docs/references/reference-workflows-step.md +1 -1
- package/dist/docs/references/reference-workspace-workspace-class.md +3 -1
- package/dist/evals/index.cjs +2 -2
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +2 -2
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/{execution-fence-C8Q0wWkG.cjs → execution-fence-CHI1L6Gw.cjs} +284 -97
- package/dist/{execution-fence-DGFyUV5h.js → execution-fence-P1uj8uB8.js} +273 -98
- package/dist/harness/index.cjs +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/importers/local-host.d.ts +2 -1
- package/dist/knowledge/importers/sink.d.ts +6 -0
- package/dist/knowledge/importers/types.d.ts +5 -0
- package/dist/knowledge/index.cjs +105 -20
- package/dist/knowledge/index.js +105 -21
- package/dist/knowledge/links.d.ts +19 -6
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/mastra.d.ts +19 -0
- package/dist/llm/model/gateways/refreshing-cache.d.ts +52 -0
- package/dist/llm/model/gateways/url-template.d.ts +3 -1
- package/dist/llm/model/provider-types.generated.d.ts +7693 -7570
- package/dist/{llm-YNjDFSui.js → llm-D4BaXbwZ.js} +4 -3
- package/dist/{llm-RIAYOAtD.cjs → llm-DqcaZBHM.cjs} +4 -3
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/loop/workflows/agentic-execution/background-task-check-step.d.ts +4 -0
- package/dist/loop/workflows/agentic-execution/goal-step.d.ts +4 -0
- package/dist/loop/workflows/agentic-execution/is-task-complete-step.d.ts +4 -0
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +4 -0
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +2 -0
- package/dist/loop/workflows/schema.d.ts +13 -0
- package/dist/{manager-DZhtdV6Q.js → manager-BAs1D8t9.js} +3 -3
- package/dist/{manager-Y-jYcS7T.cjs → manager-Do9PPiEw.cjs} +3 -3
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-BJ54VxOO.js → mastra-CaLISVUE.js} +16 -16
- package/dist/{mastra-B2-HBq1-.cjs → mastra-DWCqC_6c.cjs} +16 -16
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-lzZPXaEV.cjs → model-DAcaPIyq.cjs} +1 -1
- package/dist/{model-cS3d5rmF.js → model-DafU-uar.js} +1 -1
- package/dist/{netlify-1lti1j4Z.cjs → netlify-1Nz6N3ej.cjs} +29 -13
- package/dist/{netlify-ClBjc0Xg.js → netlify-CUG0Ko81.js} +29 -13
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-C_XQJvu2.js → provider-registry-BjBiRMhs.js} +22121 -21683
- package/dist/{provider-registry-C6jd3Uxi.cjs → provider-registry-D_cE6sCW.cjs} +22132 -21676
- package/dist/provider-registry.json +21981 -21714
- package/dist/{registry-generator-DBrTbThj.js → registry-generator-VDBSUg0k.js} +1 -1
- package/dist/{registry-generator-BYdAlox6.cjs → registry-generator-ji57sjZC.cjs} +1 -1
- package/dist/{rehydrate-BtwY0ima.cjs → rehydrate-BOhDMI4r.cjs} +2 -2
- package/dist/{rehydrate-4xHubfOY.js → rehydrate-Do67YKWz.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/knowledge/base.d.ts +11 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +1 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +4 -0
- package/dist/storage/domains/knowledge/pages.d.ts +1 -1
- package/dist/storage/domains/observability/tracing.d.ts +12 -0
- package/dist/storage/index.cjs +4 -3
- package/dist/storage/index.js +4 -4
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-H_wVxqdK.js → stream-DlzW_BXE.js} +1 -1
- package/dist/{stream-DqKDB3nL.cjs → stream-HM3ei83E.cjs} +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-DvZcOxWe.js → tool-loop-agent-BBlEpcl4.js} +3 -3
- package/dist/{tool-loop-agent-D4gSdYuN.cjs → tool-loop-agent-CLyS2mqD.cjs} +3 -3
- package/dist/{utils-Dd4m7z13.cjs → utils-CYmtHkJO.cjs} +1 -1
- package/dist/{utils-h5k_ChdS.js → utils-DlBS4OO7.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-DQB9spZ1.js → validate-C7Ltq3EW.js} +1 -1
- package/dist/{validate-u6_TUYSo.cjs → validate-CPda0kNf.cjs} +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-0F7Nukyf.cjs → worker-BTLxhv5x.cjs} +2 -2
- package/dist/{worker-DmUkyJY_.js → worker-C75s75rt.js} +2 -2
- package/dist/{worker-DWOK2M_5.js → worker-CcLWNaev.js} +2 -2
- package/dist/{worker-D-cq8McN.cjs → worker-DkqCjpGQ.cjs} +2 -2
- package/dist/{workflow-DXE15e-w.cjs → workflow-BFlBk2d6.cjs} +3 -3
- package/dist/{workflow-DamOke3z.js → workflow-Dq4584lm.js} +3 -3
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +1 -1
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +4 -4
- package/dist/workflows/index.js +4 -4
- package/dist/workspace/tools/media.d.ts +2 -2
- package/package.json +6 -6
- package/src/llm/model/provider-types.generated.d.ts +7693 -7570
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as createOpenAICompatible, S as createOpenAI, _ as hasAuthCredentials, a as interpolateUrlTemplate, b as MASTRA_GATEWAY_STREAM_TRANSPORT, c as parseModelRouterId, f as MASTRA_USER_AGENT, g as getGatewayId, h as findGatewayForModel, l as createOpenAI$1, o as applyOpencodeCallTimeSessionHeader, r as ModelsDevGateway, s as applyOpencodeSessionHeader, t as NetlifyGateway, u as createGoogleGenerativeAI, v as shouldEnableGateway, w as EventSourceParserStream, x as MastraModelGateway } from "./netlify-
|
|
1
|
+
import { C as createOpenAICompatible, S as createOpenAI, _ as hasAuthCredentials, a as interpolateUrlTemplate, b as MASTRA_GATEWAY_STREAM_TRANSPORT, c as parseModelRouterId, f as MASTRA_USER_AGENT, g as getGatewayId, h as findGatewayForModel, l as createOpenAI$1, o as applyOpencodeCallTimeSessionHeader, r as ModelsDevGateway, s as applyOpencodeSessionHeader, t as NetlifyGateway, u as createGoogleGenerativeAI, v as shouldEnableGateway, w as EventSourceParserStream, x as MastraModelGateway } from "./netlify-CUG0Ko81.js";
|
|
2
2
|
import { n as prepareAzureStrictToolSchemas, r as createStreamFromGenerateResult, t as AISDKV5LanguageModel } from "./model-DS-b2R-R.js";
|
|
3
3
|
import { i as aiV5PromptToAIV7Prompt, r as aiV5PromptToAIV6Prompt } from "./to-prompt-CMlVGYxC.js";
|
|
4
4
|
import { n as isMastraGatewayChatModel, r as markMastraGatewayChatModel } from "./mastra-gateway-provider-tools-C-AjGZis.js";
|
|
5
5
|
import { t as convertToDataContent } from "./content-CFBIylxS.js";
|
|
6
|
-
import { f as MastraGateway, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, p as gatewayServesObservationalMemory, t as GatewayRegistry } from "./provider-registry-
|
|
6
|
+
import { f as MastraGateway, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, p as gatewayServesObservationalMemory, t as GatewayRegistry } from "./provider-registry-BjBiRMhs.js";
|
|
7
7
|
import { i as MastraError } from "./error-oh2DLsP2.js";
|
|
8
8
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
9
9
|
import { n as resolveDynamicArgument } from "./dynamic-argument-BzPK3qPN.js";
|
|
@@ -9015,11 +9015,12 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9015
9015
|
const useInstanceCache = this.shouldUseInstanceGatewayCache(auth);
|
|
9016
9016
|
const cache = useInstanceCache ? this.instanceGatewayCache : this.getGatewayCache();
|
|
9017
9017
|
const authScopeKey = useInstanceCache ? `${auth.source ?? ""}` : "";
|
|
9018
|
+
const gatewayUrl = !this.config.url && (providerId === "cloudflare-ai-gateway" || providerId === "cohere") && this.gateway instanceof ModelsDevGateway ? this.gateway.buildUrl(`${providerId}/${modelId}`) : void 0;
|
|
9018
9019
|
const key = ModelRouterLanguageModel.computeModelCacheKey({
|
|
9019
9020
|
gatewayId: this.gatewayId,
|
|
9020
9021
|
modelId,
|
|
9021
9022
|
providerId,
|
|
9022
|
-
url: this.config.url || "",
|
|
9023
|
+
url: gatewayUrl ? `gateway:${gatewayUrl}` : this.config.url || "",
|
|
9023
9024
|
apiKey,
|
|
9024
9025
|
headersKey: stableHeaderKey(headers),
|
|
9025
9026
|
resolvedTransport,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_netlify = require("./netlify-
|
|
2
|
+
const require_netlify = require("./netlify-1Nz6N3ej.cjs");
|
|
3
3
|
const require_model = require("./model-jBymoqGa.cjs");
|
|
4
4
|
const require_to_prompt = require("./to-prompt-CG-LyaBY.cjs");
|
|
5
5
|
const require_mastra_gateway_provider_tools = require("./mastra-gateway-provider-tools-WpH3Tmu4.cjs");
|
|
6
6
|
const require_content = require("./content-CC0W1d5p.cjs");
|
|
7
|
-
const require_provider_registry = require("./provider-registry-
|
|
7
|
+
const require_provider_registry = require("./provider-registry-D_cE6sCW.cjs");
|
|
8
8
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
9
9
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
10
10
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
@@ -9017,11 +9017,12 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9017
9017
|
const useInstanceCache = this.shouldUseInstanceGatewayCache(auth);
|
|
9018
9018
|
const cache = useInstanceCache ? this.instanceGatewayCache : this.getGatewayCache();
|
|
9019
9019
|
const authScopeKey = useInstanceCache ? `${auth.source ?? ""}` : "";
|
|
9020
|
+
const gatewayUrl = !this.config.url && (providerId === "cloudflare-ai-gateway" || providerId === "cohere") && this.gateway instanceof require_netlify.ModelsDevGateway ? this.gateway.buildUrl(`${providerId}/${modelId}`) : void 0;
|
|
9020
9021
|
const key = ModelRouterLanguageModel.computeModelCacheKey({
|
|
9021
9022
|
gatewayId: this.gatewayId,
|
|
9022
9023
|
modelId,
|
|
9023
9024
|
providerId,
|
|
9024
|
-
url: this.config.url || "",
|
|
9025
|
+
url: gatewayUrl ? `gateway:${gatewayUrl}` : this.config.url || "",
|
|
9025
9026
|
apiKey,
|
|
9026
9027
|
headersKey: stableHeaderKey(headers),
|
|
9027
9028
|
resolvedTransport,
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_stream = require("../stream-
|
|
3
|
-
const require_execution_fence = require("../execution-fence-
|
|
2
|
+
const require_stream = require("../stream-HM3ei83E.cjs");
|
|
3
|
+
const require_execution_fence = require("../execution-fence-CHI1L6Gw.cjs");
|
|
4
4
|
exports.MastraTimeoutError = require_stream.MastraTimeoutError;
|
|
5
5
|
exports.createScorer = require_execution_fence.createScorer;
|
|
6
6
|
exports.createTimeoutAbortSignal = require_stream.createTimeoutAbortSignal;
|
package/dist/loop/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { An as isMastraTimeoutError, En as createTimeoutAbortSignal, Tn as MastraTimeoutError } from "../stream-
|
|
2
|
-
import { At as runDefaultCompletionCheck, Ct as formatCompletionFeedback, Dt as generateStructuredFinalResult, Et as generateFinalResult, Mt as runValidation, Nt as loop, Ot as runChecks, St as formatCheckFeedback, Tt as formatValidationFeedback, h as createScorer, jt as runStreamCompletionScorers, kt as runCompletionScorers, wt as formatStreamCompletionFeedback } from "../execution-fence-
|
|
1
|
+
import { An as isMastraTimeoutError, En as createTimeoutAbortSignal, Tn as MastraTimeoutError } from "../stream-DlzW_BXE.js";
|
|
2
|
+
import { At as runDefaultCompletionCheck, Ct as formatCompletionFeedback, Dt as generateStructuredFinalResult, Et as generateFinalResult, Mt as runValidation, Nt as loop, Ot as runChecks, St as formatCheckFeedback, Tt as formatValidationFeedback, h as createScorer, jt as runStreamCompletionScorers, kt as runCompletionScorers, wt as formatStreamCompletionFeedback } from "../execution-fence-P1uj8uB8.js";
|
|
3
3
|
export { MastraTimeoutError, createScorer, createTimeoutAbortSignal, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, isMastraTimeoutError, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation };
|
|
@@ -70,6 +70,8 @@ export declare function createBackgroundTaskCheckStep<Tools extends ToolSet = To
|
|
|
70
70
|
};
|
|
71
71
|
processorRetryCount?: number | undefined;
|
|
72
72
|
fallbackModelIndex?: number | undefined;
|
|
73
|
+
fallbackModelId?: string | undefined;
|
|
74
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
73
75
|
skipUnavailableAttachments?: boolean | undefined;
|
|
74
76
|
processorRetryFeedback?: string | undefined;
|
|
75
77
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -137,6 +139,8 @@ export declare function createBackgroundTaskCheckStep<Tools extends ToolSet = To
|
|
|
137
139
|
};
|
|
138
140
|
processorRetryCount?: number | undefined;
|
|
139
141
|
fallbackModelIndex?: number | undefined;
|
|
142
|
+
fallbackModelId?: string | undefined;
|
|
143
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
140
144
|
skipUnavailableAttachments?: boolean | undefined;
|
|
141
145
|
processorRetryFeedback?: string | undefined;
|
|
142
146
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -70,6 +70,8 @@ export declare function createGoalStep<Tools extends ToolSet = ToolSet, OUTPUT =
|
|
|
70
70
|
};
|
|
71
71
|
processorRetryCount?: number | undefined;
|
|
72
72
|
fallbackModelIndex?: number | undefined;
|
|
73
|
+
fallbackModelId?: string | undefined;
|
|
74
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
73
75
|
skipUnavailableAttachments?: boolean | undefined;
|
|
74
76
|
processorRetryFeedback?: string | undefined;
|
|
75
77
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -137,6 +139,8 @@ export declare function createGoalStep<Tools extends ToolSet = ToolSet, OUTPUT =
|
|
|
137
139
|
};
|
|
138
140
|
processorRetryCount?: number | undefined;
|
|
139
141
|
fallbackModelIndex?: number | undefined;
|
|
142
|
+
fallbackModelId?: string | undefined;
|
|
143
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
140
144
|
skipUnavailableAttachments?: boolean | undefined;
|
|
141
145
|
processorRetryFeedback?: string | undefined;
|
|
142
146
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -70,6 +70,8 @@ export declare function createIsTaskCompleteStep<Tools extends ToolSet = ToolSet
|
|
|
70
70
|
};
|
|
71
71
|
processorRetryCount?: number | undefined;
|
|
72
72
|
fallbackModelIndex?: number | undefined;
|
|
73
|
+
fallbackModelId?: string | undefined;
|
|
74
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
73
75
|
skipUnavailableAttachments?: boolean | undefined;
|
|
74
76
|
processorRetryFeedback?: string | undefined;
|
|
75
77
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -137,6 +139,8 @@ export declare function createIsTaskCompleteStep<Tools extends ToolSet = ToolSet
|
|
|
137
139
|
};
|
|
138
140
|
processorRetryCount?: number | undefined;
|
|
139
141
|
fallbackModelIndex?: number | undefined;
|
|
142
|
+
fallbackModelId?: string | undefined;
|
|
143
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
140
144
|
skipUnavailableAttachments?: boolean | undefined;
|
|
141
145
|
processorRetryFeedback?: string | undefined;
|
|
142
146
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -71,6 +71,8 @@ export declare function createLLMExecutionStep<TOOLS extends ToolSet = ToolSet,
|
|
|
71
71
|
};
|
|
72
72
|
processorRetryCount?: number | undefined;
|
|
73
73
|
fallbackModelIndex?: number | undefined;
|
|
74
|
+
fallbackModelId?: string | undefined;
|
|
75
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
74
76
|
skipUnavailableAttachments?: boolean | undefined;
|
|
75
77
|
processorRetryFeedback?: string | undefined;
|
|
76
78
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -138,6 +140,8 @@ export declare function createLLMExecutionStep<TOOLS extends ToolSet = ToolSet,
|
|
|
138
140
|
};
|
|
139
141
|
processorRetryCount?: number | undefined;
|
|
140
142
|
fallbackModelIndex?: number | undefined;
|
|
143
|
+
fallbackModelId?: string | undefined;
|
|
144
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
141
145
|
skipUnavailableAttachments?: boolean | undefined;
|
|
142
146
|
processorRetryFeedback?: string | undefined;
|
|
143
147
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -83,6 +83,8 @@ export declare function createLLMMappingStep<Tools extends ToolSet = ToolSet, OU
|
|
|
83
83
|
};
|
|
84
84
|
processorRetryCount?: number | undefined;
|
|
85
85
|
fallbackModelIndex?: number | undefined;
|
|
86
|
+
fallbackModelId?: string | undefined;
|
|
87
|
+
fallbackModelTriesEarlierEntries?: boolean | undefined;
|
|
86
88
|
skipUnavailableAttachments?: boolean | undefined;
|
|
87
89
|
processorRetryFeedback?: string | undefined;
|
|
88
90
|
isTaskCompleteCheckFailed?: boolean | undefined;
|
|
@@ -65,6 +65,17 @@ export interface LLMIterationData<Tools extends ToolSet = ToolSet, OUTPUT = unde
|
|
|
65
65
|
* Preserved across processor-triggered retries so retries resume on the same fallback model.
|
|
66
66
|
*/
|
|
67
67
|
fallbackModelIndex?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Id of the model serving the run, set when there is more than one model.
|
|
70
|
+
* A resumed run resolves its models again; the id finds the model when the list changed order.
|
|
71
|
+
*/
|
|
72
|
+
fallbackModelId?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Set when a resumed run found its model at another position than the one it saved. The entries
|
|
75
|
+
* now ahead of that model were not tried in this run, so a failure goes on to them too. Kept for
|
|
76
|
+
* the rest of the run, processor retries included.
|
|
77
|
+
*/
|
|
78
|
+
fallbackModelTriesEarlierEntries?: boolean;
|
|
68
79
|
/**
|
|
69
80
|
* Set on the retry that follows an attachment download failure nothing else
|
|
70
81
|
* recovered. That retry replaces unavailable attachments with a placeholder.
|
|
@@ -158,6 +169,8 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
|
|
|
158
169
|
}, z.core.$strip>;
|
|
159
170
|
processorRetryCount: z.ZodOptional<z.ZodNumber>;
|
|
160
171
|
fallbackModelIndex: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
fallbackModelId: z.ZodOptional<z.ZodString>;
|
|
173
|
+
fallbackModelTriesEarlierEntries: z.ZodOptional<z.ZodBoolean>;
|
|
161
174
|
skipUnavailableAttachments: z.ZodOptional<z.ZodBoolean>;
|
|
162
175
|
processorRetryFeedback: z.ZodOptional<z.ZodString>;
|
|
163
176
|
isTaskCompleteCheckFailed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
|
|
2
2
|
import { i as MastraError } from "./error-oh2DLsP2.js";
|
|
3
|
-
import { ft as loadStepResults, un as isSupportedLanguageModel } from "./stream-
|
|
4
|
-
import {
|
|
3
|
+
import { ft as loadStepResults, un as isSupportedLanguageModel } from "./stream-DlzW_BXE.js";
|
|
4
|
+
import { Fs as createStep, Is as createWorkflow, Ji as assertSupportedPatterns, d as validateAndSaveScore, l as flushBeforeTraceRead, m as ScorerRunError } from "./execution-fence-P1uj8uB8.js";
|
|
5
5
|
import { o as MASTRA_RESOURCE_ID_KEY, p as withoutLiveRequestKeys, u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
6
6
|
import { _ as resolveObservabilityContext } from "./observability-DPDWibyH.js";
|
|
7
7
|
import { t as EntityType } from "./storage-Cc50aQAp.js";
|
|
8
8
|
import { a as getOrCreateSpan } from "./utils-DU_pU5SK.js";
|
|
9
9
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
10
|
-
import { Cr as extractTrajectory, Tr as extractWorkflowTrajectory, mn as BATCH_DELETE_TRACES_MAX_IDS, wr as extractTrajectoryFromTrace } from "./constants-
|
|
10
|
+
import { Cr as extractTrajectory, Tr as extractWorkflowTrajectory, mn as BATCH_DELETE_TRACES_MAX_IDS, wr as extractTrajectoryFromTrace } from "./constants-C2Q-ZI5d.js";
|
|
11
11
|
import { isZodType } from "@mastra/schema-compat";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { zodToJsonSchema } from "@mastra/schema-compat/zod-to-json";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
2
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
3
|
-
const require_stream = require("./stream-
|
|
4
|
-
const require_execution_fence = require("./execution-fence-
|
|
3
|
+
const require_stream = require("./stream-HM3ei83E.cjs");
|
|
4
|
+
const require_execution_fence = require("./execution-fence-CHI1L6Gw.cjs");
|
|
5
5
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
6
6
|
const require_observability = require("./observability-VaoaeadK.cjs");
|
|
7
7
|
const require_storage = require("./storage-CfG0I2aF.cjs");
|
|
8
8
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
9
9
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
10
|
-
const require_constants = require("./constants-
|
|
10
|
+
const require_constants = require("./constants-DPHwzvan.cjs");
|
|
11
11
|
let _mastra_schema_compat = require("@mastra/schema-compat");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let _mastra_schema_compat_zod_to_json = require("@mastra/schema-compat/zod-to-json");
|
package/dist/mastra/index.cjs
CHANGED
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Mastra } from "../mastra-
|
|
1
|
+
export { t as Mastra } from "../mastra-CaLISVUE.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $c as
|
|
2
|
-
import { l as BackgroundTaskManager } from "./background-tasks-
|
|
1
|
+
import { $c as runFenceConflictOf, Bl as waitMs, Fs as createStep, Gc as nestedRunStatusOf, Hc as createNestedRunParentStatusLookup, Hl as hasDurableExecution, Io as augmentWithInit, Is as createWorkflow, Lo as getStorageSource, Ls as WorkflowEventProcessor, Qc as repeatAfterSettled, Rr as dispatchDueNotifications, Su as runOutsideRunFenceScope, Uc as nestedRunParentOf, Vc as cancelNestedRun, Wc as nestedRunRecoveryAction, Wl as isDurableAgentLike, Xc as WORKFLOW_RUN_LEASE_TTL_MS, Zc as renewWorkflowLease, ac as abandonDurableAgentExecutions, bn as AgentChannels, cc as getActiveDurableAgentWorkflowExecutions, fc as isDurableAgentExecutionDetached, i as agentThreadStreamRuntime, ia as BackgroundTasksInMemory, lc as getExecutingInstances, mt as __registerMastraCtor, n as getExecutionClaimScope, nl as normalizeConcurrency, rl as runWithConcurrency, tl as createConcurrencyLimiter, u as createOnScorerHook, xr as WorkflowsInMemory, yr as InMemoryStore, zl as assertDrainTimeout, zs as computeScheduleDefinitionHash } from "./execution-fence-P1uj8uB8.js";
|
|
2
|
+
import { l as BackgroundTaskManager } from "./background-tasks-DJHuKMQC.js";
|
|
3
3
|
import { t as InMemoryServerCache } from "./inmemory-BK3zLwvM.js";
|
|
4
|
-
import { t as DatasetsManager } from "./manager-
|
|
4
|
+
import { t as DatasetsManager } from "./manager-BAs1D8t9.js";
|
|
5
5
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "./error-oh2DLsP2.js";
|
|
6
6
|
import { f as isRunLocalTopic, v as EventEmitterPubSub } from "./output-helpers-D-qplq22.js";
|
|
7
7
|
import { a as registerHook, r as deregisterHook } from "./hooks-Bth8Cjpj.js";
|
|
8
8
|
import { LicenseClient } from "./license/index.js";
|
|
9
|
-
import { g as getGatewayId } from "./netlify-
|
|
10
|
-
import { l as defaultGateways } from "./llm-
|
|
9
|
+
import { g as getGatewayId } from "./netlify-CUG0Ko81.js";
|
|
10
|
+
import { l as defaultGateways } from "./llm-D4BaXbwZ.js";
|
|
11
11
|
import { l as isAdaptableLogger, n as LogLevel, t as ConsoleLogger, u as noopLogger } from "./logger-BwbmRqfc.js";
|
|
12
12
|
import { DualLogger, createExportSuppressedLogger, isObservabilityExportSuppressed, resolveTraceFields } from "./logger/index.js";
|
|
13
13
|
import { c as fsAgentScheduleRowId, g as toEpochMs, h as computeNextFireAt, l as parseFsAgentScheduleRowId, m as computeNextFire, t as Schedules } from "./schedules-DZfSx-7P.js";
|
|
@@ -17,14 +17,14 @@ import { f as resolveCurrentSpan } from "./utils-DU_pU5SK.js";
|
|
|
17
17
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
18
18
|
import { r as InMemoryDB } from "./source-B3He4_mz.js";
|
|
19
19
|
import { r as trackFeatureUsage } from "./feature-telemetry-DdR8J_5o.js";
|
|
20
|
-
import { r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "./tool-loop-agent-
|
|
20
|
+
import { r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "./tool-loop-agent-BBlEpcl4.js";
|
|
21
21
|
import { r as normalizeToolPayloadTransformPolicy } from "./payload-transform-Dj3HUeD4.js";
|
|
22
|
-
import { v as readPositiveIntEnv } from "./utils-
|
|
23
|
-
import { a as OrchestrationWorker, i as ORCHESTRATION_GROUP, n as BackgroundTaskWorker, r as SchedulerWorker } from "./worker-
|
|
24
|
-
import { n as normalizeWorkflowBuilderDefinition } from "./builder-
|
|
25
|
-
import { d as toJsonSchemaOrUndefined, p as collectNestedWorkflowIds, t as assertValidDynamicWorkflow } from "./validate-
|
|
26
|
-
import { t as rehydrateWorkflow } from "./rehydrate-
|
|
27
|
-
import { Rn as createRunScope } from "./stream-
|
|
22
|
+
import { v as readPositiveIntEnv } from "./utils-DlBS4OO7.js";
|
|
23
|
+
import { a as OrchestrationWorker, i as ORCHESTRATION_GROUP, n as BackgroundTaskWorker, r as SchedulerWorker } from "./worker-CcLWNaev.js";
|
|
24
|
+
import { n as normalizeWorkflowBuilderDefinition } from "./builder-BD6HtwKv.js";
|
|
25
|
+
import { d as toJsonSchemaOrUndefined, p as collectNestedWorkflowIds, t as assertValidDynamicWorkflow } from "./validate-C7Ltq3EW.js";
|
|
26
|
+
import { t as rehydrateWorkflow } from "./rehydrate-Do67YKWz.js";
|
|
27
|
+
import { Rn as createRunScope } from "./stream-DlzW_BXE.js";
|
|
28
28
|
import { TTLCache } from "@isaacs/ttlcache";
|
|
29
29
|
import { z } from "zod/v4";
|
|
30
30
|
// src/notifications/workflow.ts
|
|
@@ -2883,7 +2883,7 @@ var Mastra = class Mastra {
|
|
|
2883
2883
|
*/
|
|
2884
2884
|
async __ensureExperimentWorkflow() {
|
|
2885
2885
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2886
|
-
const { buildExperimentWorkflow } = await import("./manager-
|
|
2886
|
+
const { buildExperimentWorkflow } = await import("./manager-BAs1D8t9.js").then((n) => n.b);
|
|
2887
2887
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2888
2888
|
this.__registerInternalWorkflow(buildExperimentWorkflow(), void 0, { distributed: true });
|
|
2889
2889
|
}
|
|
@@ -5084,7 +5084,7 @@ var Mastra = class Mastra {
|
|
|
5084
5084
|
if (!this.#workerFilter || this.#workerFilter.has("agent-schedule")) {
|
|
5085
5085
|
let agentScheduleWorker = this.#findAgentScheduleWorker();
|
|
5086
5086
|
if (!agentScheduleWorker) {
|
|
5087
|
-
const { AgentScheduleWorker } = await import("./worker-
|
|
5087
|
+
const { AgentScheduleWorker } = await import("./worker-C75s75rt.js");
|
|
5088
5088
|
agentScheduleWorker = new AgentScheduleWorker();
|
|
5089
5089
|
agentScheduleWorker.__registerMastra(this);
|
|
5090
5090
|
this.#workers.push(agentScheduleWorker);
|
|
@@ -5814,7 +5814,7 @@ var Mastra = class Mastra {
|
|
|
5814
5814
|
this.#workers.push(sw);
|
|
5815
5815
|
}
|
|
5816
5816
|
if (!this.#findAgentScheduleWorker()) {
|
|
5817
|
-
const { AgentScheduleWorker } = await import("./worker-
|
|
5817
|
+
const { AgentScheduleWorker } = await import("./worker-C75s75rt.js");
|
|
5818
5818
|
const asw = new AgentScheduleWorker();
|
|
5819
5819
|
asw.__registerMastra(this);
|
|
5820
5820
|
this.#workers.push(asw);
|
|
@@ -6287,7 +6287,7 @@ var Mastra = class Mastra {
|
|
|
6287
6287
|
#syncGatewayRegistry() {
|
|
6288
6288
|
try {
|
|
6289
6289
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") return;
|
|
6290
|
-
import("./provider-registry-
|
|
6290
|
+
import("./provider-registry-BjBiRMhs.js").then((n) => n.d).then(async ({ GatewayRegistry }) => {
|
|
6291
6291
|
const registry = GatewayRegistry.getInstance();
|
|
6292
6292
|
const customGateways = Object.values(this.#gateways || {});
|
|
6293
6293
|
registry.registerCustomGateways(customGateways);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_execution_fence = require("./execution-fence-
|
|
2
|
-
const require_background_tasks = require("./background-tasks-
|
|
1
|
+
const require_execution_fence = require("./execution-fence-CHI1L6Gw.cjs");
|
|
2
|
+
const require_background_tasks = require("./background-tasks-DbPzYpIZ.cjs");
|
|
3
3
|
const require_inmemory = require("./inmemory-Dc86VWGB.cjs");
|
|
4
|
-
const require_manager = require("./manager-
|
|
4
|
+
const require_manager = require("./manager-Do9PPiEw.cjs");
|
|
5
5
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
6
6
|
const require_output_helpers = require("./output-helpers-D4O_oFne.cjs");
|
|
7
7
|
const require_hooks = require("./hooks-D7VDBETj.cjs");
|
|
8
8
|
const require_license_index = require("./license/index.cjs");
|
|
9
|
-
const require_netlify = require("./netlify-
|
|
10
|
-
const require_llm = require("./llm-
|
|
9
|
+
const require_netlify = require("./netlify-1Nz6N3ej.cjs");
|
|
10
|
+
const require_llm = require("./llm-DqcaZBHM.cjs");
|
|
11
11
|
const require_logger = require("./logger-CvzZYuJd.cjs");
|
|
12
12
|
const require_logger_index = require("./logger/index.cjs");
|
|
13
13
|
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
@@ -17,14 +17,14 @@ const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
|
17
17
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
18
18
|
const require_source = require("./source-C_nWbqI0.cjs");
|
|
19
19
|
const require_feature_telemetry = require("./feature-telemetry-Cw0L1tHo.cjs");
|
|
20
|
-
const require_tool_loop_agent = require("./tool-loop-agent-
|
|
20
|
+
const require_tool_loop_agent = require("./tool-loop-agent-CLyS2mqD.cjs");
|
|
21
21
|
const require_payload_transform = require("./payload-transform-CWgnsO9w.cjs");
|
|
22
|
-
const require_utils$1 = require("./utils-
|
|
23
|
-
const require_worker = require("./worker-
|
|
24
|
-
const require_builder = require("./builder-
|
|
25
|
-
const require_validate = require("./validate-
|
|
26
|
-
const require_rehydrate = require("./rehydrate-
|
|
27
|
-
const require_stream = require("./stream-
|
|
22
|
+
const require_utils$1 = require("./utils-CYmtHkJO.cjs");
|
|
23
|
+
const require_worker = require("./worker-DkqCjpGQ.cjs");
|
|
24
|
+
const require_builder = require("./builder-961mB1xC.cjs");
|
|
25
|
+
const require_validate = require("./validate-CPda0kNf.cjs");
|
|
26
|
+
const require_rehydrate = require("./rehydrate-BOhDMI4r.cjs");
|
|
27
|
+
const require_stream = require("./stream-HM3ei83E.cjs");
|
|
28
28
|
let _isaacs_ttlcache = require("@isaacs/ttlcache");
|
|
29
29
|
let zod_v4 = require("zod/v4");
|
|
30
30
|
// src/notifications/workflow.ts
|
|
@@ -2883,7 +2883,7 @@ var Mastra = class Mastra {
|
|
|
2883
2883
|
*/
|
|
2884
2884
|
async __ensureExperimentWorkflow() {
|
|
2885
2885
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2886
|
-
const { buildExperimentWorkflow } = await Promise.resolve().then(() => require("./manager-
|
|
2886
|
+
const { buildExperimentWorkflow } = await Promise.resolve().then(() => require("./manager-Do9PPiEw.cjs")).then((n) => n.workflow_exports);
|
|
2887
2887
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2888
2888
|
this.__registerInternalWorkflow(buildExperimentWorkflow(), void 0, { distributed: true });
|
|
2889
2889
|
}
|
|
@@ -5084,7 +5084,7 @@ var Mastra = class Mastra {
|
|
|
5084
5084
|
if (!this.#workerFilter || this.#workerFilter.has("agent-schedule")) {
|
|
5085
5085
|
let agentScheduleWorker = this.#findAgentScheduleWorker();
|
|
5086
5086
|
if (!agentScheduleWorker) {
|
|
5087
|
-
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-
|
|
5087
|
+
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-BTLxhv5x.cjs"));
|
|
5088
5088
|
agentScheduleWorker = new AgentScheduleWorker();
|
|
5089
5089
|
agentScheduleWorker.__registerMastra(this);
|
|
5090
5090
|
this.#workers.push(agentScheduleWorker);
|
|
@@ -5814,7 +5814,7 @@ var Mastra = class Mastra {
|
|
|
5814
5814
|
this.#workers.push(sw);
|
|
5815
5815
|
}
|
|
5816
5816
|
if (!this.#findAgentScheduleWorker()) {
|
|
5817
|
-
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-
|
|
5817
|
+
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-BTLxhv5x.cjs"));
|
|
5818
5818
|
const asw = new AgentScheduleWorker();
|
|
5819
5819
|
asw.__registerMastra(this);
|
|
5820
5820
|
this.#workers.push(asw);
|
|
@@ -6287,7 +6287,7 @@ var Mastra = class Mastra {
|
|
|
6287
6287
|
#syncGatewayRegistry() {
|
|
6288
6288
|
try {
|
|
6289
6289
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") return;
|
|
6290
|
-
Promise.resolve().then(() => require("./provider-registry-
|
|
6290
|
+
Promise.resolve().then(() => require("./provider-registry-D_cE6sCW.cjs")).then((n) => n.provider_registry_exports).then(async ({ GatewayRegistry }) => {
|
|
6291
6291
|
const registry = GatewayRegistry.getInstance();
|
|
6292
6292
|
const customGateways = Object.values(this.#gateways || {});
|
|
6293
6293
|
registry.registerCustomGateways(customGateways);
|
package/dist/memory/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_stream = require("../stream-
|
|
3
|
-
const require_execution_fence = require("../execution-fence-
|
|
2
|
+
const require_stream = require("../stream-HM3ei83E.cjs");
|
|
3
|
+
const require_execution_fence = require("../execution-fence-CHI1L6Gw.cjs");
|
|
4
4
|
const require_message_list = require("../message-list-C0F2sDNC.cjs");
|
|
5
5
|
exports.AUTHORED_USER_TURN = require_message_list.AUTHORED_USER_TURN;
|
|
6
6
|
exports.DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS = require_execution_fence.DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS;
|
package/dist/memory/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jt as getThreadOMMetadata, Qt as setThreadOMMetadata, Xt as isThreadTitlePinned, Yt as isObservationalMemoryEnabled, Zt as parseMemoryRequestContext, qt as TITLE_PINNED_THREAD_METADATA_KEY } from "../stream-
|
|
2
|
-
import { Ao as
|
|
1
|
+
import { Jt as getThreadOMMetadata, Qt as setThreadOMMetadata, Xt as isThreadTitlePinned, Yt as isObservationalMemoryEnabled, Zt as parseMemoryRequestContext, qt as TITLE_PINNED_THREAD_METADATA_KEY } from "../stream-DlzW_BXE.js";
|
|
2
|
+
import { Ao as upsertMessageVectors, Co as DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS, Do as extractMessageEmbeddingText, Eo as chunkMessageText, Fo as isSystemReminderMessage, Jn as MemoryRunState, Mo as MemoryProcessor, No as memoryDefaultOptions, Oo as messageVectorId, Po as filterSystemReminderMessages, To as buildMessageEmbeddingRows, Xn as MockMemory, Yn as getMemoryRunState, as as getMemoryTokenBoundary, is as advanceMemoryTokenBoundary, jo as MastraMemory, ko as resolveMaxChunkChars, ns as groupLinkedToolMessages, os as isAfterMemoryTokenBoundary, rs as loadMessageHistory, ss as normalizeMessageHistoryConfig, wo as MESSAGE_EMBEDDING_CHARS_PER_TOKEN } from "../execution-fence-P1uj8uB8.js";
|
|
3
3
|
import { $ as AUTHORED_USER_TURN, C as extractWorkingMemoryTags, D as removeWorkingMemoryToolInvocationParts, E as removeWorkingMemoryTags, O as removeWorkingMemoryToolInvocations, S as extractWorkingMemoryContent, T as removeSystemReminderTags, _ as SYSTEM_REMINDER_START_TAG, at as stripClientAuthoredTurnMarks, b as WORKING_MEMORY_START_TAG, et as asUserTurn, g as SYSTEM_REMINDER_END_TAG, h as SET_WORKING_MEMORY_TOOL_NAME, it as sealUserTurnMessage, nt as messageDeclaresAuthoredTurn, rt as sealTurnMarkup, tt as escapeTurnMarkup, v as UPDATE_WORKING_MEMORY_TOOL_NAME, w as isWorkingMemoryToolName, x as WORKING_MEMORY_TOOL_NAMES, y as WORKING_MEMORY_END_TAG } from "../message-list-RgFlLrxG.js";
|
|
4
4
|
export { AUTHORED_USER_TURN, DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS, MESSAGE_EMBEDDING_CHARS_PER_TOKEN, MastraMemory, MemoryProcessor, MemoryRunState, MockMemory, SET_WORKING_MEMORY_TOOL_NAME, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, TITLE_PINNED_THREAD_METADATA_KEY, UPDATE_WORKING_MEMORY_TOOL_NAME, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, WORKING_MEMORY_TOOL_NAMES, advanceMemoryTokenBoundary, asUserTurn, buildMessageEmbeddingRows, chunkMessageText, escapeTurnMarkup, extractMessageEmbeddingText, extractWorkingMemoryContent, extractWorkingMemoryTags, filterSystemReminderMessages, getMemoryRunState, getMemoryTokenBoundary, getThreadOMMetadata, groupLinkedToolMessages, isAfterMemoryTokenBoundary, isObservationalMemoryEnabled, isSystemReminderMessage, isThreadTitlePinned, isWorkingMemoryToolName, loadMessageHistory, memoryDefaultOptions, messageDeclaresAuthoredTurn, messageVectorId, normalizeMessageHistoryConfig, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, removeWorkingMemoryToolInvocationParts, removeWorkingMemoryToolInvocations, resolveMaxChunkChars, sealTurnMarkup, sealUserTurnMessage, setThreadOMMetadata, stripClientAuthoredTurnMarks, upsertMessageVectors };
|
|
@@ -3,7 +3,7 @@ const require_base = require("./base-BIzR1D3_.cjs");
|
|
|
3
3
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
4
4
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
5
5
|
const require_observability = require("./observability-VaoaeadK.cjs");
|
|
6
|
-
const require_utils$1 = require("./utils-
|
|
6
|
+
const require_utils$1 = require("./utils-CYmtHkJO.cjs");
|
|
7
7
|
const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
|
|
8
8
|
let _mastra_schema_compat = require("@mastra/schema-compat");
|
|
9
9
|
let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
|
|
@@ -4,7 +4,7 @@ import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "./error-
|
|
|
4
4
|
import { n as executeWithContextSync, t as executeWithContext } from "./utils-DU_pU5SK.js";
|
|
5
5
|
import { _ as resolveObservabilityContext } from "./observability-DPDWibyH.js";
|
|
6
6
|
import { isStandardSchemaWithJSON, standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
7
|
-
import { i as delay, u as isZodType$1 } from "./utils-
|
|
7
|
+
import { i as delay, u as isZodType$1 } from "./utils-DlBS4OO7.js";
|
|
8
8
|
import { i as isZodArray, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
|
|
9
9
|
import { AnthropicSchemaCompatLayer, DeepSeekSchemaCompatLayer, GoogleSchemaCompatLayer, MetaSchemaCompatLayer, OpenAIReasoningSchemaCompatLayer, OpenAISchemaCompatLayer, applyCompatLayer, jsonSchema } from "@mastra/schema-compat";
|
|
10
10
|
// src/stream/aisdk/v4/usage.ts
|
|
@@ -29127,7 +29127,7 @@ function createOpenRouter(options = {}) {
|
|
|
29127
29127
|
}
|
|
29128
29128
|
createOpenRouter({ compatibility: "strict" });
|
|
29129
29129
|
// src/llm/model/gateways/constants.ts
|
|
29130
|
-
const MASTRA_USER_AGENT = `mastra/1.88.0-alpha.
|
|
29130
|
+
const MASTRA_USER_AGENT = `mastra/1.88.0-alpha.2`;
|
|
29131
29131
|
const PROVIDERS_WITH_INSTALLED_PACKAGES = [
|
|
29132
29132
|
"anthropic",
|
|
29133
29133
|
"cerebras",
|
|
@@ -53905,11 +53905,11 @@ function applyOpencodeCallTimeSessionHeader(providerId, modelHeaders, callHeader
|
|
|
53905
53905
|
};
|
|
53906
53906
|
}
|
|
53907
53907
|
// src/llm/model/gateways/url-template.ts
|
|
53908
|
-
function interpolateUrlTemplate(url, envVars) {
|
|
53908
|
+
function interpolateUrlTemplate(url, envVars, { rejectBlank = false } = {}) {
|
|
53909
53909
|
return url.replace(/\$\{([^}]+)\}/g, (_match, envVarName) => {
|
|
53910
53910
|
const key = envVarName.trim();
|
|
53911
53911
|
const value = envVars?.[key] ?? process.env[key];
|
|
53912
|
-
if (value
|
|
53912
|
+
if (value == null || rejectBlank && value.trim() === "") throw new Error(`Missing environment variable ${envVarName} required to build provider URL`);
|
|
53913
53913
|
return value;
|
|
53914
53914
|
});
|
|
53915
53915
|
}
|
|
@@ -53969,6 +53969,18 @@ function resolveApiKeyFromEnv(apiKeyEnvVar) {
|
|
|
53969
53969
|
}
|
|
53970
53970
|
}
|
|
53971
53971
|
const PROVIDER_OVERRIDES = {
|
|
53972
|
+
"cloudflare-ai-gateway": {
|
|
53973
|
+
url: "https://gateway.ai.cloudflare.com/v1/${CLOUDFLARE_ACCOUNT_ID}/${CLOUDFLARE_GATEWAY_ID}/compat",
|
|
53974
|
+
apiKeyEnvVar: "CLOUDFLARE_API_TOKEN",
|
|
53975
|
+
npm: "@ai-sdk/openai-compatible",
|
|
53976
|
+
modelOverrides: {}
|
|
53977
|
+
},
|
|
53978
|
+
cohere: {
|
|
53979
|
+
url: "https://api.cohere.ai/compatibility/v1",
|
|
53980
|
+
apiKeyEnvVar: "COHERE_API_KEY",
|
|
53981
|
+
npm: "@ai-sdk/openai-compatible",
|
|
53982
|
+
modelOverrides: {}
|
|
53983
|
+
},
|
|
53972
53984
|
google: { apiKeyEnvVar: ["GOOGLE_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY"] },
|
|
53973
53985
|
mistral: { url: "https://api.mistral.ai/v1" },
|
|
53974
53986
|
groq: { url: "https://api.groq.com/openai/v1" },
|
|
@@ -54022,10 +54034,10 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54022
54034
|
const reasoningOptions = parseReasoningOptions(modelInfo?.reasoning_options);
|
|
54023
54035
|
if (reasoningOptions.length > 0) reasoningByModel[modelId] = reasoningOptions;
|
|
54024
54036
|
}
|
|
54025
|
-
const
|
|
54037
|
+
const catalogModelOverrides = {};
|
|
54026
54038
|
for (const [modelId, modelInfo] of allModels) {
|
|
54027
54039
|
const ov = modelInfo?.provider;
|
|
54028
|
-
if (ov && (ov.api || ov.shape || ov.npm))
|
|
54040
|
+
if (ov && (ov.api || ov.shape || ov.npm)) catalogModelOverrides[modelId] = {
|
|
54029
54041
|
api: ov.api,
|
|
54030
54042
|
shape: ov.shape,
|
|
54031
54043
|
npm: ov.npm
|
|
@@ -54033,19 +54045,23 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54033
54045
|
}
|
|
54034
54046
|
const url = PROVIDER_OVERRIDES[normalizedId]?.url || providerInfo.api;
|
|
54035
54047
|
if (!hasInstalledPackage && !url) continue;
|
|
54048
|
+
const apiKeyEnvVar = PROVIDER_OVERRIDES[normalizedId]?.apiKeyEnvVar || selectApiKeyEnvVar({
|
|
54049
|
+
envVars: providerInfo.env,
|
|
54050
|
+
providerId: normalizedId
|
|
54051
|
+
});
|
|
54052
|
+
const apiKeyHeader = !hasInstalledPackage ? PROVIDER_OVERRIDES[normalizedId]?.apiKeyHeader || "Authorization" : void 0;
|
|
54053
|
+
const npm = PROVIDER_OVERRIDES[normalizedId]?.npm ?? providerInfo.npm;
|
|
54054
|
+
const modelOverrides = PROVIDER_OVERRIDES[normalizedId]?.modelOverrides ?? catalogModelOverrides;
|
|
54036
54055
|
providerConfigs[normalizedId] = {
|
|
54037
54056
|
url,
|
|
54038
|
-
apiKeyEnvVar
|
|
54039
|
-
|
|
54040
|
-
providerId: normalizedId
|
|
54041
|
-
}),
|
|
54042
|
-
apiKeyHeader: !hasInstalledPackage ? PROVIDER_OVERRIDES[normalizedId]?.apiKeyHeader || "Authorization" : void 0,
|
|
54057
|
+
apiKeyEnvVar,
|
|
54058
|
+
apiKeyHeader,
|
|
54043
54059
|
name: providerInfo.name || providerId.charAt(0).toUpperCase() + providerId.slice(1),
|
|
54044
54060
|
models: modelIds,
|
|
54045
54061
|
...Object.keys(modelReleaseDates).length > 0 ? { modelReleaseDates } : {},
|
|
54046
54062
|
docUrl: providerInfo.doc,
|
|
54047
54063
|
gateway: `models.dev`,
|
|
54048
|
-
npm:
|
|
54064
|
+
npm: npm !== "@ai-sdk/openai-compatible" && npm !== "@ai-sdk/gateway" ? npm : void 0,
|
|
54049
54065
|
modelOverrides: Object.keys(modelOverrides).length > 0 ? modelOverrides : void 0,
|
|
54050
54066
|
deprecatedModels: deprecatedModelIds.length > 0 ? deprecatedModelIds : void 0
|
|
54051
54067
|
};
|
|
@@ -54082,7 +54098,7 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54082
54098
|
const customBaseUrl = envVars?.[baseUrlEnvVar] || process.env[baseUrlEnvVar];
|
|
54083
54099
|
if (customBaseUrl) return customBaseUrl;
|
|
54084
54100
|
if (!template) return;
|
|
54085
|
-
return interpolateUrlTemplate(template, envVars);
|
|
54101
|
+
return interpolateUrlTemplate(template, envVars, { rejectBlank: providerId === "cloudflare-ai-gateway" });
|
|
54086
54102
|
}
|
|
54087
54103
|
getApiKey(modelId) {
|
|
54088
54104
|
const [provider, model] = modelId.split("/");
|
|
@@ -54090,7 +54106,7 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54090
54106
|
const config = this.providerConfigs[provider];
|
|
54091
54107
|
if (!config) throw new Error(`Could not find config for provider ${provider} with model id ${modelId}`);
|
|
54092
54108
|
const apiKey = resolveApiKeyFromEnv(config.apiKeyEnvVar);
|
|
54093
|
-
if (!apiKey) {
|
|
54109
|
+
if (!apiKey || (provider === "cloudflare-ai-gateway" || provider === "cohere") && apiKey.trim() === "") {
|
|
54094
54110
|
const envVarDisplay = Array.isArray(config.apiKeyEnvVar) ? config.apiKeyEnvVar.join(" or ") : config.apiKeyEnvVar;
|
|
54095
54111
|
throw new Error(`Could not find API key process.env.${envVarDisplay} for model id ${modelId}`);
|
|
54096
54112
|
}
|