@mastra/core 1.0.0-beta.8 → 1.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/dist/agent/agent.d.ts +1 -1
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +3 -3
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/{chunk-Y7YCQDML.cjs → chunk-3DRGAKUH.cjs} +382 -13
- package/dist/chunk-3DRGAKUH.cjs.map +1 -0
- package/dist/{chunk-RWT3XPKO.js → chunk-4GLDYGNN.js} +3 -3
- package/dist/{chunk-RWT3XPKO.js.map → chunk-4GLDYGNN.js.map} +1 -1
- package/dist/{chunk-4GTU7MB2.js → chunk-7IMDJAYQ.js} +5 -5
- package/dist/{chunk-4GTU7MB2.js.map → chunk-7IMDJAYQ.js.map} +1 -1
- package/dist/{chunk-KBXFAF37.cjs → chunk-7S7TLMTS.cjs} +287 -10
- package/dist/chunk-7S7TLMTS.cjs.map +1 -0
- package/dist/{chunk-QHJ7YVNX.js → chunk-A4C3AGVS.js} +5 -5
- package/dist/{chunk-QHJ7YVNX.js.map → chunk-A4C3AGVS.js.map} +1 -1
- package/dist/{chunk-DMPHPHMU.js → chunk-APMPOYPI.js} +3 -3
- package/dist/{chunk-DMPHPHMU.js.map → chunk-APMPOYPI.js.map} +1 -1
- package/dist/{chunk-EDNHZZUP.js → chunk-ARSSSQQP.js} +69 -11
- package/dist/chunk-ARSSSQQP.js.map +1 -0
- package/dist/{chunk-6BYHQ52F.cjs → chunk-CKRWR5DS.cjs} +15 -15
- package/dist/{chunk-6BYHQ52F.cjs.map → chunk-CKRWR5DS.cjs.map} +1 -1
- package/dist/{chunk-SD2BDUJ6.cjs → chunk-DWB7SBVC.cjs} +23 -23
- package/dist/{chunk-SD2BDUJ6.cjs.map → chunk-DWB7SBVC.cjs.map} +1 -1
- package/dist/{chunk-VWC5AUOQ.cjs → chunk-EGXQVF75.cjs} +372 -6
- package/dist/chunk-EGXQVF75.cjs.map +1 -0
- package/dist/{chunk-QYNZAPFE.cjs → chunk-F77YTHXI.cjs} +4 -4
- package/dist/{chunk-QYNZAPFE.cjs.map → chunk-F77YTHXI.cjs.map} +1 -1
- package/dist/{chunk-6C2PU6J4.cjs → chunk-HSRQXO6F.cjs} +6 -6
- package/dist/{chunk-6C2PU6J4.cjs.map → chunk-HSRQXO6F.cjs.map} +1 -1
- package/dist/{chunk-YUXTDKYN.cjs → chunk-IISGCZJ4.cjs} +15 -15
- package/dist/{chunk-YUXTDKYN.cjs.map → chunk-IISGCZJ4.cjs.map} +1 -1
- package/dist/{chunk-SPIUKQDK.js → chunk-LB7UOP2X.js} +376 -7
- package/dist/chunk-LB7UOP2X.js.map +1 -0
- package/dist/{chunk-URBPEE67.js → chunk-MCRIVYUB.js} +3 -3
- package/dist/{chunk-URBPEE67.js.map → chunk-MCRIVYUB.js.map} +1 -1
- package/dist/{chunk-AZQMPE7G.cjs → chunk-MRFUISXC.cjs} +3 -3
- package/dist/{chunk-AZQMPE7G.cjs.map → chunk-MRFUISXC.cjs.map} +1 -1
- package/dist/{chunk-TLLXRG2Z.js → chunk-OEIVMCWX.js} +3 -3
- package/dist/{chunk-TLLXRG2Z.js.map → chunk-OEIVMCWX.js.map} +1 -1
- package/dist/{chunk-FNSFXWDN.js → chunk-PIHOAJTA.js} +2 -2
- package/dist/chunk-PIHOAJTA.js.map +1 -0
- package/dist/{chunk-ZUWJCGLM.js → chunk-QM5SRDJX.js} +4 -5
- package/dist/chunk-QM5SRDJX.js.map +1 -0
- package/dist/{chunk-7PXCGGMO.js → chunk-QTEIZ2XG.js} +3 -3
- package/dist/{chunk-7PXCGGMO.js.map → chunk-QTEIZ2XG.js.map} +1 -1
- package/dist/{chunk-Y5SFNZUK.cjs → chunk-RIG4JP3V.cjs} +11 -11
- package/dist/{chunk-Y5SFNZUK.cjs.map → chunk-RIG4JP3V.cjs.map} +1 -1
- package/dist/{chunk-GW7BNMGA.js → chunk-SLX3NVAC.js} +4 -4
- package/dist/{chunk-GW7BNMGA.js.map → chunk-SLX3NVAC.js.map} +1 -1
- package/dist/{chunk-TQB2HMEC.cjs → chunk-SVLMF4UZ.cjs} +44 -45
- package/dist/chunk-SVLMF4UZ.cjs.map +1 -0
- package/dist/{chunk-3EYBRHB2.cjs → chunk-UVM27J4A.cjs} +2 -2
- package/dist/chunk-UVM27J4A.cjs.map +1 -0
- package/dist/{chunk-QDIYYAA4.js → chunk-VQ3FTSRC.js} +371 -5
- package/dist/chunk-VQ3FTSRC.js.map +1 -0
- package/dist/{chunk-YBEW5YWC.cjs → chunk-VRFSEZBA.cjs} +6 -6
- package/dist/{chunk-YBEW5YWC.cjs.map → chunk-VRFSEZBA.cjs.map} +1 -1
- package/dist/{chunk-HP6TRJ2Q.cjs → chunk-XMT5T4F2.cjs} +111 -52
- package/dist/chunk-XMT5T4F2.cjs.map +1 -0
- package/dist/{chunk-HDMH5IDV.js → chunk-ZINZHEXZ.js} +282 -9
- package/dist/chunk-ZINZHEXZ.js.map +1 -0
- package/dist/evals/index.cjs +9 -9
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/evals/types.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +11 -11
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +176 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +2 -2
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/types.d.ts +1 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +191 -5
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +6 -6
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +6 -0
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/models-dev-23RN2WHG.js +3 -0
- package/dist/{models-dev-6GD3644V.js.map → models-dev-23RN2WHG.js.map} +1 -1
- package/dist/models-dev-EO3SUIY2.cjs +12 -0
- package/dist/{models-dev-IUQBXJSS.cjs.map → models-dev-EO3SUIY2.cjs.map} +1 -1
- package/dist/observability/index.cjs +10 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +4 -0
- package/dist/observability/types/tracing.d.ts.map +1 -1
- package/dist/processors/index.cjs +17 -17
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-FM3IVY6C.js +3 -0
- package/dist/{provider-registry-A5QZFI2X.js.map → provider-registry-FM3IVY6C.js.map} +1 -1
- package/dist/provider-registry-Q6T32VC5.cjs +40 -0
- package/dist/{provider-registry-V32PGH6F.cjs.map → provider-registry-Q6T32VC5.cjs.map} +1 -1
- package/dist/provider-registry.json +368 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +50 -2
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.d.ts +3 -1
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/domains/agents/base.d.ts +49 -0
- package/dist/storage/domains/agents/base.d.ts.map +1 -0
- package/dist/storage/domains/agents/index.d.ts +3 -0
- package/dist/storage/domains/agents/index.d.ts.map +1 -0
- package/dist/storage/domains/agents/inmemory.d.ts +22 -0
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/index.d.ts +1 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +50 -34
- package/dist/storage/index.js +1 -1
- package/dist/storage/mock.d.ts +1 -0
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +82 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/base/output-format-handlers.d.ts +13 -0
- package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
- package/dist/stream/index.cjs +15 -11
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +10 -10
- package/dist/test-utils/llm-mock.js +3 -3
- package/dist/utils.cjs +22 -22
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +21 -21
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/workflow.d.ts +2 -2
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/llm/model/provider-types.generated.d.ts +176 -1
- package/dist/chunk-3EYBRHB2.cjs.map +0 -1
- package/dist/chunk-EDNHZZUP.js.map +0 -1
- package/dist/chunk-FNSFXWDN.js.map +0 -1
- package/dist/chunk-HDMH5IDV.js.map +0 -1
- package/dist/chunk-HP6TRJ2Q.cjs.map +0 -1
- package/dist/chunk-KBXFAF37.cjs.map +0 -1
- package/dist/chunk-QDIYYAA4.js.map +0 -1
- package/dist/chunk-SPIUKQDK.js.map +0 -1
- package/dist/chunk-TQB2HMEC.cjs.map +0 -1
- package/dist/chunk-VWC5AUOQ.cjs.map +0 -1
- package/dist/chunk-Y7YCQDML.cjs.map +0 -1
- package/dist/chunk-ZUWJCGLM.js.map +0 -1
- package/dist/models-dev-6GD3644V.js +0 -3
- package/dist/models-dev-IUQBXJSS.cjs +0 -12
- package/dist/provider-registry-A5QZFI2X.js +0 -3
- package/dist/provider-registry-V32PGH6F.cjs +0 -40
|
@@ -285,5 +285,5 @@ exports.executeWithContext = executeWithContext;
|
|
|
285
285
|
exports.executeWithContextSync = executeWithContextSync;
|
|
286
286
|
exports.getOrCreateSpan = getOrCreateSpan;
|
|
287
287
|
exports.wrapMastra = wrapMastra;
|
|
288
|
-
//# sourceMappingURL=chunk-
|
|
289
|
-
//# sourceMappingURL=chunk-
|
|
288
|
+
//# sourceMappingURL=chunk-UVM27J4A.cjs.map
|
|
289
|
+
//# sourceMappingURL=chunk-UVM27J4A.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/observability/types/tracing.ts","../src/observability/no-op.ts","../src/observability/utils.ts","../src/observability/context.ts"],"names":["SpanType","InternalSpans","SamplingStrategyType","TracingEventType"],"mappings":";;;AAgBO,IAAK,QAAA,qBAAAA,SAAAA,KAAL;AAEL,EAAAA,UAAA,WAAA,CAAA,GAAY,WAAA;AAEZ,EAAAA,UAAA,SAAA,CAAA,GAAU,SAAA;AAEV,EAAAA,UAAA,kBAAA,CAAA,GAAmB,kBAAA;AAEnB,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AAEb,EAAAA,UAAA,aAAA,CAAA,GAAc,aAAA;AAEd,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,WAAA,CAAA,GAAY,WAAA;AAEZ,EAAAA,UAAA,cAAA,CAAA,GAAe,cAAA;AAEf,EAAAA,UAAA,eAAA,CAAA,GAAgB,eAAA;AAEhB,EAAAA,UAAA,sBAAA,CAAA,GAAuB,sBAAA;AAEvB,EAAAA,UAAA,2BAAA,CAAA,GAA4B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C,UAAA,OAAO,OAAO,KAAA,KAAU,UAAA,GAAa,KAAA,CAAM,IAAA,CAAK,MAAM,CAAA,GAAI,KAAA;AAAA,QAC5D,SAAS,KAAA,EAAO;AACd,UAAA,OAAA,CAAQ,IAAA,CAAK,gEAAgE,KAAK,CAAA;AAClF,UAAA,MAAM,KAAA,GAAS,OAAe,IAAI,CAAA;AAClC,UAAA,OAAO,OAAO,KAAA,KAAU,UAAA,GAAa,KAAA,CAAM,IAAA,CAAK,MAAM,CAAA,GAAI,KAAA;AAAA,QAC5D;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH,SAAS,KAAA,EAAO;AACd,IAAA,OAAA,CAAQ,IAAA,CAAK,gEAAgE,KAAK,CAAA;AAClF,IAAA,OAAO,GAAA;AAAA,EACT;AACF","file":"chunk-UVM27J4A.cjs","sourcesContent":["/**\n * Tracing interfaces\n */\nimport type { MastraError } from '../../error';\nimport type { IMastraLogger } from '../../logger';\nimport type { Mastra } from '../../mastra';\nimport type { RequestContext } from '../../request-context';\nimport type { WorkflowRunStatus, WorkflowStepStatus } from '../../workflows';\n\n// ============================================================================\n// Span Types\n// ============================================================================\n\n/**\n * AI-specific span types with their associated metadata\n */\nexport enum SpanType {\n /** Agent run - root span for agent processes */\n AGENT_RUN = 'agent_run',\n /** Generic span for custom operations */\n GENERIC = 'generic',\n /** Model generation with model calls, token usage, prompts, completions */\n MODEL_GENERATION = 'model_generation',\n /** Single model execution step within a generation (one API call) */\n MODEL_STEP = 'model_step',\n /** Individual model streaming chunk/event */\n MODEL_CHUNK = 'model_chunk',\n /** MCP (Model Context Protocol) tool execution */\n MCP_TOOL_CALL = 'mcp_tool_call',\n /** Input or Output Processor execution */\n PROCESSOR_RUN = 'processor_run',\n /** Function/tool execution with inputs, outputs, errors */\n TOOL_CALL = 'tool_call',\n /** Workflow run - root span for workflow processes */\n WORKFLOW_RUN = 'workflow_run',\n /** Workflow step execution with step status, data flow */\n WORKFLOW_STEP = 'workflow_step',\n /** Workflow conditional execution with condition evaluation */\n WORKFLOW_CONDITIONAL = 'workflow_conditional',\n /** Individual condition evaluation within conditional */\n WORKFLOW_CONDITIONAL_EVAL = 'workflow_conditional_eval',\n /** Workflow parallel execution */\n WORKFLOW_PARALLEL = 'workflow_parallel',\n /** Workflow loop execution */\n WORKFLOW_LOOP = 'workflow_loop',\n /** Workflow sleep operation */\n WORKFLOW_SLEEP = 'workflow_sleep',\n /** Workflow wait for event operation */\n WORKFLOW_WAIT_EVENT = 'workflow_wait_event',\n}\n\n// ============================================================================\n// Type-Specific Attributes Interfaces\n// ============================================================================\n\n/**\n * Base attributes that all spans can have\n */\nexport interface AIBaseAttributes {}\n\n/**\n * Agent Run attributes\n */\nexport interface AgentRunAttributes extends AIBaseAttributes {\n /** Agent identifier */\n agentId: string;\n /** Human-readable agent name */\n agentName?: string;\n /** Conversation/thread/session identifier for multi-turn interactions */\n conversationId?: string;\n /** Agent Instructions **/\n instructions?: string;\n /** Agent Prompt **/\n prompt?: string;\n /** Available tools for this execution */\n availableTools?: string[];\n /** Maximum steps allowed */\n maxSteps?: number;\n}\n\n/** Token usage statistics - supports both v5 and legacy formats */\nexport interface UsageStats {\n // VNext paths\n inputTokens?: number;\n outputTokens?: number;\n // Legacy format (for backward compatibility)\n promptTokens?: number;\n completionTokens?: number;\n // Common fields\n totalTokens?: number;\n reasoningTokens?: number;\n cachedInputTokens?: number;\n promptCacheHitTokens?: number;\n promptCacheMissTokens?: number;\n}\n\n/**\n * Model Generation attributes\n */\nexport interface ModelGenerationAttributes extends AIBaseAttributes {\n /** Agent identifier (when generation is part of an agent run) */\n agentId?: string;\n /** Human-readable agent name (when generation is part of an agent run) */\n agentName?: string;\n /** Model name (e.g., 'gpt-4', 'claude-3') */\n model?: string;\n /** Model provider (e.g., 'openai', 'anthropic') */\n provider?: string;\n /** Type of result/output this LLM call produced */\n resultType?: 'tool_selection' | 'response_generation' | 'reasoning' | 'planning';\n /** Token usage statistics - supports both v5 and legacy formats */\n usage?: UsageStats;\n /** Model parameters */\n parameters?: {\n maxOutputTokens?: number;\n temperature?: number;\n topP?: number;\n topK?: number;\n presencePenalty?: number;\n frequencyPenalty?: number;\n stopSequences?: string[];\n seed?: number;\n maxRetries?: number;\n abortSignal?: any;\n headers?: Record<string, string | undefined>;\n };\n /** Whether this was a streaming response */\n streaming?: boolean;\n /** Reason the generation finished */\n finishReason?: string;\n /**\n * When the first token/chunk of the completion was received.\n * Used to calculate time-to-first-token (TTFT) metrics.\n * Only applicable for streaming responses.\n */\n completionStartTime?: Date;\n /** Actual model used in the response (may differ from request model) */\n responseModel?: string;\n /** Unique identifier for the response */\n responseId?: string;\n /** Server address for the model endpoint */\n serverAddress?: string;\n /** Server port for the model endpoint */\n serverPort?: number;\n}\n\n/**\n * Model Step attributes - for a single model execution within a generation\n */\nexport interface ModelStepAttributes extends AIBaseAttributes {\n /** Index of this step in the generation (0, 1, 2, ...) */\n stepIndex?: number;\n /** Token usage statistics */\n usage?: UsageStats;\n /** Reason this step finished (stop, tool-calls, length, etc.) */\n finishReason?: string;\n /** Should execution continue */\n isContinued?: boolean;\n /** Result warnings */\n warnings?: Record<string, any>;\n}\n\n/**\n * Model Chunk attributes - for individual streaming chunks/events\n */\nexport interface ModelChunkAttributes extends AIBaseAttributes {\n /** Type of chunk (text-delta, reasoning-delta, tool-call, etc.) */\n chunkType?: string;\n /** Sequence number of this chunk in the stream */\n sequenceNumber?: number;\n}\n\n/**\n * Tool Call attributes\n */\nexport interface ToolCallAttributes extends AIBaseAttributes {\n toolId?: string;\n toolType?: string;\n toolDescription?: string;\n success?: boolean;\n}\n\n/**\n * MCP Tool Call attributes\n */\nexport interface MCPToolCallAttributes extends AIBaseAttributes {\n /** Id of the MCP tool/function */\n toolId: string;\n /** MCP server identifier */\n mcpServer: string;\n /** MCP server version */\n serverVersion?: string;\n /** Whether tool execution was successful */\n success?: boolean;\n}\n\n/**\n * Processor attributes\n */\nexport interface ProcessorRunAttributes extends AIBaseAttributes {\n /** Name of the Processor */\n processorName: string;\n /** Processor type (input or output) */\n processorType: 'input' | 'output';\n /** Processor index in the agent */\n processorIndex?: number;\n /** MessageList mutations performed by this processor */\n messageListMutations?: Array<{\n type: 'add' | 'addSystem' | 'removeByIds' | 'clear';\n source?: string;\n count?: number;\n ids?: string[];\n text?: string;\n tag?: string;\n message?: any;\n }>;\n}\n\n/**\n * Workflow Run attributes\n */\nexport interface WorkflowRunAttributes extends AIBaseAttributes {\n /** Workflow identifier */\n workflowId: string;\n /** Workflow status */\n status?: WorkflowRunStatus;\n}\n\n/**\n * Workflow Step attributes\n */\nexport interface WorkflowStepAttributes extends AIBaseAttributes {\n /** Step identifier */\n stepId: string;\n /** Step status */\n status?: WorkflowStepStatus;\n}\n\n/**\n * Workflow Conditional attributes\n */\nexport interface WorkflowConditionalAttributes extends AIBaseAttributes {\n /** Number of conditions evaluated */\n conditionCount: number;\n /** Which condition indexes evaluated to true */\n truthyIndexes?: number[];\n /** Which steps will be executed */\n selectedSteps?: string[];\n}\n\n/**\n * Workflow Conditional Evaluation attributes\n */\nexport interface WorkflowConditionalEvalAttributes extends AIBaseAttributes {\n /** Index of this condition in the conditional */\n conditionIndex: number;\n /** Result of condition evaluation */\n result?: boolean;\n}\n\n/**\n * Workflow Parallel attributes\n */\nexport interface WorkflowParallelAttributes extends AIBaseAttributes {\n /** Number of parallel branches */\n branchCount: number;\n /** Step IDs being executed in parallel */\n parallelSteps?: string[];\n}\n\n/**\n * Workflow Loop attributes\n */\nexport interface WorkflowLoopAttributes extends AIBaseAttributes {\n /** Type of loop (foreach, dowhile, dountil) */\n loopType?: 'foreach' | 'dowhile' | 'dountil';\n /** Current iteration number (for individual iterations) */\n iteration?: number;\n /** Total iterations (if known) */\n totalIterations?: number;\n /** Number of steps to run concurrently in foreach loop */\n concurrency?: number;\n}\n\n/**\n * Workflow Sleep attributes\n */\nexport interface WorkflowSleepAttributes extends AIBaseAttributes {\n /** Sleep duration in milliseconds */\n durationMs?: number;\n /** Sleep until date */\n untilDate?: Date;\n /** Sleep type */\n sleepType?: 'fixed' | 'dynamic';\n}\n\n/**\n * Workflow Wait Event attributes\n */\nexport interface WorkflowWaitEventAttributes extends AIBaseAttributes {\n /** Event name being waited for */\n eventName?: string;\n /** Timeout in milliseconds */\n timeoutMs?: number;\n /** Whether event was received or timed out */\n eventReceived?: boolean;\n /** Wait duration in milliseconds */\n waitDurationMs?: number;\n}\n\n/**\n * AI-specific span types mapped to their attributes\n */\nexport interface SpanTypeMap {\n [SpanType.AGENT_RUN]: AgentRunAttributes;\n [SpanType.WORKFLOW_RUN]: WorkflowRunAttributes;\n [SpanType.MODEL_GENERATION]: ModelGenerationAttributes;\n [SpanType.MODEL_STEP]: ModelStepAttributes;\n [SpanType.MODEL_CHUNK]: ModelChunkAttributes;\n [SpanType.TOOL_CALL]: ToolCallAttributes;\n [SpanType.MCP_TOOL_CALL]: MCPToolCallAttributes;\n [SpanType.PROCESSOR_RUN]: ProcessorRunAttributes;\n [SpanType.WORKFLOW_STEP]: WorkflowStepAttributes;\n [SpanType.WORKFLOW_CONDITIONAL]: WorkflowConditionalAttributes;\n [SpanType.WORKFLOW_CONDITIONAL_EVAL]: WorkflowConditionalEvalAttributes;\n [SpanType.WORKFLOW_PARALLEL]: WorkflowParallelAttributes;\n [SpanType.WORKFLOW_LOOP]: WorkflowLoopAttributes;\n [SpanType.WORKFLOW_SLEEP]: WorkflowSleepAttributes;\n [SpanType.WORKFLOW_WAIT_EVENT]: WorkflowWaitEventAttributes;\n [SpanType.GENERIC]: AIBaseAttributes;\n}\n\n/**\n * Union type for cases that need to handle any span type\n */\nexport type AnySpanAttributes = SpanTypeMap[keyof SpanTypeMap];\n\n// ============================================================================\n// Span Interfaces\n// ============================================================================\n\n/**\n * Base Span interface\n */\ninterface BaseSpan<TType extends SpanType> {\n /** Unique span identifier */\n id: string;\n /** OpenTelemetry-compatible trace ID (32 hex chars) - present on all spans */\n traceId: string;\n /** Name of the span */\n name: string;\n /** Type of the span */\n type: TType;\n /** When span started */\n startTime: Date;\n /** When span ended */\n endTime?: Date;\n /** Span-type specific attributes */\n attributes?: SpanTypeMap[TType];\n /** User-defined metadata */\n metadata?: Record<string, any>;\n /** Labels used to categorize and filter traces. Only valid on root spans. */\n tags?: string[];\n /** Input passed at the start of the span */\n input?: any;\n /** Output generated at the end of the span */\n output?: any;\n /** Error information if span failed */\n errorInfo?: {\n message: string;\n id?: string;\n domain?: string;\n category?: string;\n details?: Record<string, any>;\n };\n /** Is an event span? (event occurs at startTime, has no endTime) */\n isEvent: boolean;\n}\n\n/**\n * Span interface, used internally for tracing\n */\nexport interface Span<TType extends SpanType> extends BaseSpan<TType> {\n /** Is an internal span? (spans internal to the operation of mastra) */\n isInternal: boolean;\n /** Parent span reference (undefined for root spans) */\n parent?: AnySpan;\n /** Pointer to the ObservabilityInstance instance */\n observabilityInstance: ObservabilityInstance;\n /** Trace-level state shared across all spans in this trace */\n traceState?: TraceState;\n\n // Methods for span lifecycle\n /** End the span */\n end(options?: EndSpanOptions<TType>): void;\n\n /** Record an error for the span, optionally end the span as well */\n error(options: ErrorSpanOptions<TType>): void;\n\n /** Update span attributes */\n update(options: UpdateSpanOptions<TType>): void;\n\n /** Create child span - can be any span type independent of parent */\n createChildSpan(options: ChildSpanOptions<SpanType.MODEL_GENERATION>): AIModelGenerationSpan;\n createChildSpan<TChildType extends SpanType>(options: ChildSpanOptions<TChildType>): Span<TChildType>;\n\n /** Create event span - can be any span type independent of parent */\n createEventSpan<TChildType extends SpanType>(options: ChildEventOptions<TChildType>): Span<TChildType>;\n\n /** Returns `TRUE` if the span is the root span of a trace */\n get isRootSpan(): boolean;\n\n /** Returns `TRUE` if the span is a valid span (not a NO-OP Span) */\n get isValid(): boolean;\n\n /** Get the closest parent spanId that isn't an internal span */\n getParentSpanId(includeInternalSpans?: boolean): string | undefined;\n\n /** Find the closest parent span of a specific type by walking up the parent chain */\n findParent<T extends SpanType>(spanType: T): Span<T> | undefined;\n\n /** Returns a lightweight span ready for export */\n exportSpan(includeInternalSpans?: boolean): ExportedSpan<TType> | undefined;\n\n /** Returns the traceId on span, unless NoOpSpan, then undefined */\n get externalTraceId(): string | undefined;\n\n /**\n * Execute an async function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await modelSpan.executeInContext(async () => {\n * return model.generateText(...);\n * });\n * ```\n */\n executeInContext<T>(fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = modelSpan.executeInContextSync(() => {\n * return model.streamText(...);\n * });\n * ```\n */\n executeInContextSync<T>(fn: () => T): T;\n}\n\nexport interface BridgeSpanContext {\n /**\n * Execute an async function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await modelSpan.executeInContext(async () => {\n * return model.generateText(...);\n * });\n * ```\n */\n executeInContext<T>(fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within this span's tracing context.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under this\n * span in the external tracing system.\n *\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = modelSpan.executeInContextSync(() => {\n * return model.streamText(...);\n * });\n * ```\n */\n executeInContextSync<T>(fn: () => T): T;\n}\n\n/**\n * Specialized span interface for MODEL_GENERATION spans\n * Provides access to creating a ModelSpanTracker for tracking MODEL_STEP and MODEL_CHUNK spans\n */\nexport interface AIModelGenerationSpan extends Span<SpanType.MODEL_GENERATION> {\n /** Create a ModelSpanTracker for tracking model execution steps and chunks */\n createTracker(): IModelSpanTracker | undefined;\n}\n\n/**\n * Exported Span interface, used for tracing exporters\n */\nexport interface ExportedSpan<TType extends SpanType> extends BaseSpan<TType> {\n /** Parent span id reference (undefined for root spans) */\n parentSpanId?: string;\n /** `TRUE` if the span is the root span of a trace */\n isRootSpan: boolean;\n /**\n * Tags for this trace (only present on root spans).\n * Tags are string labels used to categorize and filter traces.\n */\n tags?: string[];\n}\n\nexport interface IModelSpanTracker {\n getTracingContext(): TracingContext;\n reportGenerationError(options: ErrorSpanOptions<SpanType.MODEL_GENERATION>): void;\n endGeneration(options?: EndSpanOptions<SpanType.MODEL_GENERATION>): void;\n wrapStream<T extends { pipeThrough: Function }>(stream: T): T;\n}\n\n/**\n * Union type for cases that need to handle any span\n */\nexport type AnySpan = Span<keyof SpanTypeMap>;\n\n/**\n * Union type for cases that need to handle any exported span\n */\nexport type AnyExportedSpan = ExportedSpan<keyof SpanTypeMap>;\n\n// ============================================================================\n// Tracing Interfaces\n// ============================================================================\n\n/**\n * Primary interface for Observability\n */\nexport interface ObservabilityInstance {\n /**\n * Get current configuration\n */\n getConfig(): Readonly<ObservabilityInstanceConfig>;\n\n /**\n * Get all exporters\n */\n getExporters(): readonly ObservabilityExporter[];\n\n /**\n * Get all span output processors\n */\n getSpanOutputProcessors(): readonly SpanOutputProcessor[];\n\n /**\n * Get the logger instance (for exporters and other components)\n */\n getLogger(): IMastraLogger;\n\n /**\n * Get the bridge instance if configured\n */\n getBridge(): ObservabilityBridge | undefined;\n\n /**\n * Start a new span of a specific SpanType\n */\n startSpan<TType extends SpanType>(options: StartSpanOptions<TType>): Span<TType>;\n\n /**\n * Shutdown tracing and clean up resources\n */\n shutdown(): Promise<void>;\n\n /**\n * Override setLogger to add tracing specific initialization log\n */\n __setLogger(logger: IMastraLogger): void;\n}\n\n// ============================================================================\n// Span Create/Update/Error Option Types\n// ============================================================================\n\ninterface CreateBaseOptions<TType extends SpanType> {\n /** Span attributes */\n attributes?: SpanTypeMap[TType];\n /** Span metadata */\n metadata?: Record<string, any>;\n /** Span name */\n name: string;\n /** Span type */\n type: TType;\n /** Policy-level tracing configuration */\n tracingPolicy?: TracingPolicy;\n /** Request Context for metadata extraction */\n requestContext?: RequestContext;\n}\n\n/**\n * Options for creating new spans\n */\nexport interface CreateSpanOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Input data */\n input?: any;\n /** Output data (for event spans) */\n output?: any;\n /** Labels used to categorize and filter traces. Only valid on root spans. */\n tags?: string[];\n /** Parent span */\n parent?: AnySpan;\n /** Is an event span? */\n isEvent?: boolean;\n /**\n * Trace ID to use for this span (1-32 hexadecimal characters).\n * Only used for root spans without a parent.\n */\n traceId?: string;\n /**\n * Parent span ID to use for this span (1-16 hexadecimal characters).\n * Only used for root spans without a parent.\n */\n parentSpanId?: string;\n /** Trace-level state shared across all spans in this trace */\n traceState?: TraceState;\n}\n\n/**\n * Options for starting new spans\n */\nexport interface StartSpanOptions<TType extends SpanType> extends CreateSpanOptions<TType> {\n /**\n * Options passed when using a custom sampler strategy\n */\n customSamplerOptions?: CustomSamplerOptions;\n /** Tracing options for this execution */\n tracingOptions?: TracingOptions;\n}\n\n/**\n * Options for new child spans\n */\nexport interface ChildSpanOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Input data */\n input?: any;\n}\n\n/**\n * Options for new child events\n * Event spans have no input, and no endTime\n */\nexport interface ChildEventOptions<TType extends SpanType> extends CreateBaseOptions<TType> {\n /** Output data */\n output?: any;\n}\n\ninterface UpdateBaseOptions<TType extends SpanType> {\n /** Span attributes */\n attributes?: Partial<SpanTypeMap[TType]>;\n /** Span metadata */\n metadata?: Record<string, any>;\n}\n\nexport interface EndSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** Output data */\n output?: any;\n}\n\nexport interface UpdateSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** Input data */\n input?: any;\n /** Output data */\n output?: any;\n}\n\nexport interface ErrorSpanOptions<TType extends SpanType> extends UpdateBaseOptions<TType> {\n /** The error associated with the issue */\n error: MastraError | Error;\n /** End the span when true */\n endSpan?: boolean;\n}\n\nexport interface GetOrCreateSpanOptions<TType extends SpanType> {\n type: TType;\n name: string;\n input?: any;\n attributes?: SpanTypeMap[TType];\n metadata?: Record<string, any>;\n tracingPolicy?: TracingPolicy;\n tracingOptions?: TracingOptions;\n tracingContext?: TracingContext;\n requestContext?: RequestContext;\n mastra?: Mastra;\n}\n\n// ============================================================================\n// Lifecycle Types\n// ============================================================================\n\nexport interface ObservabilityEntrypoint {\n shutdown(): Promise<void>;\n\n setMastraContext(options: { mastra: Mastra }): void;\n\n setLogger(options: { logger: IMastraLogger }): void;\n\n getSelectedInstance(options: ConfigSelectorOptions): ObservabilityInstance | undefined;\n\n // Registry management methods\n registerInstance(name: string, instance: ObservabilityInstance, isDefault?: boolean): void;\n getInstance(name: string): ObservabilityInstance | undefined;\n getDefaultInstance(): ObservabilityInstance | undefined;\n listInstances(): ReadonlyMap<string, ObservabilityInstance>;\n unregisterInstance(name: string): boolean;\n hasInstance(name: string): boolean;\n setConfigSelector(selector: ConfigSelector): void;\n clear(): void;\n}\n\n/**\n * Bitwise options to set different types of spans as internal in\n * a workflow or agent execution.\n */\nexport enum InternalSpans {\n /** No spans are marked internal */\n NONE = 0,\n /** Workflow spans are marked internal */\n WORKFLOW = 1 << 0, // 0001\n /** Agent spans are marked internal */\n AGENT = 1 << 1, // 0010\n /** Tool spans are marked internal */\n TOOL = 1 << 2, // 0100\n /** Model spans are marked internal */\n MODEL = 1 << 3, // 1000\n\n /** All spans are marked internal */\n ALL = (1 << 4) - 1, // 1111 (all bits set up to 3)\n}\n\n/**\n * Policy-level tracing configuration applied when creating\n * a workflow or agent. Unlike TracingOptions, which are\n * provided at execution time, policies define persistent rules\n * for how spans are treated across all executions of the\n * workflow/agent.\n */\nexport interface TracingPolicy {\n /**\n * Bitwise options to set different types of spans as Internal in\n * a workflow or agent execution. Internal spans are hidden by\n * default in exported traces.\n */\n internal?: InternalSpans;\n}\n\n/**\n * Trace-level state computed once at the start of a trace\n * and shared by all spans within that trace.\n */\nexport interface TraceState {\n /**\n * RequestContext keys to extract as metadata for all spans in this trace.\n * Computed by merging the tracing config's requestContextKeys\n * with the per-request requestContextKeys.\n */\n requestContextKeys: string[];\n}\n\n/**\n * Options passed when starting a new agent or workflow execution\n */\nexport interface TracingOptions {\n /** Metadata to add to the root trace span */\n metadata?: Record<string, any>;\n /**\n * Additional RequestContext keys to extract as metadata for this trace.\n * These keys are added to the requestContextKeys config.\n * Supports dot notation for nested values (e.g., 'user.id', 'session.data.experimentId').\n */\n requestContextKeys?: string[];\n /**\n * Trace ID to use for this execution (1-32 hexadecimal characters).\n * If provided, this trace will be part of the specified trace rather than starting a new one.\n */\n traceId?: string;\n /**\n * Parent span ID to use for this execution (1-16 hexadecimal characters).\n * If provided, the root span will be created as a child of this span.\n */\n parentSpanId?: string;\n /**\n * Tags to apply to this trace.\n * Tags are string labels that can be used to categorize and filter traces\n * Note: Tags are only applied to the root span of a trace.\n */\n tags?: string[];\n}\n\nexport interface SpanIds {\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n}\n\n/**\n * Context for tracing that flows through workflow and agent execution\n */\nexport interface TracingContext {\n /** Current Span for creating child spans and adding metadata */\n currentSpan?: AnySpan;\n}\n\n/**\n * Properties returned to the user for working with traces externally.\n */\nexport type TracingProperties = {\n /** Trace ID used on the execution (if the execution was traced). */\n traceId?: string;\n};\n\n// ============================================================================\n// Registry Config Interfaces\n// ============================================================================\n\n/**\n * Configuration for a single observability instance\n */\nexport interface ObservabilityInstanceConfig {\n /** Unique identifier for this config in the observability registry */\n name: string;\n /** Service name for observability */\n serviceName: string;\n /** Sampling strategy - controls whether tracing is collected (defaults to ALWAYS) */\n sampling?: SamplingStrategy;\n /** Custom exporters */\n exporters?: ObservabilityExporter[];\n /** Custom processors */\n spanOutputProcessors?: SpanOutputProcessor[];\n /** OpenTelemetry bridge for integration with existing OTEL infrastructure */\n bridge?: ObservabilityBridge;\n /** Set to `true` if you want to see spans internal to the operation of mastra */\n includeInternalSpans?: boolean;\n /**\n * RequestContext keys to automatically extract as metadata for all spans\n * created with this observablity configuration.\n * Supports dot notation for nested values.\n */\n requestContextKeys?: string[];\n}\n\n/**\n * Complete Observability registry configuration\n */\nexport interface ObservabilityRegistryConfig {\n /** Enables default exporters, with sampling: always, and sensitive data filtering */\n default?: {\n enabled?: boolean;\n };\n /** Map of tracing instance names to their configurations or pre-instantiated instances */\n configs?: Record<string, Omit<ObservabilityInstanceConfig, 'name'> | ObservabilityInstance>;\n /** Optional selector function to choose which tracing instance to use */\n configSelector?: ConfigSelector;\n}\n\n// ============================================================================\n// Sampling Strategy Interfaces\n// ============================================================================\n\n/**\n * Sampling strategy types\n */\nexport enum SamplingStrategyType {\n ALWAYS = 'always',\n NEVER = 'never',\n RATIO = 'ratio',\n CUSTOM = 'custom',\n}\n\n/**\n * Sampling strategy configuration\n */\nexport type SamplingStrategy =\n | { type: SamplingStrategyType.ALWAYS }\n | { type: SamplingStrategyType.NEVER }\n | { type: SamplingStrategyType.RATIO; probability: number }\n | { type: SamplingStrategyType.CUSTOM; sampler: (options?: CustomSamplerOptions) => boolean };\n\n/**\n * Options passed when using a custom sampler strategy\n */\nexport interface CustomSamplerOptions {\n requestContext?: RequestContext;\n metadata?: Record<string, any>;\n}\n\n// ============================================================================\n// Exporter and Processor Interfaces\n// ============================================================================\n\n/**\n * Tracing event types\n */\nexport enum TracingEventType {\n SPAN_STARTED = 'span_started',\n SPAN_UPDATED = 'span_updated',\n SPAN_ENDED = 'span_ended',\n}\n\n/**\n * Tracing events that can be exported\n */\nexport type TracingEvent =\n | { type: TracingEventType.SPAN_STARTED; exportedSpan: AnyExportedSpan }\n | { type: TracingEventType.SPAN_UPDATED; exportedSpan: AnyExportedSpan }\n | { type: TracingEventType.SPAN_ENDED; exportedSpan: AnyExportedSpan };\n\nexport interface InitExporterOptions {\n mastra?: Mastra;\n config?: ObservabilityInstanceConfig;\n}\n\nexport interface InitBridgeOptions {\n mastra?: Mastra;\n config?: ObservabilityInstanceConfig;\n}\n\n/**\n * Interface for tracing exporters\n */\nexport interface ObservabilityExporter {\n /** Exporter name */\n name: string;\n\n /** Initialize exporter with tracing configuration and/or access to Mastra */\n init?(options: InitExporterOptions): void;\n\n /** Sets logger instance on the exporter. */\n __setLogger?(logger: IMastraLogger): void;\n\n /** Export tracing events */\n exportTracingEvent(event: TracingEvent): Promise<void>;\n\n addScoreToTrace?({\n traceId,\n spanId,\n score,\n reason,\n scorerName,\n metadata,\n }: {\n traceId: string;\n spanId?: string;\n score: number;\n reason?: string;\n scorerName: string;\n metadata?: Record<string, any>;\n }): Promise<void>;\n\n /** Shutdown exporter */\n shutdown(): Promise<void>;\n}\n\n/**\n * Interface for observability bridges\n */\nexport interface ObservabilityBridge {\n /** Bridge name */\n name: string;\n\n /** Initialize bridge with observability configuration and/or access to Mastra */\n init?(options: InitBridgeOptions): void;\n\n /** Sets logger instance on the bridge */\n __setLogger?(logger: IMastraLogger): void;\n\n /**\n * Export Mastra tracing events to OTEL infrastructure\n * Called for SPAN_STARTED, SPAN_UPDATED, SPAN_ENDED events\n *\n * @param event - Tracing event with exported span\n */\n exportTracingEvent(event: TracingEvent): Promise<void>;\n\n /**\n * Execute an async function within the tracing context of a Mastra span.\n * This enables auto-instrumented operations (HTTP, DB) to have correct parent spans\n * in the external tracing system (e.g., OpenTelemetry, DataDog, etc.).\n *\n * @param spanId - The ID of the Mastra span to use as context\n * @param fn - The async function to execute within the span context\n * @returns The result of the function execution\n */\n executeInContext?<T>(spanId: string, fn: () => Promise<T>): Promise<T>;\n\n /**\n * Execute a synchronous function within the tracing context of a Mastra span.\n * This enables auto-instrumented operations (HTTP, DB) to have correct parent spans\n * in the external tracing system (e.g., OpenTelemetry, DataDog, etc.).\n *\n * @param spanId - The ID of the Mastra span to use as context\n * @param fn - The synchronous function to execute within the span context\n * @returns The result of the function execution\n */\n executeInContextSync?<T>(spanId: string, fn: () => T): T;\n\n /**\n * Create a span in the bridge's tracing system.\n * Called during Mastra span construction to get bridge-generated identifiers.\n *\n * @param options - Span creation options from Mastra\n * @returns Span identifiers (spanId, traceId, parentSpanId) from bridge, or undefined if creation fails\n */\n createSpan(options: CreateSpanOptions<SpanType>): SpanIds | undefined;\n\n /** Shutdown bridge and cleanup resources */\n shutdown(): Promise<void>;\n}\n\n/**\n * Interface for span processors\n */\nexport interface SpanOutputProcessor {\n /** Processor name */\n name: string;\n /** Process span before export */\n process(span?: AnySpan): AnySpan | undefined;\n /** Shutdown processor */\n shutdown(): Promise<void>;\n}\n\n// ============================================================================\n// Tracing Config Selector Interfaces\n// ============================================================================\n\n/**\n * Options passed when using a custom tracing config selector\n */\nexport interface ConfigSelectorOptions {\n /** Request Context */\n requestContext?: RequestContext;\n}\n\n/**\n * Function to select which tracing instance to use for a given span\n * Returns the name of the tracing instance, or undefined to use default\n */\nexport type ConfigSelector = (\n options: ConfigSelectorOptions,\n availableConfigs: ReadonlyMap<string, ObservabilityInstance>,\n) => string | undefined;\n\n// ============================================================================\n// Tracing Storage Interfaces\n// ============================================================================\n\nexport type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only';\n","import type { Mastra } from '..';\nimport type { IMastraLogger } from '../logger';\nimport type { ObservabilityInstance, ConfigSelectorOptions, ObservabilityEntrypoint, ConfigSelector } from './types';\n\nexport class NoOpObservability implements ObservabilityEntrypoint {\n setMastraContext(_options: { mastra: Mastra }): void {\n return;\n }\n\n setLogger(_options: { logger: IMastraLogger }): void {\n return;\n }\n\n getSelectedInstance(_options: ConfigSelectorOptions): ObservabilityInstance | undefined {\n return;\n }\n\n registerInstance(_name: string, _instance: ObservabilityInstance, _isDefault = false): void {\n return;\n }\n\n getInstance(_name: string): ObservabilityInstance | undefined {\n return;\n }\n\n getDefaultInstance(): ObservabilityInstance | undefined {\n return;\n }\n\n listInstances(): ReadonlyMap<string, ObservabilityInstance> {\n return new Map();\n }\n\n unregisterInstance(_name: string): boolean {\n return false;\n }\n\n hasInstance(_name: string): boolean {\n return false;\n }\n\n setConfigSelector(_selector: ConfigSelector): void {\n return;\n }\n\n clear(): void {\n return;\n }\n\n async shutdown(): Promise<void> {\n return;\n }\n}\n","import type { Span, SpanType, GetOrCreateSpanOptions, AnySpan } from './types';\n\n/**\n * Creates or gets a child span from existing tracing context or starts a new trace.\n * This helper consolidates the common pattern of creating spans that can either be:\n * 1. Children of an existing span (when tracingContext.currentSpan exists)\n * 2. New root spans (when no current span exists)\n *\n * @param options - Configuration object for span creation\n * @returns The created Span or undefined if tracing is disabled\n */\nexport function getOrCreateSpan<T extends SpanType>(options: GetOrCreateSpanOptions<T>): Span<T> | undefined {\n const { type, attributes, tracingContext, requestContext, tracingOptions, ...rest } = options;\n\n const metadata = {\n ...(rest.metadata ?? {}),\n ...(tracingOptions?.metadata ?? {}),\n };\n\n // If we have a current span, create a child span\n if (tracingContext?.currentSpan) {\n return tracingContext.currentSpan.createChildSpan({\n type,\n attributes,\n ...rest,\n metadata,\n });\n }\n\n // Otherwise, try to create a new root span\n const instance = options.mastra?.observability?.getSelectedInstance({ requestContext });\n\n return instance?.startSpan<T>({\n type,\n attributes,\n ...rest,\n metadata,\n requestContext,\n tracingOptions,\n traceId: tracingOptions?.traceId,\n parentSpanId: tracingOptions?.parentSpanId,\n customSamplerOptions: {\n requestContext,\n metadata,\n },\n });\n}\n\n/**\n * Execute an async function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The async function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await executeWithContext(llmSpan, async () =>\n * model.generateText(args)\n * );\n * ```\n */\nexport async function executeWithContext<T>(params: { span?: AnySpan; fn: () => Promise<T> }): Promise<T> {\n const { span, fn } = params;\n\n if (span?.executeInContext) {\n return span.executeInContext(fn);\n }\n\n return fn();\n}\n\n/**\n * Execute a synchronous function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The synchronous function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = executeWithContextSync(llmSpan, () =>\n * model.streamText(args)\n * );\n * ```\n */\nexport function executeWithContextSync<T>(params: { span?: AnySpan; fn: () => T }): T {\n const { span, fn } = params;\n\n if (span?.executeInContextSync) {\n return span.executeInContextSync(fn);\n }\n\n return fn();\n}\n","/**\n * Tracing Context Integration\n *\n * This module provides automatic tracing context propagation throughout Mastra's execution contexts.\n * It uses JavaScript Proxies to transparently wrap Mastra, Agent, and Workflow instances so that\n * tracing context is automatically injected without requiring manual passing by users.\n */\n\nimport type { MastraPrimitives } from '../action';\nimport type { Agent } from '../agent';\nimport type { Mastra } from '../mastra';\nimport type { Workflow } from '../workflows';\nimport type { TracingContext, AnySpan } from './types';\n\nconst AGENT_GETTERS = ['getAgent', 'getAgentById'];\nconst AGENT_METHODS_TO_WRAP = ['generate', 'stream', 'generateLegacy', 'streamLegacy'];\n\nconst WORKFLOW_GETTERS = ['getWorkflow', 'getWorkflowById'];\nconst WORKFLOW_METHODS_TO_WRAP = ['execute', 'createRun', 'createRun'];\n\n/**\n * Helper function to detect NoOp spans to avoid unnecessary wrapping\n */\nfunction isNoOpSpan(span: AnySpan): boolean {\n // Check if this is a NoOp span implementation\n return span.constructor.name === 'NoOpSpan' || (span as any).__isNoOp === true;\n}\n\n/**\n * Checks to see if a passed object is an actual instance of Mastra\n * (for the purposes of wrapping it for Tracing)\n */\nexport function isMastra<T extends Mastra | (Mastra & MastraPrimitives) | MastraPrimitives>(mastra: T): boolean {\n const hasAgentGetters = AGENT_GETTERS.every(method => typeof (mastra as any)?.[method] === 'function');\n const hasWorkflowGetters = WORKFLOW_GETTERS.every(method => typeof (mastra as any)?.[method] === 'function');\n\n return hasAgentGetters && hasWorkflowGetters;\n}\n\n/**\n * Creates a tracing-aware Mastra proxy that automatically injects\n * tracing context into agent and workflow method calls\n */\nexport function wrapMastra<T extends Mastra | (Mastra & MastraPrimitives) | MastraPrimitives>(\n mastra: T,\n tracingContext: TracingContext,\n): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return mastra;\n }\n\n // Check if this object has the methods we want to wrap - if not, return as is\n if (!isMastra(mastra)) {\n return mastra;\n }\n\n try {\n return new Proxy(mastra, {\n get(target, prop) {\n try {\n if (AGENT_GETTERS.includes(prop as string)) {\n return (...args: any[]) => {\n const agent = (target as any)[prop](...args);\n return wrapAgent(agent, tracingContext);\n };\n }\n\n // Wrap workflow getters\n if (WORKFLOW_GETTERS.includes(prop as string)) {\n return (...args: any[]) => {\n const workflow = (target as any)[prop](...args);\n return wrapWorkflow(workflow, tracingContext);\n };\n }\n\n // Pass through all other methods unchanged - bind functions to preserve 'this' context\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create proxy, using original Mastra instance', error);\n return mastra;\n }\n}\n\n/**\n * Creates a tracing-aware Agent proxy that automatically injects\n * tracing context into generation method calls\n */\nfunction wrapAgent<T extends Agent>(agent: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return agent;\n }\n\n try {\n return new Proxy(agent, {\n get(target, prop) {\n try {\n if (AGENT_METHODS_TO_WRAP.includes(prop as string)) {\n return (input: any, options: any = {}) => {\n return (target as any)[prop](input, {\n ...options,\n tracingContext,\n });\n };\n }\n\n // Bind functions to preserve 'this' context for private member access\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap agent method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create agent proxy, using original instance', error);\n return agent;\n }\n}\n\n/**\n * Creates a tracing-aware Workflow proxy that automatically injects\n * tracing context into execution method calls\n */\nfunction wrapWorkflow<T extends Workflow>(workflow: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return workflow;\n }\n\n try {\n return new Proxy(workflow, {\n get(target, prop) {\n try {\n // Wrap workflow execution methods with tracing context\n if (WORKFLOW_METHODS_TO_WRAP.includes(prop as string)) {\n // Handle createRun and createRun methods differently\n if (prop === 'createRun' || prop === 'createRun') {\n return async (options: any = {}) => {\n const run = await (target as any)[prop](options);\n return run ? wrapRun(run, tracingContext) : run;\n };\n }\n\n // Handle other methods like execute\n return (input: any, options: any = {}) => {\n return (target as any)[prop](input, {\n ...options,\n tracingContext,\n });\n };\n }\n\n // Bind functions to preserve 'this' context for private member access\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap workflow method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create workflow proxy, using original instance', error);\n return workflow;\n }\n}\n\n/**\n * Creates a tracing-aware Run proxy that automatically injects\n * tracing context into start method calls\n */\nfunction wrapRun<T extends object>(run: T, tracingContext: TracingContext): T {\n // Don't wrap if no current span or if using NoOp span\n if (!tracingContext.currentSpan || isNoOpSpan(tracingContext.currentSpan)) {\n return run;\n }\n\n try {\n return new Proxy(run, {\n get(target, prop) {\n try {\n if (prop === 'start') {\n return (startOptions: any = {}) => {\n return (target as any).start({\n ...startOptions,\n tracingContext: startOptions.tracingContext ?? tracingContext,\n });\n };\n }\n\n // Pass through all other properties and methods unchanged\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n } catch (error) {\n console.warn('Tracing: Failed to wrap run method, falling back to original', error);\n const value = (target as any)[prop];\n return typeof value === 'function' ? value.bind(target) : value;\n }\n },\n });\n } catch (error) {\n console.warn('Tracing: Failed to create run proxy, using original instance', error);\n return run;\n }\n}\n"]}
|
|
@@ -239,6 +239,8 @@ var provider_registry_default = {
|
|
|
239
239
|
"magistral-small",
|
|
240
240
|
"ministral-3b-latest",
|
|
241
241
|
"ministral-8b-latest",
|
|
242
|
+
"mistral-large-2411",
|
|
243
|
+
"mistral-large-2512",
|
|
242
244
|
"mistral-large-latest",
|
|
243
245
|
"mistral-medium-2505",
|
|
244
246
|
"mistral-medium-2508",
|
|
@@ -379,7 +381,7 @@ var provider_registry_default = {
|
|
|
379
381
|
url: "https://api.deepseek.com",
|
|
380
382
|
apiKeyEnvVar: "DEEPSEEK_API_KEY",
|
|
381
383
|
name: "DeepSeek",
|
|
382
|
-
models: ["deepseek-chat", "deepseek-reasoner"],
|
|
384
|
+
models: ["deepseek-chat", "deepseek-reasoner", "deepseek-v3.2"],
|
|
383
385
|
docUrl: "https://platform.deepseek.com/api-docs/pricing",
|
|
384
386
|
gateway: "models.dev"
|
|
385
387
|
},
|
|
@@ -460,6 +462,7 @@ var provider_registry_default = {
|
|
|
460
462
|
apiKeyHeader: "Authorization",
|
|
461
463
|
name: "Venice AI",
|
|
462
464
|
models: [
|
|
465
|
+
"claude-opus-45",
|
|
463
466
|
"deepseek-coder-v2-lite",
|
|
464
467
|
"deepseek-r1-671b",
|
|
465
468
|
"dolphin-2.9.2-qwen2-72b",
|
|
@@ -753,6 +756,107 @@ var provider_registry_default = {
|
|
|
753
756
|
docUrl: "https://cloud.siliconflow.com/models",
|
|
754
757
|
gateway: "models.dev"
|
|
755
758
|
},
|
|
759
|
+
helicone: {
|
|
760
|
+
url: "https://ai-gateway.helicone.ai/v1",
|
|
761
|
+
apiKeyEnvVar: "HELICONE_API_KEY",
|
|
762
|
+
apiKeyHeader: "Authorization",
|
|
763
|
+
name: "Helicone",
|
|
764
|
+
models: [
|
|
765
|
+
"chatgpt-4o-latest",
|
|
766
|
+
"claude-3-haiku-20240307",
|
|
767
|
+
"claude-3.5-haiku",
|
|
768
|
+
"claude-3.5-sonnet-v2",
|
|
769
|
+
"claude-3.7-sonnet",
|
|
770
|
+
"claude-4.5-haiku",
|
|
771
|
+
"claude-4.5-opus",
|
|
772
|
+
"claude-4.5-sonnet",
|
|
773
|
+
"claude-haiku-4-5-20251001",
|
|
774
|
+
"claude-opus-4",
|
|
775
|
+
"claude-opus-4-1",
|
|
776
|
+
"claude-opus-4-1-20250805",
|
|
777
|
+
"claude-sonnet-4",
|
|
778
|
+
"claude-sonnet-4-5-20250929",
|
|
779
|
+
"codex-mini-latest",
|
|
780
|
+
"deepseek-r1-distill-llama-70b",
|
|
781
|
+
"deepseek-reasoner",
|
|
782
|
+
"deepseek-tng-r1t2-chimera",
|
|
783
|
+
"deepseek-v3",
|
|
784
|
+
"deepseek-v3.1-terminus",
|
|
785
|
+
"deepseek-v3.2",
|
|
786
|
+
"ernie-4.5-21b-a3b-thinking",
|
|
787
|
+
"gemini-2.5-flash",
|
|
788
|
+
"gemini-2.5-flash-lite",
|
|
789
|
+
"gemini-2.5-pro",
|
|
790
|
+
"gemini-3-pro-preview",
|
|
791
|
+
"gemma-3-12b-it",
|
|
792
|
+
"gemma2-9b-it",
|
|
793
|
+
"glm-4.6",
|
|
794
|
+
"gpt-4.1",
|
|
795
|
+
"gpt-4.1-mini",
|
|
796
|
+
"gpt-4.1-mini-2025-04-14",
|
|
797
|
+
"gpt-4.1-nano",
|
|
798
|
+
"gpt-4o",
|
|
799
|
+
"gpt-4o-mini",
|
|
800
|
+
"gpt-5",
|
|
801
|
+
"gpt-5-chat-latest",
|
|
802
|
+
"gpt-5-codex",
|
|
803
|
+
"gpt-5-mini",
|
|
804
|
+
"gpt-5-nano",
|
|
805
|
+
"gpt-5-pro",
|
|
806
|
+
"gpt-5.1",
|
|
807
|
+
"gpt-5.1-chat-latest",
|
|
808
|
+
"gpt-5.1-codex",
|
|
809
|
+
"gpt-5.1-codex-mini",
|
|
810
|
+
"gpt-oss-120b",
|
|
811
|
+
"gpt-oss-20b",
|
|
812
|
+
"grok-3",
|
|
813
|
+
"grok-3-mini",
|
|
814
|
+
"grok-4",
|
|
815
|
+
"grok-4-1-fast-non-reasoning",
|
|
816
|
+
"grok-4-1-fast-reasoning",
|
|
817
|
+
"grok-4-fast-non-reasoning",
|
|
818
|
+
"grok-4-fast-reasoning",
|
|
819
|
+
"grok-code-fast-1",
|
|
820
|
+
"hermes-2-pro-llama-3-8b",
|
|
821
|
+
"kimi-k2-0711",
|
|
822
|
+
"kimi-k2-0905",
|
|
823
|
+
"kimi-k2-thinking",
|
|
824
|
+
"llama-3.1-8b-instant",
|
|
825
|
+
"llama-3.1-8b-instruct",
|
|
826
|
+
"llama-3.1-8b-instruct-turbo",
|
|
827
|
+
"llama-3.3-70b-instruct",
|
|
828
|
+
"llama-3.3-70b-versatile",
|
|
829
|
+
"llama-4-maverick",
|
|
830
|
+
"llama-4-scout",
|
|
831
|
+
"llama-guard-4",
|
|
832
|
+
"llama-prompt-guard-2-22m",
|
|
833
|
+
"llama-prompt-guard-2-86m",
|
|
834
|
+
"mistral-large-2411",
|
|
835
|
+
"mistral-nemo",
|
|
836
|
+
"mistral-small",
|
|
837
|
+
"o1",
|
|
838
|
+
"o1-mini",
|
|
839
|
+
"o3",
|
|
840
|
+
"o3-mini",
|
|
841
|
+
"o3-pro",
|
|
842
|
+
"o4-mini",
|
|
843
|
+
"qwen2.5-coder-7b-fast",
|
|
844
|
+
"qwen3-235b-a22b-thinking",
|
|
845
|
+
"qwen3-30b-a3b",
|
|
846
|
+
"qwen3-32b",
|
|
847
|
+
"qwen3-coder",
|
|
848
|
+
"qwen3-coder-30b-a3b-instruct",
|
|
849
|
+
"qwen3-next-80b-a3b-instruct",
|
|
850
|
+
"qwen3-vl-235b-a22b-instruct",
|
|
851
|
+
"sonar",
|
|
852
|
+
"sonar-deep-research",
|
|
853
|
+
"sonar-pro",
|
|
854
|
+
"sonar-reasoning",
|
|
855
|
+
"sonar-reasoning-pro"
|
|
856
|
+
],
|
|
857
|
+
docUrl: "https://helicone.ai/models",
|
|
858
|
+
gateway: "models.dev"
|
|
859
|
+
},
|
|
756
860
|
huggingface: {
|
|
757
861
|
url: "https://router.huggingface.co/v1",
|
|
758
862
|
apiKeyEnvVar: "HF_TOKEN",
|
|
@@ -904,6 +1008,93 @@ var provider_registry_default = {
|
|
|
904
1008
|
docUrl: "https://weave-docs.wandb.ai/guides/integrations/inference/",
|
|
905
1009
|
gateway: "models.dev"
|
|
906
1010
|
},
|
|
1011
|
+
"cloudflare-ai-gateway": {
|
|
1012
|
+
url: "https://gateway.ai.cloudflare.com/v1/${CLOUDFLARE_ACCOUNT_ID}/${CLOUDFLARE_GATEWAY_ID}/compat/",
|
|
1013
|
+
apiKeyEnvVar: "CLOUDFLARE_API_TOKEN",
|
|
1014
|
+
apiKeyHeader: "Authorization",
|
|
1015
|
+
name: "Cloudflare AI Gateway",
|
|
1016
|
+
models: [
|
|
1017
|
+
"anthropic/claude-3-5-haiku",
|
|
1018
|
+
"anthropic/claude-3-haiku",
|
|
1019
|
+
"anthropic/claude-3-opus",
|
|
1020
|
+
"anthropic/claude-3-sonnet",
|
|
1021
|
+
"anthropic/claude-3.5-haiku",
|
|
1022
|
+
"anthropic/claude-3.5-sonnet",
|
|
1023
|
+
"anthropic/claude-haiku-4-5",
|
|
1024
|
+
"anthropic/claude-haiku-4.5",
|
|
1025
|
+
"anthropic/claude-opus-4",
|
|
1026
|
+
"anthropic/claude-opus-4-1",
|
|
1027
|
+
"anthropic/claude-opus-4-5",
|
|
1028
|
+
"anthropic/claude-opus-4.1",
|
|
1029
|
+
"anthropic/claude-opus-4.5",
|
|
1030
|
+
"anthropic/claude-sonnet-4",
|
|
1031
|
+
"anthropic/claude-sonnet-4-5",
|
|
1032
|
+
"anthropic/claude-sonnet-4.5",
|
|
1033
|
+
"openai/gpt-3.5-turbo",
|
|
1034
|
+
"openai/gpt-4",
|
|
1035
|
+
"openai/gpt-4-turbo",
|
|
1036
|
+
"openai/gpt-4o",
|
|
1037
|
+
"openai/gpt-4o-mini",
|
|
1038
|
+
"openai/gpt-5.1",
|
|
1039
|
+
"openai/gpt-5.1-codex",
|
|
1040
|
+
"openai/o1",
|
|
1041
|
+
"openai/o1-mini",
|
|
1042
|
+
"openai/o1-preview",
|
|
1043
|
+
"openai/o3",
|
|
1044
|
+
"openai/o3-mini",
|
|
1045
|
+
"openai/o3-pro",
|
|
1046
|
+
"openai/o4-mini",
|
|
1047
|
+
"replicate/deepseek-ai/deepseek-r1",
|
|
1048
|
+
"replicate/meta/meta-llama-3-70b-instruct",
|
|
1049
|
+
"replicate/meta/meta-llama-3-8b-instruct",
|
|
1050
|
+
"replicate/meta/meta-llama-3.1-405b-instruct",
|
|
1051
|
+
"replicate/replicate-internal/llama-405b-instruct-vllm",
|
|
1052
|
+
"workers-ai/aura-1",
|
|
1053
|
+
"workers-ai/aura-2-en",
|
|
1054
|
+
"workers-ai/aura-2-es",
|
|
1055
|
+
"workers-ai/bart-large-cnn",
|
|
1056
|
+
"workers-ai/bge-base-en-v1.5",
|
|
1057
|
+
"workers-ai/bge-large-en-v1.5",
|
|
1058
|
+
"workers-ai/bge-m3",
|
|
1059
|
+
"workers-ai/bge-reranker-base",
|
|
1060
|
+
"workers-ai/bge-small-en-v1.5",
|
|
1061
|
+
"workers-ai/deepseek-r1-distill-qwen-32b",
|
|
1062
|
+
"workers-ai/distilbert-sst-2-int8",
|
|
1063
|
+
"workers-ai/gemma-3-12b-it",
|
|
1064
|
+
"workers-ai/gemma-sea-lion-v4-27b-it",
|
|
1065
|
+
"workers-ai/gpt-oss-120b",
|
|
1066
|
+
"workers-ai/gpt-oss-20b",
|
|
1067
|
+
"workers-ai/granite-4.0-h-micro",
|
|
1068
|
+
"workers-ai/indictrans2-en-indic-1B",
|
|
1069
|
+
"workers-ai/llama-2-7b-chat-fp16",
|
|
1070
|
+
"workers-ai/llama-3-8b-instruct",
|
|
1071
|
+
"workers-ai/llama-3-8b-instruct-awq",
|
|
1072
|
+
"workers-ai/llama-3.1-8b-instruct",
|
|
1073
|
+
"workers-ai/llama-3.1-8b-instruct-awq",
|
|
1074
|
+
"workers-ai/llama-3.1-8b-instruct-fp8",
|
|
1075
|
+
"workers-ai/llama-3.2-11b-vision-instruct",
|
|
1076
|
+
"workers-ai/llama-3.2-1b-instruct",
|
|
1077
|
+
"workers-ai/llama-3.2-3b-instruct",
|
|
1078
|
+
"workers-ai/llama-3.3-70b-instruct-fp8-fast",
|
|
1079
|
+
"workers-ai/llama-4-scout-17b-16e-instruct",
|
|
1080
|
+
"workers-ai/llama-guard-3-8b",
|
|
1081
|
+
"workers-ai/m2m100-1.2b",
|
|
1082
|
+
"workers-ai/melotts",
|
|
1083
|
+
"workers-ai/mistral-7b-instruct-v0.1",
|
|
1084
|
+
"workers-ai/mistral-small-3.1-24b-instruct",
|
|
1085
|
+
"workers-ai/nova-3",
|
|
1086
|
+
"workers-ai/plamo-embedding-1b",
|
|
1087
|
+
"workers-ai/qwen2.5-coder-32b-instruct",
|
|
1088
|
+
"workers-ai/qwen3-30b-a3b-fp8",
|
|
1089
|
+
"workers-ai/qwen3-embedding-0.6b",
|
|
1090
|
+
"workers-ai/qwq-32b",
|
|
1091
|
+
"workers-ai/smart-turn-v2",
|
|
1092
|
+
"workers-ai/whisper",
|
|
1093
|
+
"workers-ai/whisper-large-v3-turbo"
|
|
1094
|
+
],
|
|
1095
|
+
docUrl: "https://developers.cloudflare.com/ai-gateway/",
|
|
1096
|
+
gateway: "models.dev"
|
|
1097
|
+
},
|
|
907
1098
|
openai: {
|
|
908
1099
|
apiKeyEnvVar: "OPENAI_API_KEY",
|
|
909
1100
|
name: "OpenAI",
|
|
@@ -1797,6 +1988,8 @@ var provider_registry_default = {
|
|
|
1797
1988
|
"magistral-small",
|
|
1798
1989
|
"ministral-3b-latest",
|
|
1799
1990
|
"ministral-8b-latest",
|
|
1991
|
+
"mistral-large-2411",
|
|
1992
|
+
"mistral-large-2512",
|
|
1800
1993
|
"mistral-large-latest",
|
|
1801
1994
|
"mistral-medium-2505",
|
|
1802
1995
|
"mistral-medium-2508",
|
|
@@ -1914,7 +2107,7 @@ var provider_registry_default = {
|
|
|
1914
2107
|
"zai-org/glm-4.5",
|
|
1915
2108
|
"zai-org/glm-4.5-air"
|
|
1916
2109
|
],
|
|
1917
|
-
deepseek: ["deepseek-chat", "deepseek-reasoner"],
|
|
2110
|
+
deepseek: ["deepseek-chat", "deepseek-reasoner", "deepseek-v3.2"],
|
|
1918
2111
|
"alibaba-cn": [
|
|
1919
2112
|
"deepseek-r1",
|
|
1920
2113
|
"deepseek-r1-0528",
|
|
@@ -1979,6 +2172,7 @@ var provider_registry_default = {
|
|
|
1979
2172
|
"tongyi-intent-detect-v3"
|
|
1980
2173
|
],
|
|
1981
2174
|
venice: [
|
|
2175
|
+
"claude-opus-45",
|
|
1982
2176
|
"deepseek-coder-v2-lite",
|
|
1983
2177
|
"deepseek-r1-671b",
|
|
1984
2178
|
"dolphin-2.9.2-qwen2-72b",
|
|
@@ -2213,6 +2407,99 @@ var provider_registry_default = {
|
|
|
2213
2407
|
"zai-org-glm-4.5v",
|
|
2214
2408
|
"zai-org-glm-4.6"
|
|
2215
2409
|
],
|
|
2410
|
+
helicone: [
|
|
2411
|
+
"chatgpt-4o-latest",
|
|
2412
|
+
"claude-3-haiku-20240307",
|
|
2413
|
+
"claude-3.5-haiku",
|
|
2414
|
+
"claude-3.5-sonnet-v2",
|
|
2415
|
+
"claude-3.7-sonnet",
|
|
2416
|
+
"claude-4.5-haiku",
|
|
2417
|
+
"claude-4.5-opus",
|
|
2418
|
+
"claude-4.5-sonnet",
|
|
2419
|
+
"claude-haiku-4-5-20251001",
|
|
2420
|
+
"claude-opus-4",
|
|
2421
|
+
"claude-opus-4-1",
|
|
2422
|
+
"claude-opus-4-1-20250805",
|
|
2423
|
+
"claude-sonnet-4",
|
|
2424
|
+
"claude-sonnet-4-5-20250929",
|
|
2425
|
+
"codex-mini-latest",
|
|
2426
|
+
"deepseek-r1-distill-llama-70b",
|
|
2427
|
+
"deepseek-reasoner",
|
|
2428
|
+
"deepseek-tng-r1t2-chimera",
|
|
2429
|
+
"deepseek-v3",
|
|
2430
|
+
"deepseek-v3.1-terminus",
|
|
2431
|
+
"deepseek-v3.2",
|
|
2432
|
+
"ernie-4.5-21b-a3b-thinking",
|
|
2433
|
+
"gemini-2.5-flash",
|
|
2434
|
+
"gemini-2.5-flash-lite",
|
|
2435
|
+
"gemini-2.5-pro",
|
|
2436
|
+
"gemini-3-pro-preview",
|
|
2437
|
+
"gemma-3-12b-it",
|
|
2438
|
+
"gemma2-9b-it",
|
|
2439
|
+
"glm-4.6",
|
|
2440
|
+
"gpt-4.1",
|
|
2441
|
+
"gpt-4.1-mini",
|
|
2442
|
+
"gpt-4.1-mini-2025-04-14",
|
|
2443
|
+
"gpt-4.1-nano",
|
|
2444
|
+
"gpt-4o",
|
|
2445
|
+
"gpt-4o-mini",
|
|
2446
|
+
"gpt-5",
|
|
2447
|
+
"gpt-5-chat-latest",
|
|
2448
|
+
"gpt-5-codex",
|
|
2449
|
+
"gpt-5-mini",
|
|
2450
|
+
"gpt-5-nano",
|
|
2451
|
+
"gpt-5-pro",
|
|
2452
|
+
"gpt-5.1",
|
|
2453
|
+
"gpt-5.1-chat-latest",
|
|
2454
|
+
"gpt-5.1-codex",
|
|
2455
|
+
"gpt-5.1-codex-mini",
|
|
2456
|
+
"gpt-oss-120b",
|
|
2457
|
+
"gpt-oss-20b",
|
|
2458
|
+
"grok-3",
|
|
2459
|
+
"grok-3-mini",
|
|
2460
|
+
"grok-4",
|
|
2461
|
+
"grok-4-1-fast-non-reasoning",
|
|
2462
|
+
"grok-4-1-fast-reasoning",
|
|
2463
|
+
"grok-4-fast-non-reasoning",
|
|
2464
|
+
"grok-4-fast-reasoning",
|
|
2465
|
+
"grok-code-fast-1",
|
|
2466
|
+
"hermes-2-pro-llama-3-8b",
|
|
2467
|
+
"kimi-k2-0711",
|
|
2468
|
+
"kimi-k2-0905",
|
|
2469
|
+
"kimi-k2-thinking",
|
|
2470
|
+
"llama-3.1-8b-instant",
|
|
2471
|
+
"llama-3.1-8b-instruct",
|
|
2472
|
+
"llama-3.1-8b-instruct-turbo",
|
|
2473
|
+
"llama-3.3-70b-instruct",
|
|
2474
|
+
"llama-3.3-70b-versatile",
|
|
2475
|
+
"llama-4-maverick",
|
|
2476
|
+
"llama-4-scout",
|
|
2477
|
+
"llama-guard-4",
|
|
2478
|
+
"llama-prompt-guard-2-22m",
|
|
2479
|
+
"llama-prompt-guard-2-86m",
|
|
2480
|
+
"mistral-large-2411",
|
|
2481
|
+
"mistral-nemo",
|
|
2482
|
+
"mistral-small",
|
|
2483
|
+
"o1",
|
|
2484
|
+
"o1-mini",
|
|
2485
|
+
"o3",
|
|
2486
|
+
"o3-mini",
|
|
2487
|
+
"o3-pro",
|
|
2488
|
+
"o4-mini",
|
|
2489
|
+
"qwen2.5-coder-7b-fast",
|
|
2490
|
+
"qwen3-235b-a22b-thinking",
|
|
2491
|
+
"qwen3-30b-a3b",
|
|
2492
|
+
"qwen3-32b",
|
|
2493
|
+
"qwen3-coder",
|
|
2494
|
+
"qwen3-coder-30b-a3b-instruct",
|
|
2495
|
+
"qwen3-next-80b-a3b-instruct",
|
|
2496
|
+
"qwen3-vl-235b-a22b-instruct",
|
|
2497
|
+
"sonar",
|
|
2498
|
+
"sonar-deep-research",
|
|
2499
|
+
"sonar-pro",
|
|
2500
|
+
"sonar-reasoning",
|
|
2501
|
+
"sonar-reasoning-pro"
|
|
2502
|
+
],
|
|
2216
2503
|
huggingface: [
|
|
2217
2504
|
"MiniMaxAI/MiniMax-M2",
|
|
2218
2505
|
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
@@ -2310,6 +2597,85 @@ var provider_registry_default = {
|
|
|
2310
2597
|
"microsoft/Phi-4-mini-instruct",
|
|
2311
2598
|
"moonshotai/Kimi-K2-Instruct"
|
|
2312
2599
|
],
|
|
2600
|
+
"cloudflare-ai-gateway": [
|
|
2601
|
+
"anthropic/claude-3-5-haiku",
|
|
2602
|
+
"anthropic/claude-3-haiku",
|
|
2603
|
+
"anthropic/claude-3-opus",
|
|
2604
|
+
"anthropic/claude-3-sonnet",
|
|
2605
|
+
"anthropic/claude-3.5-haiku",
|
|
2606
|
+
"anthropic/claude-3.5-sonnet",
|
|
2607
|
+
"anthropic/claude-haiku-4-5",
|
|
2608
|
+
"anthropic/claude-haiku-4.5",
|
|
2609
|
+
"anthropic/claude-opus-4",
|
|
2610
|
+
"anthropic/claude-opus-4-1",
|
|
2611
|
+
"anthropic/claude-opus-4-5",
|
|
2612
|
+
"anthropic/claude-opus-4.1",
|
|
2613
|
+
"anthropic/claude-opus-4.5",
|
|
2614
|
+
"anthropic/claude-sonnet-4",
|
|
2615
|
+
"anthropic/claude-sonnet-4-5",
|
|
2616
|
+
"anthropic/claude-sonnet-4.5",
|
|
2617
|
+
"openai/gpt-3.5-turbo",
|
|
2618
|
+
"openai/gpt-4",
|
|
2619
|
+
"openai/gpt-4-turbo",
|
|
2620
|
+
"openai/gpt-4o",
|
|
2621
|
+
"openai/gpt-4o-mini",
|
|
2622
|
+
"openai/gpt-5.1",
|
|
2623
|
+
"openai/gpt-5.1-codex",
|
|
2624
|
+
"openai/o1",
|
|
2625
|
+
"openai/o1-mini",
|
|
2626
|
+
"openai/o1-preview",
|
|
2627
|
+
"openai/o3",
|
|
2628
|
+
"openai/o3-mini",
|
|
2629
|
+
"openai/o3-pro",
|
|
2630
|
+
"openai/o4-mini",
|
|
2631
|
+
"replicate/deepseek-ai/deepseek-r1",
|
|
2632
|
+
"replicate/meta/meta-llama-3-70b-instruct",
|
|
2633
|
+
"replicate/meta/meta-llama-3-8b-instruct",
|
|
2634
|
+
"replicate/meta/meta-llama-3.1-405b-instruct",
|
|
2635
|
+
"replicate/replicate-internal/llama-405b-instruct-vllm",
|
|
2636
|
+
"workers-ai/aura-1",
|
|
2637
|
+
"workers-ai/aura-2-en",
|
|
2638
|
+
"workers-ai/aura-2-es",
|
|
2639
|
+
"workers-ai/bart-large-cnn",
|
|
2640
|
+
"workers-ai/bge-base-en-v1.5",
|
|
2641
|
+
"workers-ai/bge-large-en-v1.5",
|
|
2642
|
+
"workers-ai/bge-m3",
|
|
2643
|
+
"workers-ai/bge-reranker-base",
|
|
2644
|
+
"workers-ai/bge-small-en-v1.5",
|
|
2645
|
+
"workers-ai/deepseek-r1-distill-qwen-32b",
|
|
2646
|
+
"workers-ai/distilbert-sst-2-int8",
|
|
2647
|
+
"workers-ai/gemma-3-12b-it",
|
|
2648
|
+
"workers-ai/gemma-sea-lion-v4-27b-it",
|
|
2649
|
+
"workers-ai/gpt-oss-120b",
|
|
2650
|
+
"workers-ai/gpt-oss-20b",
|
|
2651
|
+
"workers-ai/granite-4.0-h-micro",
|
|
2652
|
+
"workers-ai/indictrans2-en-indic-1B",
|
|
2653
|
+
"workers-ai/llama-2-7b-chat-fp16",
|
|
2654
|
+
"workers-ai/llama-3-8b-instruct",
|
|
2655
|
+
"workers-ai/llama-3-8b-instruct-awq",
|
|
2656
|
+
"workers-ai/llama-3.1-8b-instruct",
|
|
2657
|
+
"workers-ai/llama-3.1-8b-instruct-awq",
|
|
2658
|
+
"workers-ai/llama-3.1-8b-instruct-fp8",
|
|
2659
|
+
"workers-ai/llama-3.2-11b-vision-instruct",
|
|
2660
|
+
"workers-ai/llama-3.2-1b-instruct",
|
|
2661
|
+
"workers-ai/llama-3.2-3b-instruct",
|
|
2662
|
+
"workers-ai/llama-3.3-70b-instruct-fp8-fast",
|
|
2663
|
+
"workers-ai/llama-4-scout-17b-16e-instruct",
|
|
2664
|
+
"workers-ai/llama-guard-3-8b",
|
|
2665
|
+
"workers-ai/m2m100-1.2b",
|
|
2666
|
+
"workers-ai/melotts",
|
|
2667
|
+
"workers-ai/mistral-7b-instruct-v0.1",
|
|
2668
|
+
"workers-ai/mistral-small-3.1-24b-instruct",
|
|
2669
|
+
"workers-ai/nova-3",
|
|
2670
|
+
"workers-ai/plamo-embedding-1b",
|
|
2671
|
+
"workers-ai/qwen2.5-coder-32b-instruct",
|
|
2672
|
+
"workers-ai/qwen3-30b-a3b-fp8",
|
|
2673
|
+
"workers-ai/qwen3-embedding-0.6b",
|
|
2674
|
+
"workers-ai/qwq-32b",
|
|
2675
|
+
"workers-ai/smart-turn-v2",
|
|
2676
|
+
"workers-ai/whisper",
|
|
2677
|
+
"workers-ai/whisper-large-v3-turbo"
|
|
2678
|
+
],
|
|
2313
2679
|
openai: [
|
|
2314
2680
|
"codex-mini-latest",
|
|
2315
2681
|
"gpt-3.5-turbo",
|
|
@@ -3157,7 +3523,7 @@ var GatewayRegistry = class _GatewayRegistry {
|
|
|
3157
3523
|
}
|
|
3158
3524
|
this.isRefreshing = true;
|
|
3159
3525
|
try {
|
|
3160
|
-
const { ModelsDevGateway } = await import('./models-dev-
|
|
3526
|
+
const { ModelsDevGateway } = await import('./models-dev-23RN2WHG.js');
|
|
3161
3527
|
const { NetlifyGateway } = await import('./netlify-GXJ5D5DD.js');
|
|
3162
3528
|
const { fetchProvidersFromGateways, writeRegistryFiles } = await import('./registry-generator-UMTNPBJX.js');
|
|
3163
3529
|
const defaultGateways = [new ModelsDevGateway({}), new NetlifyGateway()];
|
|
@@ -3276,5 +3642,5 @@ if (autoRefreshEnabled) {
|
|
|
3276
3642
|
}
|
|
3277
3643
|
|
|
3278
3644
|
export { GatewayRegistry, PROVIDER_MODELS, PROVIDER_REGISTRY, getProviderConfig, getRegisteredProviders, isProviderRegistered, isValidModelId, parseModelString };
|
|
3279
|
-
//# sourceMappingURL=chunk-
|
|
3280
|
-
//# sourceMappingURL=chunk-
|
|
3645
|
+
//# sourceMappingURL=chunk-VQ3FTSRC.js.map
|
|
3646
|
+
//# sourceMappingURL=chunk-VQ3FTSRC.js.map
|