@mastra/core 1.88.0-alpha.1 → 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/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-C-WK9bMA.cjs → agent-controller-Bt7DwpZy.cjs} +6 -6
- package/dist/{agent-controller-Wxbc6702.js → agent-controller-CFNkjF3l.js} +6 -6
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-DSMkHpbu.js → background-tasks-DJHuKMQC.js} +1 -1
- package/dist/{background-tasks-DcKNctMR.cjs → background-tasks-DbPzYpIZ.cjs} +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-CybmqbZt.cjs → builder-961mB1xC.cjs} +2 -2
- package/dist/{builder-PXwZnGYe.js → builder-BD6HtwKv.js} +2 -2
- package/dist/capabilities/302ai.json +189 -189
- package/dist/capabilities/abliteratedllm.json +31 -31
- package/dist/capabilities/abliteration-ai.json +10 -10
- package/dist/capabilities/above.json +24 -24
- package/dist/capabilities/adaption.json +15 -15
- 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 +2 -2
- package/dist/capabilities/aiand.json +22 -22
- package/dist/capabilities/aigrow.json +9 -9
- package/dist/capabilities/aimlapi.json +144 -153
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +18 -18
- package/dist/capabilities/aki-io.json +16 -16
- package/dist/capabilities/alibaba-cn.json +105 -105
- package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
- package/dist/capabilities/alibaba-coding-plan.json +5 -5
- package/dist/capabilities/alibaba-token-plan-cn.json +45 -45
- package/dist/capabilities/alibaba-token-plan.json +46 -46
- package/dist/capabilities/alibaba.json +80 -80
- package/dist/capabilities/ambient.json +6 -6
- package/dist/capabilities/amd-tokenlab.json +4 -4
- package/dist/capabilities/amd.json +11 -11
- package/dist/capabilities/anthropic.json +39 -39
- package/dist/capabilities/anyapi.json +13 -13
- package/dist/capabilities/apiko.json +4 -4
- package/dist/capabilities/arcee.json +5 -5
- package/dist/capabilities/augure.json +5 -5
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +34 -34
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/bothub.json +15 -15
- package/dist/capabilities/boundless.json +35 -35
- package/dist/capabilities/bumo.json +43 -43
- package/dist/capabilities/byteplus.json +31 -31
- package/dist/capabilities/cheapaimodel.json +5 -5
- package/dist/capabilities/cheapest-token.json +28 -28
- package/dist/capabilities/chutes.json +34 -34
- package/dist/capabilities/cline-pass.json +34 -34
- package/dist/capabilities/cloudcode.json +9 -9
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-ai-gateway.json +716 -0
- package/dist/capabilities/cloudflare-workers-ai.json +10 -10
- package/dist/capabilities/cohere.json +67 -0
- package/dist/capabilities/commandcode.json +124 -124
- package/dist/capabilities/concentrate.json +282 -282
- package/dist/capabilities/cortecs.json +105 -105
- package/dist/capabilities/crossmodel.json +159 -159
- package/dist/capabilities/crusoe.json +18 -18
- package/dist/capabilities/daoxe.json +8 -8
- package/dist/capabilities/databricks.json +126 -126
- package/dist/capabilities/deepinfra.json +99 -99
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +113 -113
- package/dist/capabilities/dothoosh.json +32 -32
- package/dist/capabilities/doubleword.json +30 -30
- package/dist/capabilities/edenai.json +292 -292
- package/dist/capabilities/empiriolabs.json +178 -169
- package/dist/capabilities/engy.json +24 -24
- package/dist/capabilities/entrim.json +6 -6
- package/dist/capabilities/evroc.json +14 -14
- package/dist/capabilities/ezkielyna.json +8 -8
- package/dist/capabilities/fastrouter.json +64 -64
- package/dist/capabilities/fireworks-ai.json +97 -97
- package/dist/capabilities/freemodel.json +10 -10
- package/dist/capabilities/friendli.json +7 -7
- package/dist/capabilities/frogbot.json +94 -94
- package/dist/capabilities/gisoo.json +20 -20
- package/dist/capabilities/gmicloud.json +13 -13
- package/dist/capabilities/google.json +57 -57
- package/dist/capabilities/graphn.json +14 -14
- package/dist/capabilities/greenpt.json +36 -36
- package/dist/capabilities/groq.json +2 -2
- package/dist/capabilities/helicone.json +76 -76
- package/dist/capabilities/hetzner.json +2 -2
- package/dist/capabilities/hostinger-router.json +9 -9
- package/dist/capabilities/hpc-ai.json +6 -6
- package/dist/capabilities/huawei-maas.json +13 -13
- package/dist/capabilities/hubris.json +34 -34
- package/dist/capabilities/huggingface.json +85 -85
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +23 -23
- package/dist/capabilities/impossibl.json +141 -141
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +2 -2
- package/dist/capabilities/infer.json +15 -15
- package/dist/capabilities/inferall.json +4 -4
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +17 -17
- package/dist/capabilities/infersia.json +10 -10
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/io-net.json +4 -4
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +33 -33
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +24 -24
- package/dist/capabilities/jzstoken.json +51 -51
- package/dist/capabilities/keln.json +15 -15
- package/dist/capabilities/kenari.json +125 -125
- package/dist/capabilities/kilo.json +622 -621
- package/dist/capabilities/kimchi.json +19 -19
- package/dist/capabilities/kimi-code-plan-cn.json +5 -5
- package/dist/capabilities/kimi-code-plan-global.json +5 -5
- package/dist/capabilities/klavo.json +13 -13
- package/dist/capabilities/korouter.json +31 -31
- package/dist/capabilities/kunavo.json +10 -10
- package/dist/capabilities/liquid.json +8 -8
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +915 -915
- package/dist/capabilities/llmgateway.json +345 -345
- package/dist/capabilities/llmtr.json +16 -16
- package/dist/capabilities/longcat.json +2 -2
- package/dist/capabilities/lowrouter.json +49 -49
- package/dist/capabilities/lyceum.json +8 -8
- package/dist/capabilities/melious.json +11 -11
- package/dist/capabilities/merge-gateway.json +271 -271
- package/dist/capabilities/meta.json +8 -8
- 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 +14 -14
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/modal.json +10 -10
- package/dist/capabilities/model-oracle-ai.json +23 -23
- package/dist/capabilities/modelis.json +15 -15
- package/dist/capabilities/modular.json +11 -11
- package/dist/capabilities/moneo.json +8 -8
- package/dist/capabilities/moonshotai-cn.json +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +14 -14
- package/dist/capabilities/munito-eu.json +6 -6
- package/dist/capabilities/munito.json +6 -6
- package/dist/capabilities/nan.json +29 -29
- package/dist/capabilities/nano-gpt.json +566 -558
- package/dist/capabilities/nearai.json +82 -82
- package/dist/capabilities/nebius.json +33 -33
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +42 -42
- package/dist/capabilities/novita-ai.json +110 -110
- package/dist/capabilities/nvidia.json +27 -27
- package/dist/capabilities/oathbreaker.json +3 -3
- package/dist/capabilities/obscurify.json +16 -16
- package/dist/capabilities/oci.json +2 -2
- package/dist/capabilities/ofox.json +212 -212
- package/dist/capabilities/ollama-cloud.json +65 -65
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +89 -82
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +538 -538
- package/dist/capabilities/opper.json +28 -28
- package/dist/capabilities/orcarouter.json +236 -236
- package/dist/capabilities/outerlabs.json +31 -31
- package/dist/capabilities/ovhcloud.json +20 -20
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +66 -66
- package/dist/capabilities/phala.json +20 -20
- package/dist/capabilities/pioneer.json +2 -2
- package/dist/capabilities/poe.json +124 -124
- package/dist/capabilities/poolside.json +3 -3
- package/dist/capabilities/powerspring.json +10 -10
- package/dist/capabilities/primalabs.json +12 -12
- package/dist/capabilities/prime.json +105 -105
- package/dist/capabilities/privatemode-ai.json +6 -6
- package/dist/capabilities/qiniu-ai.json +11 -11
- package/dist/capabilities/refuseless.json +6 -6
- package/dist/capabilities/regolo-ai.json +7 -7
- package/dist/capabilities/requesty.json +200 -200
- package/dist/capabilities/ruapi.json +22 -22
- package/dist/capabilities/runcrate.json +12 -12
- package/dist/capabilities/runinfra.json +17 -17
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +13 -13
- package/dist/capabilities/sarvam.json +12 -12
- package/dist/capabilities/scaleway.json +15 -15
- package/dist/capabilities/scnet-token-plan.json +14 -14
- package/dist/capabilities/scx-ai.json +23 -23
- package/dist/capabilities/sensenova.json +14 -14
- package/dist/capabilities/siliconflow-cn.json +54 -54
- package/dist/capabilities/siliconflow.json +56 -56
- package/dist/capabilities/snowflake-cortex.json +23 -23
- package/dist/capabilities/sokkan.json +5 -5
- package/dist/capabilities/sparrowcodes.json +19 -19
- package/dist/capabilities/standardcompute.json +56 -56
- package/dist/capabilities/steadyrouter.json +40 -40
- 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 +17 -17
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/synthetic.json +11 -11
- package/dist/capabilities/synthorai.json +27 -27
- package/dist/capabilities/teamorouter.json +24 -24
- package/dist/capabilities/teapot-router.json +13 -13
- package/dist/capabilities/tencent-token-plan-intl.json +26 -26
- package/dist/capabilities/tencent-token-plan.json +42 -42
- package/dist/capabilities/tencent-tokenhub.json +50 -50
- package/dist/capabilities/tensorx.json +37 -37
- package/dist/capabilities/tenstorrent.json +2 -2
- package/dist/capabilities/the-grid-ai.json +32 -32
- package/dist/capabilities/thinkingmachines.json +67 -67
- package/dist/capabilities/tinfoil.json +6 -6
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +52 -52
- package/dist/capabilities/tokengo.json +19 -19
- package/dist/capabilities/tokenharbor.json +221 -221
- package/dist/capabilities/tokenify.json +8 -8
- package/dist/capabilities/trustedrouter.json +6 -6
- package/dist/capabilities/trustedtokens.json +20 -20
- package/dist/capabilities/umans-ai-coding-plan.json +17 -17
- package/dist/capabilities/umans-ai.json +15 -15
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +23 -23
- package/dist/capabilities/vancine.json +25 -25
- package/dist/capabilities/vercel.json +570 -570
- package/dist/capabilities/vivgrid.json +65 -65
- package/dist/capabilities/volcengine-coding-plan.json +31 -31
- package/dist/capabilities/volcengine.json +26 -26
- package/dist/capabilities/vultr.json +18 -18
- package/dist/capabilities/wafer.ai.json +16 -16
- 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 +26 -26
- package/dist/capabilities/xai.json +4 -4
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +11 -11
- package/dist/capabilities/xxapi.json +27 -27
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +30 -30
- package/dist/capabilities/zenifra.json +23 -23
- package/dist/capabilities/zenmux.json +191 -191
- package/dist/capabilities/zerogpu.json +11 -11
- package/dist/capabilities/zhipuai-coding-plan.json +3 -3
- package/dist/capabilities/zhipuai.json +29 -29
- package/dist/capabilities/zro.json +4 -4
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-Cxy4jW11.js → channels-Dn6LqqK1.js} +1 -1
- package/dist/{channels-DNOI029U.cjs → channels-dYHpz7m2.cjs} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- 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 +474 -474
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +60 -0
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/{execution-fence-C1nozqra.cjs → execution-fence-CHI1L6Gw.cjs} +7 -7
- package/dist/{execution-fence-pJB0qqFJ.js → execution-fence-P1uj8uB8.js} +7 -7
- 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/index.cjs +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/url-template.d.ts +3 -1
- package/dist/llm/model/provider-types.generated.d.ts +7885 -7776
- package/dist/{llm-_z1lIfCN.js → llm-D4BaXbwZ.js} +4 -3
- package/dist/{llm-VhPqyULU.cjs → llm-DqcaZBHM.cjs} +4 -3
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-C3Kx39p_.js → manager-BAs1D8t9.js} +2 -2
- package/dist/{manager-BT70SgFz.cjs → manager-Do9PPiEw.cjs} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-fJ0iKYGP.js → mastra-CaLISVUE.js} +16 -16
- package/dist/{mastra-CQGD2RoN.cjs → mastra-DWCqC_6c.cjs} +16 -16
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-D9NDbf-e.cjs → model-DAcaPIyq.cjs} +1 -1
- package/dist/{model-DmBDBf-q.js → model-DafU-uar.js} +1 -1
- package/dist/{netlify-DNaNhels.cjs → netlify-1Nz6N3ej.cjs} +29 -13
- package/dist/{netlify-_yV5Nwud.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-C4tv__fr.js → provider-registry-BjBiRMhs.js} +21541 -21305
- package/dist/{provider-registry-_BUQuSKb.cjs → provider-registry-D_cE6sCW.cjs} +21541 -21305
- package/dist/provider-registry.json +21464 -21226
- package/dist/{registry-generator-CenhQnEi.js → registry-generator-VDBSUg0k.js} +1 -1
- package/dist/{registry-generator-D7lsLJC-.cjs → registry-generator-ji57sjZC.cjs} +1 -1
- package/dist/{rehydrate-SpC_gJCY.cjs → rehydrate-BOhDMI4r.cjs} +2 -2
- package/dist/{rehydrate-CuWN_5No.js → rehydrate-Do67YKWz.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-BfSwqzPi.js → stream-DlzW_BXE.js} +1 -1
- package/dist/{stream-CW3d1Xg6.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-B4_o4-Me.js → tool-loop-agent-BBlEpcl4.js} +3 -3
- package/dist/{tool-loop-agent-JN_oKyfY.cjs → tool-loop-agent-CLyS2mqD.cjs} +3 -3
- package/dist/{utils-Bq606mC8.cjs → utils-CYmtHkJO.cjs} +1 -1
- package/dist/{utils-CnpMuTyD.js → utils-DlBS4OO7.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-Db2C7Sj_.js → validate-C7Ltq3EW.js} +1 -1
- package/dist/{validate-CFv6HWXx.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-IZeSOZjg.cjs → worker-BTLxhv5x.cjs} +2 -2
- package/dist/{worker-UXFAgWOK.js → worker-C75s75rt.js} +2 -2
- package/dist/{worker-X0fAJfcx.js → worker-CcLWNaev.js} +2 -2
- package/dist/{worker-CNIBQPQy.cjs → worker-DkqCjpGQ.cjs} +2 -2
- package/dist/{workflow-CMLLlVDc.cjs → workflow-BFlBk2d6.cjs} +3 -3
- package/dist/{workflow-DfXq2p2f.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/package.json +5 -5
- package/src/llm/model/provider-types.generated.d.ts +7885 -7776
|
@@ -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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { Fs as createStep, Is as createWorkflow, Ji as assertSupportedPatterns, d as validateAndSaveScore, l as flushBeforeTraceRead, m as ScorerRunError } from "./execution-fence-
|
|
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";
|
|
@@ -1,7 +1,7 @@
|
|
|
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");
|
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 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-
|
|
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 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-
|
|
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
|
}
|
|
@@ -29126,7 +29126,7 @@ function createOpenRouter(options = {}) {
|
|
|
29126
29126
|
}
|
|
29127
29127
|
createOpenRouter({ compatibility: "strict" });
|
|
29128
29128
|
// src/llm/model/gateways/constants.ts
|
|
29129
|
-
const MASTRA_USER_AGENT = `mastra/1.88.0-alpha.
|
|
29129
|
+
const MASTRA_USER_AGENT = `mastra/1.88.0-alpha.2`;
|
|
29130
29130
|
const PROVIDERS_WITH_INSTALLED_PACKAGES = [
|
|
29131
29131
|
"anthropic",
|
|
29132
29132
|
"cerebras",
|
|
@@ -53904,11 +53904,11 @@ function applyOpencodeCallTimeSessionHeader(providerId, modelHeaders, callHeader
|
|
|
53904
53904
|
};
|
|
53905
53905
|
}
|
|
53906
53906
|
// src/llm/model/gateways/url-template.ts
|
|
53907
|
-
function interpolateUrlTemplate(url, envVars) {
|
|
53907
|
+
function interpolateUrlTemplate(url, envVars, { rejectBlank = false } = {}) {
|
|
53908
53908
|
return url.replace(/\$\{([^}]+)\}/g, (_match, envVarName) => {
|
|
53909
53909
|
const key = envVarName.trim();
|
|
53910
53910
|
const value = envVars?.[key] ?? process.env[key];
|
|
53911
|
-
if (value
|
|
53911
|
+
if (value == null || rejectBlank && value.trim() === "") throw new Error(`Missing environment variable ${envVarName} required to build provider URL`);
|
|
53912
53912
|
return value;
|
|
53913
53913
|
});
|
|
53914
53914
|
}
|
|
@@ -53968,6 +53968,18 @@ function resolveApiKeyFromEnv(apiKeyEnvVar) {
|
|
|
53968
53968
|
}
|
|
53969
53969
|
}
|
|
53970
53970
|
const PROVIDER_OVERRIDES = {
|
|
53971
|
+
"cloudflare-ai-gateway": {
|
|
53972
|
+
url: "https://gateway.ai.cloudflare.com/v1/${CLOUDFLARE_ACCOUNT_ID}/${CLOUDFLARE_GATEWAY_ID}/compat",
|
|
53973
|
+
apiKeyEnvVar: "CLOUDFLARE_API_TOKEN",
|
|
53974
|
+
npm: "@ai-sdk/openai-compatible",
|
|
53975
|
+
modelOverrides: {}
|
|
53976
|
+
},
|
|
53977
|
+
cohere: {
|
|
53978
|
+
url: "https://api.cohere.ai/compatibility/v1",
|
|
53979
|
+
apiKeyEnvVar: "COHERE_API_KEY",
|
|
53980
|
+
npm: "@ai-sdk/openai-compatible",
|
|
53981
|
+
modelOverrides: {}
|
|
53982
|
+
},
|
|
53971
53983
|
google: { apiKeyEnvVar: ["GOOGLE_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY"] },
|
|
53972
53984
|
mistral: { url: "https://api.mistral.ai/v1" },
|
|
53973
53985
|
groq: { url: "https://api.groq.com/openai/v1" },
|
|
@@ -54021,10 +54033,10 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54021
54033
|
const reasoningOptions = parseReasoningOptions(modelInfo?.reasoning_options);
|
|
54022
54034
|
if (reasoningOptions.length > 0) reasoningByModel[modelId] = reasoningOptions;
|
|
54023
54035
|
}
|
|
54024
|
-
const
|
|
54036
|
+
const catalogModelOverrides = {};
|
|
54025
54037
|
for (const [modelId, modelInfo] of allModels) {
|
|
54026
54038
|
const ov = modelInfo?.provider;
|
|
54027
|
-
if (ov && (ov.api || ov.shape || ov.npm))
|
|
54039
|
+
if (ov && (ov.api || ov.shape || ov.npm)) catalogModelOverrides[modelId] = {
|
|
54028
54040
|
api: ov.api,
|
|
54029
54041
|
shape: ov.shape,
|
|
54030
54042
|
npm: ov.npm
|
|
@@ -54032,19 +54044,23 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54032
54044
|
}
|
|
54033
54045
|
const url = PROVIDER_OVERRIDES[normalizedId]?.url || providerInfo.api;
|
|
54034
54046
|
if (!hasInstalledPackage && !url) continue;
|
|
54047
|
+
const apiKeyEnvVar = PROVIDER_OVERRIDES[normalizedId]?.apiKeyEnvVar || selectApiKeyEnvVar({
|
|
54048
|
+
envVars: providerInfo.env,
|
|
54049
|
+
providerId: normalizedId
|
|
54050
|
+
});
|
|
54051
|
+
const apiKeyHeader = !hasInstalledPackage ? PROVIDER_OVERRIDES[normalizedId]?.apiKeyHeader || "Authorization" : void 0;
|
|
54052
|
+
const npm = PROVIDER_OVERRIDES[normalizedId]?.npm ?? providerInfo.npm;
|
|
54053
|
+
const modelOverrides = PROVIDER_OVERRIDES[normalizedId]?.modelOverrides ?? catalogModelOverrides;
|
|
54035
54054
|
providerConfigs[normalizedId] = {
|
|
54036
54055
|
url,
|
|
54037
|
-
apiKeyEnvVar
|
|
54038
|
-
|
|
54039
|
-
providerId: normalizedId
|
|
54040
|
-
}),
|
|
54041
|
-
apiKeyHeader: !hasInstalledPackage ? PROVIDER_OVERRIDES[normalizedId]?.apiKeyHeader || "Authorization" : void 0,
|
|
54056
|
+
apiKeyEnvVar,
|
|
54057
|
+
apiKeyHeader,
|
|
54042
54058
|
name: providerInfo.name || providerId.charAt(0).toUpperCase() + providerId.slice(1),
|
|
54043
54059
|
models: modelIds,
|
|
54044
54060
|
...Object.keys(modelReleaseDates).length > 0 ? { modelReleaseDates } : {},
|
|
54045
54061
|
docUrl: providerInfo.doc,
|
|
54046
54062
|
gateway: `models.dev`,
|
|
54047
|
-
npm:
|
|
54063
|
+
npm: npm !== "@ai-sdk/openai-compatible" && npm !== "@ai-sdk/gateway" ? npm : void 0,
|
|
54048
54064
|
modelOverrides: Object.keys(modelOverrides).length > 0 ? modelOverrides : void 0,
|
|
54049
54065
|
deprecatedModels: deprecatedModelIds.length > 0 ? deprecatedModelIds : void 0
|
|
54050
54066
|
};
|
|
@@ -54081,7 +54097,7 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54081
54097
|
const customBaseUrl = envVars?.[baseUrlEnvVar] || process.env[baseUrlEnvVar];
|
|
54082
54098
|
if (customBaseUrl) return customBaseUrl;
|
|
54083
54099
|
if (!template) return;
|
|
54084
|
-
return interpolateUrlTemplate(template, envVars);
|
|
54100
|
+
return interpolateUrlTemplate(template, envVars, { rejectBlank: providerId === "cloudflare-ai-gateway" });
|
|
54085
54101
|
}
|
|
54086
54102
|
getApiKey(modelId) {
|
|
54087
54103
|
const [provider, model] = modelId.split("/");
|
|
@@ -54089,7 +54105,7 @@ var ModelsDevGateway = class extends MastraModelGateway {
|
|
|
54089
54105
|
const config = this.providerConfigs[provider];
|
|
54090
54106
|
if (!config) throw new Error(`Could not find config for provider ${provider} with model id ${modelId}`);
|
|
54091
54107
|
const apiKey = resolveApiKeyFromEnv(config.apiKeyEnvVar);
|
|
54092
|
-
if (!apiKey) {
|
|
54108
|
+
if (!apiKey || (provider === "cloudflare-ai-gateway" || provider === "cohere") && apiKey.trim() === "") {
|
|
54093
54109
|
const envVarDisplay = Array.isArray(config.apiKeyEnvVar) ? config.apiKeyEnvVar.join(" or ") : config.apiKeyEnvVar;
|
|
54094
54110
|
throw new Error(`Could not find API key process.env.${envVarDisplay} for model id ${modelId}`);
|
|
54095
54111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_execution_fence = require("../execution-fence-
|
|
2
|
+
const require_execution_fence = require("../execution-fence-CHI1L6Gw.cjs");
|
|
3
3
|
const require_tool = require("../tool-Dn9WSDVn.cjs");
|
|
4
4
|
let zod_v4 = require("zod/v4");
|
|
5
5
|
// src/notifications/tool.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Br as createNotificationSummarySignal, Gr as summarizeNotifications, Hr as notificationSignalMetadata, Ir as InMemoryNotificationsStorage, Jr as defaultNotificationDeliveryDecision, Kr as readNotificationRoutingRequirement, Lr as NotificationsStorage, Rr as dispatchDueNotifications, Ur as notificationSummaryContents, Vr as notificationSignalAttributes, Wr as notificationSummarySignalMetadata, Xr as resolveNotificationDeliveryDecision, Yr as resolveDeliveryFailureUpdate, qr as MAX_NOTIFICATION_DELIVERY_ATTEMPTS, zr as createNotificationSignal } from "../execution-fence-
|
|
1
|
+
import { Br as createNotificationSummarySignal, Gr as summarizeNotifications, Hr as notificationSignalMetadata, Ir as InMemoryNotificationsStorage, Jr as defaultNotificationDeliveryDecision, Kr as readNotificationRoutingRequirement, Lr as NotificationsStorage, Rr as dispatchDueNotifications, Ur as notificationSummaryContents, Vr as notificationSignalAttributes, Wr as notificationSummarySignalMetadata, Xr as resolveNotificationDeliveryDecision, Yr as resolveDeliveryFailureUpdate, qr as MAX_NOTIFICATION_DELIVERY_ATTEMPTS, zr as createNotificationSignal } from "../execution-fence-P1uj8uB8.js";
|
|
2
2
|
import { r as createTool } from "../tool-DIFduuTw.js";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
4
|
// src/notifications/tool.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_execution_fence = require("../execution-fence-
|
|
2
|
+
const require_execution_fence = require("../execution-fence-CHI1L6Gw.cjs");
|
|
3
3
|
let zod_v4 = require("zod/v4");
|
|
4
4
|
// src/processor-provider/types.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Xo as ToolCallFilter, cs as BatchPartsProcessor, es as SystemPromptScrubber, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, ms as PromptInjectionDetector, ps as PIIDetector, ts as TokenLimiterProcessor } from "../execution-fence-
|
|
1
|
+
import { Xo as ToolCallFilter, cs as BatchPartsProcessor, es as SystemPromptScrubber, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, ms as PromptInjectionDetector, ps as PIIDetector, ts as TokenLimiterProcessor } from "../execution-fence-P1uj8uB8.js";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
// src/processor-provider/types.ts
|
|
4
4
|
/**
|
|
@@ -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.AgentsMDInjector = require_execution_fence.AgentsMDInjector;
|
|
5
5
|
exports.BaseProcessor = require_execution_fence.BaseProcessor;
|
|
6
6
|
exports.BatchPartsProcessor = require_execution_fence.BatchPartsProcessor;
|
package/dist/processors/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { H as anthropicToolIdFormat, K as REPROCESS_PART_KEY, M as ProcessorRunner, N as ProcessorState, U as cerebrasStripReasoningContent, V as ProviderHistoryCompat, W as openaiOrphanItemId, it as createProcessorSendSignal, ln as isProcessorWorkflow } from "../stream-
|
|
2
|
-
import { $l as ProcessorOutputResultPhaseSchema, $o as TokenCostControl, Bo as DEFAULT_RESPONSE_CACHE_TTL_SECONDS, Cs as StreamErrorRetryProcessor, Es as PrefillErrorHandler, Gl as FilePartSchema, Gn as globalEmbeddingCache, Go as SkillSearchProcessor, Hn as BaseProcessor, Ho as ResponseCache, Jl as MessagePartSchema, Jo as ToolSearchProcessor, Kl as ImagePartSchema, Kn as WorkingMemory, Ko as SkillsProcessor, Ql as ProcessorMessageSchema, Qo as CostGuardProcessor, Ro as createBackgroundWorkSignalProcessor, Ss as FILE_UPLOAD_ERROR_CODES, Ts as isRetryableOpenAIResponsesStreamError, Un as MemoryInputFilter, Uo as buildResponseCacheKey, Vo as RESPONSE_CACHE_CONTEXT_KEY, Wn as SemanticRecall, Wo as WorkspaceInstructionsProcessor, Xl as ProcessorInputStepPhaseSchema, Xo as ToolCallFilter, Yl as ProcessorInputPhaseSchema, Yo as AgentsMDInjector, Zl as ProcessorMessageContentSchema, Zo as RegexFilterProcessor, _s as STABILITY_ERROR_PROCESSOR_IDS, au as ReasoningPartSchema, bs as UnsupportedFileHandler, cs as BatchPartsProcessor, cu as TextPartSchema, ds as StructuredOutputProcessor, es as SystemPromptScrubber, eu as ProcessorOutputStepPhaseSchema, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, iu as ProcessorStepSchema, ls as ModelSelectionProcessor, lu as ToolInvocationPartSchema, ms as PromptInjectionDetector, nu as ProcessorStepInputSchema, ou as SourcePartSchema, ps as PIIDetector, ql as MessageContentSchema, qn as MessageHistory, qo as formatSkillsCatalog, ru as ProcessorStepOutputSchema, su as StepStartPartSchema, ts as TokenLimiterProcessor, tu as ProcessorOutputStreamPhaseSchema, us as ClassifierProcessor, vs as defaultStabilityErrorProcessors, ws as isBadRequestError, xs as FileUploadProcessor, ys as isMalformedFunctionCallError, zo as CyberRefusalHandler } from "../execution-fence-
|
|
1
|
+
import { H as anthropicToolIdFormat, K as REPROCESS_PART_KEY, M as ProcessorRunner, N as ProcessorState, U as cerebrasStripReasoningContent, V as ProviderHistoryCompat, W as openaiOrphanItemId, it as createProcessorSendSignal, ln as isProcessorWorkflow } from "../stream-DlzW_BXE.js";
|
|
2
|
+
import { $l as ProcessorOutputResultPhaseSchema, $o as TokenCostControl, Bo as DEFAULT_RESPONSE_CACHE_TTL_SECONDS, Cs as StreamErrorRetryProcessor, Es as PrefillErrorHandler, Gl as FilePartSchema, Gn as globalEmbeddingCache, Go as SkillSearchProcessor, Hn as BaseProcessor, Ho as ResponseCache, Jl as MessagePartSchema, Jo as ToolSearchProcessor, Kl as ImagePartSchema, Kn as WorkingMemory, Ko as SkillsProcessor, Ql as ProcessorMessageSchema, Qo as CostGuardProcessor, Ro as createBackgroundWorkSignalProcessor, Ss as FILE_UPLOAD_ERROR_CODES, Ts as isRetryableOpenAIResponsesStreamError, Un as MemoryInputFilter, Uo as buildResponseCacheKey, Vo as RESPONSE_CACHE_CONTEXT_KEY, Wn as SemanticRecall, Wo as WorkspaceInstructionsProcessor, Xl as ProcessorInputStepPhaseSchema, Xo as ToolCallFilter, Yl as ProcessorInputPhaseSchema, Yo as AgentsMDInjector, Zl as ProcessorMessageContentSchema, Zo as RegexFilterProcessor, _s as STABILITY_ERROR_PROCESSOR_IDS, au as ReasoningPartSchema, bs as UnsupportedFileHandler, cs as BatchPartsProcessor, cu as TextPartSchema, ds as StructuredOutputProcessor, es as SystemPromptScrubber, eu as ProcessorOutputStepPhaseSchema, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, iu as ProcessorStepSchema, ls as ModelSelectionProcessor, lu as ToolInvocationPartSchema, ms as PromptInjectionDetector, nu as ProcessorStepInputSchema, ou as SourcePartSchema, ps as PIIDetector, ql as MessageContentSchema, qn as MessageHistory, qo as formatSkillsCatalog, ru as ProcessorStepOutputSchema, su as StepStartPartSchema, ts as TokenLimiterProcessor, tu as ProcessorOutputStreamPhaseSchema, us as ClassifierProcessor, vs as defaultStabilityErrorProcessors, ws as isBadRequestError, xs as FileUploadProcessor, ys as isMalformedFunctionCallError, zo as CyberRefusalHandler } from "../execution-fence-P1uj8uB8.js";
|
|
3
3
|
export { AgentsMDInjector, BaseProcessor, BatchPartsProcessor, ClassifierProcessor, CostGuardProcessor, CyberRefusalHandler, DEFAULT_RESPONSE_CACHE_TTL_SECONDS, FILE_UPLOAD_ERROR_CODES, FilePartSchema, FileUploadProcessor, ImagePartSchema, LanguageDetector, MemoryInputFilter, MessageContentSchema, MessageHistory, MessagePartSchema, ModelSelectionProcessor, ModerationProcessor, PIIDetector, PrefillErrorHandler, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ProviderHistoryCompat, REPROCESS_PART_KEY, RESPONSE_CACHE_CONTEXT_KEY, ReasoningPartSchema, RegexFilterProcessor, ResponseCache, STABILITY_ERROR_PROCESSOR_IDS, SemanticRecall, SkillSearchProcessor, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StreamErrorRetryProcessor, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenCostControl, TokenLimiterProcessor as TokenLimiter, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, UnicodeNormalizer, UnsupportedFileHandler, WorkingMemory, WorkspaceInstructionsProcessor, anthropicToolIdFormat, buildResponseCacheKey, cerebrasStripReasoningContent, createBackgroundWorkSignalProcessor, createProcessorSendSignal, defaultStabilityErrorProcessors, formatSkillsCatalog, globalEmbeddingCache, isBadRequestError, isMalformedFunctionCallError, isProcessorWorkflow, isRetryableOpenAIResponsesStreamError, openaiOrphanItemId };
|