@mastra/core 0.20.2 → 0.21.0-alpha.1
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 +93 -0
- package/README.md +30 -121
- package/dist/agent/agent.d.ts +5 -10
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.types.d.ts +12 -14
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +19 -11
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/input-processor/index.cjs +6 -6
- package/dist/agent/input-processor/index.js +1 -1
- package/dist/agent/message-list/index.d.ts +4 -4
- package/dist/agent/message-list/index.d.ts.map +1 -1
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +1 -1
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts.map +1 -1
- package/dist/agent/message-list/prompt/convert-file.d.ts +2 -2
- package/dist/agent/message-list/prompt/convert-file.d.ts.map +1 -1
- package/dist/agent/message-list/types.d.ts +2 -2
- package/dist/agent/message-list/types.d.ts.map +1 -1
- package/dist/agent/message-list/utils/convert-messages.d.ts +2 -2
- package/dist/agent/types.d.ts +13 -5
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils.d.ts +110 -0
- package/dist/agent/utils.d.ts.map +1 -0
- package/dist/agent/workflows/prepare-stream/index.d.ts +2 -2
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +2 -2
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +1 -2
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +2 -2
- package/dist/ai-tracing/index.cjs +32 -32
- package/dist/ai-tracing/index.js +1 -1
- package/dist/ai-tracing/spans/base.d.ts +2 -0
- package/dist/ai-tracing/spans/base.d.ts.map +1 -1
- package/dist/ai-tracing/types.d.ts +24 -0
- package/dist/ai-tracing/types.d.ts.map +1 -1
- package/dist/{chunk-BWC4WQTS.js → chunk-24L3LVID.js} +21 -14
- package/dist/chunk-24L3LVID.js.map +1 -0
- package/dist/{chunk-7ZXDZXGD.cjs → chunk-2BTTHMDJ.cjs} +14 -2
- package/dist/chunk-2BTTHMDJ.cjs.map +1 -0
- package/dist/{chunk-KK5LUATU.js → chunk-2VSJYKJF.js} +4 -4
- package/dist/{chunk-KK5LUATU.js.map → chunk-2VSJYKJF.js.map} +1 -1
- package/dist/chunk-33JJWAVI.js +2077 -0
- package/dist/chunk-33JJWAVI.js.map +1 -0
- package/dist/chunk-3ZEJSGTJ.cjs +9289 -0
- package/dist/chunk-3ZEJSGTJ.cjs.map +1 -0
- package/dist/{chunk-6ZSVXXMJ.js → chunk-624FF2ZG.js} +14 -2
- package/dist/chunk-624FF2ZG.js.map +1 -0
- package/dist/{chunk-2QV245Q5.cjs → chunk-6OJROHMC.cjs} +25 -18
- package/dist/chunk-6OJROHMC.cjs.map +1 -0
- package/dist/{chunk-T5SM2HLV.cjs → chunk-74P72XBM.cjs} +4 -4
- package/dist/chunk-74P72XBM.cjs.map +1 -0
- package/dist/chunk-75CDUY5G.js +158 -0
- package/dist/chunk-75CDUY5G.js.map +1 -0
- package/dist/chunk-BLPOOPRL.js +3164 -0
- package/dist/chunk-BLPOOPRL.js.map +1 -0
- package/dist/{chunk-JZ5MQXUL.cjs → chunk-DUMAWQ7I.cjs} +4 -4
- package/dist/{chunk-JZ5MQXUL.cjs.map → chunk-DUMAWQ7I.cjs.map} +1 -1
- package/dist/chunk-EQV7XSTY.cjs +2090 -0
- package/dist/chunk-EQV7XSTY.cjs.map +1 -0
- package/dist/chunk-ILZI4MEU.js +9263 -0
- package/dist/chunk-ILZI4MEU.js.map +1 -0
- package/dist/{chunk-4PRV2Y55.cjs → chunk-LOUJSR3F.cjs} +5 -5
- package/dist/{chunk-4PRV2Y55.cjs.map → chunk-LOUJSR3F.cjs.map} +1 -1
- package/dist/{chunk-M2MHQQGJ.js → chunk-ONHTH5RH.js} +4 -4
- package/dist/chunk-ONHTH5RH.js.map +1 -0
- package/dist/{chunk-YBC4V5GE.js → chunk-PPW3SAWO.js} +5 -9
- package/dist/{chunk-YBC4V5GE.js.map → chunk-PPW3SAWO.js.map} +1 -1
- package/dist/{chunk-DBYLVMIV.js → chunk-Q4YVANA4.js} +25 -7
- package/dist/chunk-Q4YVANA4.js.map +1 -0
- package/dist/chunk-QMKBXESK.cjs +3186 -0
- package/dist/chunk-QMKBXESK.cjs.map +1 -0
- package/dist/{chunk-EB2KTBHB.js → chunk-R3W5CNKP.js} +100 -82
- package/dist/chunk-R3W5CNKP.js.map +1 -0
- package/dist/{chunk-ECMIW6W2.cjs → chunk-RXGL66T6.cjs} +134 -111
- package/dist/chunk-RXGL66T6.cjs.map +1 -0
- package/dist/{chunk-PPCSJI73.cjs → chunk-SL534RIL.cjs} +33 -14
- package/dist/chunk-SL534RIL.cjs.map +1 -0
- package/dist/{chunk-YICS4NNU.cjs → chunk-SQXKJWFX.cjs} +12 -12
- package/dist/{chunk-YICS4NNU.cjs.map → chunk-SQXKJWFX.cjs.map} +1 -1
- package/dist/{chunk-X5SB7NR3.cjs → chunk-SSDFGDFJ.cjs} +9 -10
- package/dist/chunk-SSDFGDFJ.cjs.map +1 -0
- package/dist/{chunk-OC7MSESV.cjs → chunk-TTJM3STK.cjs} +7 -11
- package/dist/{chunk-OC7MSESV.cjs.map → chunk-TTJM3STK.cjs.map} +1 -1
- package/dist/{chunk-RE7SRMBE.cjs → chunk-UPRLKS2E.cjs} +16 -16
- package/dist/chunk-UPRLKS2E.cjs.map +1 -0
- package/dist/{chunk-7H72OAZ3.js → chunk-UQCUAYWV.js} +3 -3
- package/dist/{chunk-7H72OAZ3.js.map → chunk-UQCUAYWV.js.map} +1 -1
- package/dist/{chunk-SWNIMD7I.js → chunk-XL5MZTLP.js} +3 -3
- package/dist/chunk-XL5MZTLP.js.map +1 -0
- package/dist/{chunk-HTX7EHW5.js → chunk-XQ5A3ISB.js} +3 -3
- package/dist/{chunk-HTX7EHW5.js.map → chunk-XQ5A3ISB.js.map} +1 -1
- package/dist/chunk-Y2PKC5BX.cjs +160 -0
- package/dist/chunk-Y2PKC5BX.cjs.map +1 -0
- package/dist/{chunk-VSTMNPZJ.js → chunk-YUV3LZMY.js} +7 -8
- package/dist/chunk-YUV3LZMY.js.map +1 -0
- package/dist/index.cjs +53 -49
- package/dist/index.js +10 -10
- package/dist/llm/index.cjs +9 -5
- package/dist/llm/index.d.ts +4 -3
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/model/base.types.d.ts +2 -2
- package/dist/llm/model/base.types.d.ts.map +1 -1
- package/dist/llm/model/gateways/base.d.ts +1 -1
- package/dist/llm/model/gateways/base.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/gateways/netlify.d.ts +1 -1
- package/dist/llm/model/gateways/netlify.d.ts.map +1 -1
- package/dist/llm/model/index.d.ts +2 -1
- package/dist/llm/model/index.d.ts.map +1 -1
- package/dist/llm/model/model.d.ts +2 -2
- package/dist/llm/model/model.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +3 -3
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/model.loop.types.d.ts +2 -3
- package/dist/llm/model/model.loop.types.d.ts.map +1 -1
- package/dist/llm/model/provider-registry.d.ts +98 -0
- package/dist/llm/model/provider-registry.d.ts.map +1 -0
- package/dist/llm/model/provider-types.generated.d.ts +679 -0
- package/dist/llm/model/registry-generator.d.ts +29 -0
- package/dist/llm/model/registry-generator.d.ts.map +1 -0
- package/dist/llm/model/resolve-model.d.ts +46 -0
- package/dist/llm/model/resolve-model.d.ts.map +1 -0
- package/dist/llm/model/router.d.ts +2 -2
- package/dist/llm/model/router.d.ts.map +1 -1
- package/dist/llm/model/shared.types.d.ts +10 -4
- package/dist/llm/model/shared.types.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/loop.d.ts +1 -1
- package/dist/loop/loop.d.ts.map +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/telemetry/index.d.ts +1 -1
- package/dist/loop/telemetry/index.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/test-utils/utils.d.ts +2 -2
- package/dist/loop/test-utils/utils.d.ts.map +1 -1
- package/dist/loop/types.d.ts +4 -3
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +73 -73
- package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +50 -50
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +25 -25
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +73 -73
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/run-state.d.ts +1 -1
- package/dist/loop/workflows/run-state.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +33 -33
- package/dist/loop/workflows/schema.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts +1 -1
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/hooks.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +3 -3
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/memory/types.d.ts +3 -3
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-A334FF64.js +3 -0
- package/dist/models-dev-A334FF64.js.map +1 -0
- package/dist/models-dev-ECOIQLLK.cjs +12 -0
- package/dist/models-dev-ECOIQLLK.cjs.map +1 -0
- package/dist/netlify-CEYZ5O54.js +3 -0
- package/dist/netlify-CEYZ5O54.js.map +1 -0
- package/dist/netlify-WFAL2AA4.cjs +12 -0
- package/dist/netlify-WFAL2AA4.cjs.map +1 -0
- package/dist/processors/index.cjs +11 -11
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/language-detector.d.ts +2 -0
- package/dist/processors/processors/language-detector.d.ts.map +1 -1
- package/dist/processors/processors/moderation.d.ts +6 -3
- package/dist/processors/processors/moderation.d.ts.map +1 -1
- package/dist/processors/processors/pii-detector.d.ts +8 -4
- package/dist/processors/processors/pii-detector.d.ts.map +1 -1
- package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
- package/dist/processors/processors/structured-output.d.ts +4 -2
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts +2 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +8 -2
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/provider-registry.json +1625 -0
- package/dist/registry-generator-7XDUEFUT.cjs +111 -0
- package/dist/registry-generator-7XDUEFUT.cjs.map +1 -0
- package/dist/registry-generator-ZKIT6I3E.js +103 -0
- package/dist/registry-generator-ZKIT6I3E.js.map +1 -0
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/relevance/mastra-agent/index.d.ts +2 -2
- package/dist/relevance/mastra-agent/index.d.ts.map +1 -1
- package/dist/scores/base.d.ts +6 -6
- package/dist/scores/base.d.ts.map +1 -1
- package/dist/scores/index.cjs +9 -9
- package/dist/scores/index.js +2 -2
- package/dist/scores/run-experiment/index.d.ts +1 -1
- package/dist/scores/run-experiment/index.d.ts.map +1 -1
- package/dist/scores/scoreTraces/index.cjs +10 -10
- package/dist/scores/scoreTraces/index.cjs.map +1 -1
- package/dist/scores/scoreTraces/index.js +5 -5
- package/dist/scores/scoreTraces/index.js.map +1 -1
- package/dist/scores/types.d.ts +1 -1
- package/dist/scores/types.d.ts.map +1 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/stream/aisdk/v4/input.d.ts +1 -1
- package/dist/stream/aisdk/v4/input.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/content.d.ts +2 -2
- package/dist/stream/aisdk/v5/compat/content.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts +2 -2
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/validation.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/validation.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +5 -4
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +1 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output-helpers.d.ts +9 -9
- package/dist/stream/aisdk/v5/output-helpers.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts +40 -39
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/test-utils.d.ts +1 -1
- package/dist/stream/aisdk/v5/test-utils.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/transform.d.ts +2 -2
- package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
- package/dist/stream/base/input.d.ts +1 -1
- package/dist/stream/base/input.d.ts.map +1 -1
- package/dist/stream/base/output-format-handlers.d.ts +5 -2
- package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +31 -25
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/base/schema.d.ts +1 -1
- package/dist/stream/base/schema.d.ts.map +1 -1
- package/dist/stream/index.cjs +13 -9
- package/dist/stream/index.d.ts +1 -0
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +19 -6
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +6 -6
- package/dist/test-utils/llm-mock.cjs.map +1 -1
- package/dist/test-utils/llm-mock.d.ts +1 -1
- package/dist/test-utils/llm-mock.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.js +3 -3
- package/dist/test-utils/llm-mock.js.map +1 -1
- package/dist/tools/types.d.ts +2 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils.cjs +17 -17
- package/dist/utils.d.ts +3 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/embed.d.ts +2 -2
- package/dist/vector/embed.d.ts.map +1 -1
- package/dist/vector/index.cjs +4 -4
- package/dist/vector/index.js +1 -1
- package/dist/vector/vector.d.ts +2 -2
- package/dist/vector/vector.d.ts.map +1 -1
- package/dist/workflows/default.d.ts +2 -2
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/execution-engine.d.ts +1 -1
- package/dist/workflows/evented/execution-engine.d.ts.map +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/execution-engine.d.ts +1 -1
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/index.cjs +12 -12
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.js +1 -1
- package/dist/workflows/legacy/machine.d.ts +1 -1
- package/dist/workflows/legacy/workflow.d.ts +1 -1
- package/dist/workflows/step.d.ts +1 -1
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +1 -1
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +25 -8
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +24 -19
- package/src/llm/model/provider-types.generated.d.ts +679 -0
- package/dist/chunk-2QV245Q5.cjs.map +0 -1
- package/dist/chunk-6ZSVXXMJ.js.map +0 -1
- package/dist/chunk-7ZXDZXGD.cjs.map +0 -1
- package/dist/chunk-BWC4WQTS.js.map +0 -1
- package/dist/chunk-BZ6BIHLE.js +0 -1418
- package/dist/chunk-BZ6BIHLE.js.map +0 -1
- package/dist/chunk-DBYLVMIV.js.map +0 -1
- package/dist/chunk-EB2KTBHB.js.map +0 -1
- package/dist/chunk-ECMIW6W2.cjs.map +0 -1
- package/dist/chunk-M2MHQQGJ.js.map +0 -1
- package/dist/chunk-PPCSJI73.cjs.map +0 -1
- package/dist/chunk-RE7SRMBE.cjs.map +0 -1
- package/dist/chunk-REVAU76X.cjs +0 -1423
- package/dist/chunk-REVAU76X.cjs.map +0 -1
- package/dist/chunk-SWNIMD7I.js.map +0 -1
- package/dist/chunk-T5SM2HLV.cjs.map +0 -1
- package/dist/chunk-VSTMNPZJ.js.map +0 -1
- package/dist/chunk-X5SB7NR3.cjs.map +0 -1
- package/dist/llm/model/provider-registry.generated.d.ts +0 -99
- package/dist/llm/model/provider-registry.generated.d.ts.map +0 -1
- package/dist/stream/aisdk/v5/model-supports.d.ts +0 -25
- package/dist/stream/aisdk/v5/model-supports.d.ts.map +0 -1
|
@@ -0,0 +1,2077 @@
|
|
|
1
|
+
import { ModelsDevGateway, parseModelRouterId } from './chunk-BLPOOPRL.js';
|
|
2
|
+
import { NetlifyGateway } from './chunk-75CDUY5G.js';
|
|
3
|
+
import { createOpenAICompatible } from './chunk-ILZI4MEU.js';
|
|
4
|
+
import { RuntimeContext } from './chunk-HLRWYUFN.js';
|
|
5
|
+
import { MastraError } from './chunk-T3JFFQH2.js';
|
|
6
|
+
import { createHash } from 'crypto';
|
|
7
|
+
import fs from 'fs';
|
|
8
|
+
import { createRequire } from 'module';
|
|
9
|
+
import os from 'os';
|
|
10
|
+
import path from 'path';
|
|
11
|
+
|
|
12
|
+
// src/llm/model/gateways/index.ts
|
|
13
|
+
function findGatewayForModel(gatewayId, gateways2) {
|
|
14
|
+
const prefixedGateway = gateways2.find((g) => g.prefix && gatewayId.startsWith(`${g.prefix}/`));
|
|
15
|
+
if (prefixedGateway) {
|
|
16
|
+
return prefixedGateway;
|
|
17
|
+
}
|
|
18
|
+
const unprefixedGateways = gateways2.filter((g) => !g.prefix);
|
|
19
|
+
for (const gateway of unprefixedGateways) {
|
|
20
|
+
return gateway;
|
|
21
|
+
}
|
|
22
|
+
throw new MastraError({
|
|
23
|
+
id: "MODEL_ROUTER_NO_GATEWAY_FOUND",
|
|
24
|
+
category: "USER",
|
|
25
|
+
domain: "MODEL_ROUTER",
|
|
26
|
+
text: `No Mastra model router gateway found for model id ${gatewayId}`
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// src/llm/model/provider-registry.json
|
|
31
|
+
var provider_registry_default = {
|
|
32
|
+
providers: {
|
|
33
|
+
"moonshotai-cn": {
|
|
34
|
+
url: "https://api.moonshot.cn/v1",
|
|
35
|
+
apiKeyEnvVar: "MOONSHOT_API_KEY",
|
|
36
|
+
apiKeyHeader: "Authorization",
|
|
37
|
+
name: "Moonshot AI (China)",
|
|
38
|
+
models: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
|
|
39
|
+
docUrl: "https://platform.moonshot.cn/docs/api/chat",
|
|
40
|
+
gateway: "models.dev"
|
|
41
|
+
},
|
|
42
|
+
lucidquery: {
|
|
43
|
+
url: "https://lucidquery.com/api/v1",
|
|
44
|
+
apiKeyEnvVar: "LUCIDQUERY_API_KEY",
|
|
45
|
+
apiKeyHeader: "Authorization",
|
|
46
|
+
name: "LucidQuery AI",
|
|
47
|
+
models: ["lucidnova-rf1-100b", "lucidquery-nexus-coder"],
|
|
48
|
+
docUrl: "https://lucidquery.com/api/docs",
|
|
49
|
+
gateway: "models.dev"
|
|
50
|
+
},
|
|
51
|
+
moonshotai: {
|
|
52
|
+
url: "https://api.moonshot.ai/v1",
|
|
53
|
+
apiKeyEnvVar: "MOONSHOT_API_KEY",
|
|
54
|
+
apiKeyHeader: "Authorization",
|
|
55
|
+
name: "Moonshot AI",
|
|
56
|
+
models: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
|
|
57
|
+
docUrl: "https://platform.moonshot.ai/docs/api/chat",
|
|
58
|
+
gateway: "models.dev"
|
|
59
|
+
},
|
|
60
|
+
"zai-coding-plan": {
|
|
61
|
+
url: "https://api.z.ai/api/coding/paas/v4",
|
|
62
|
+
apiKeyEnvVar: "ZHIPU_API_KEY",
|
|
63
|
+
apiKeyHeader: "Authorization",
|
|
64
|
+
name: "Z.AI Coding Plan",
|
|
65
|
+
models: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
66
|
+
docUrl: "https://docs.z.ai/devpack/overview",
|
|
67
|
+
gateway: "models.dev"
|
|
68
|
+
},
|
|
69
|
+
alibaba: {
|
|
70
|
+
url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
|
|
71
|
+
apiKeyEnvVar: "DASHSCOPE_API_KEY",
|
|
72
|
+
apiKeyHeader: "Authorization",
|
|
73
|
+
name: "Alibaba",
|
|
74
|
+
models: ["qwen3-coder-plus"],
|
|
75
|
+
docUrl: "https://www.alibabacloud.com/help/en/model-studio/models",
|
|
76
|
+
gateway: "models.dev"
|
|
77
|
+
},
|
|
78
|
+
xai: {
|
|
79
|
+
apiKeyEnvVar: "XAI_API_KEY",
|
|
80
|
+
name: "xAI",
|
|
81
|
+
models: [
|
|
82
|
+
"grok-2",
|
|
83
|
+
"grok-2-1212",
|
|
84
|
+
"grok-2-latest",
|
|
85
|
+
"grok-2-vision",
|
|
86
|
+
"grok-2-vision-1212",
|
|
87
|
+
"grok-2-vision-latest",
|
|
88
|
+
"grok-3",
|
|
89
|
+
"grok-3-fast",
|
|
90
|
+
"grok-3-fast-latest",
|
|
91
|
+
"grok-3-latest",
|
|
92
|
+
"grok-3-mini",
|
|
93
|
+
"grok-3-mini-fast",
|
|
94
|
+
"grok-3-mini-fast-latest",
|
|
95
|
+
"grok-3-mini-latest",
|
|
96
|
+
"grok-4",
|
|
97
|
+
"grok-4-fast",
|
|
98
|
+
"grok-4-fast-non-reasoning",
|
|
99
|
+
"grok-beta",
|
|
100
|
+
"grok-code-fast-1",
|
|
101
|
+
"grok-vision-beta"
|
|
102
|
+
],
|
|
103
|
+
docUrl: "https://docs.x.ai/docs/models",
|
|
104
|
+
gateway: "models.dev"
|
|
105
|
+
},
|
|
106
|
+
nvidia: {
|
|
107
|
+
url: "https://integrate.api.nvidia.com/v1",
|
|
108
|
+
apiKeyEnvVar: "NVIDIA_API_KEY",
|
|
109
|
+
apiKeyHeader: "Authorization",
|
|
110
|
+
name: "Nvidia",
|
|
111
|
+
models: [
|
|
112
|
+
"black-forest-labs/flux.1-dev",
|
|
113
|
+
"deepseek-ai/deepseek-v3.1",
|
|
114
|
+
"google/gemma-3-27b-it",
|
|
115
|
+
"microsoft/phi-4-mini-instruct",
|
|
116
|
+
"moonshotai/kimi-k2-instruct",
|
|
117
|
+
"nvidia/cosmos-nemotron-34b",
|
|
118
|
+
"nvidia/llama-3.1-nemotron-ultra-253b-v1",
|
|
119
|
+
"nvidia/nemoretriever-ocr-v1",
|
|
120
|
+
"nvidia/parakeet-tdt-0.6b-v2",
|
|
121
|
+
"openai/gpt-oss-120b",
|
|
122
|
+
"openai/whisper-large-v3",
|
|
123
|
+
"qwen/qwen3-235b-a22b",
|
|
124
|
+
"qwen/qwen3-coder-480b-a35b-instruct"
|
|
125
|
+
],
|
|
126
|
+
docUrl: "https://docs.api.nvidia.com/nim/",
|
|
127
|
+
gateway: "models.dev"
|
|
128
|
+
},
|
|
129
|
+
upstage: {
|
|
130
|
+
url: "https://api.upstage.ai",
|
|
131
|
+
apiKeyEnvVar: "UPSTAGE_API_KEY",
|
|
132
|
+
apiKeyHeader: "Authorization",
|
|
133
|
+
name: "Upstage",
|
|
134
|
+
models: ["solar-mini", "solar-pro2"],
|
|
135
|
+
docUrl: "https://developers.upstage.ai/docs/apis/chat",
|
|
136
|
+
gateway: "models.dev"
|
|
137
|
+
},
|
|
138
|
+
groq: {
|
|
139
|
+
url: "https://api.groq.com/openai/v1",
|
|
140
|
+
apiKeyEnvVar: "GROQ_API_KEY",
|
|
141
|
+
apiKeyHeader: "Authorization",
|
|
142
|
+
name: "Groq",
|
|
143
|
+
models: [
|
|
144
|
+
"deepseek-r1-distill-llama-70b",
|
|
145
|
+
"gemma2-9b-it",
|
|
146
|
+
"llama-3.1-8b-instant",
|
|
147
|
+
"llama-3.3-70b-versatile",
|
|
148
|
+
"llama-guard-3-8b",
|
|
149
|
+
"llama3-70b-8192",
|
|
150
|
+
"llama3-8b-8192",
|
|
151
|
+
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
|
152
|
+
"meta-llama/llama-4-scout-17b-16e-instruct",
|
|
153
|
+
"meta-llama/llama-guard-4-12b",
|
|
154
|
+
"mistral-saba-24b",
|
|
155
|
+
"moonshotai/kimi-k2-instruct",
|
|
156
|
+
"moonshotai/kimi-k2-instruct-0905",
|
|
157
|
+
"openai/gpt-oss-120b",
|
|
158
|
+
"openai/gpt-oss-20b",
|
|
159
|
+
"qwen-qwq-32b",
|
|
160
|
+
"qwen/qwen3-32b"
|
|
161
|
+
],
|
|
162
|
+
docUrl: "https://console.groq.com/docs/models",
|
|
163
|
+
gateway: "models.dev"
|
|
164
|
+
},
|
|
165
|
+
mistral: {
|
|
166
|
+
url: "https://api.mistral.ai/v1",
|
|
167
|
+
apiKeyEnvVar: "MISTRAL_API_KEY",
|
|
168
|
+
apiKeyHeader: "Authorization",
|
|
169
|
+
name: "Mistral",
|
|
170
|
+
models: [
|
|
171
|
+
"codestral-latest",
|
|
172
|
+
"devstral-medium-2507",
|
|
173
|
+
"devstral-small-2505",
|
|
174
|
+
"devstral-small-2507",
|
|
175
|
+
"magistral-medium-latest",
|
|
176
|
+
"magistral-small",
|
|
177
|
+
"ministral-3b-latest",
|
|
178
|
+
"ministral-8b-latest",
|
|
179
|
+
"mistral-large-latest",
|
|
180
|
+
"mistral-medium-2505",
|
|
181
|
+
"mistral-medium-2508",
|
|
182
|
+
"mistral-medium-latest",
|
|
183
|
+
"mistral-nemo",
|
|
184
|
+
"mistral-small-latest",
|
|
185
|
+
"open-mistral-7b",
|
|
186
|
+
"open-mixtral-8x22b",
|
|
187
|
+
"open-mixtral-8x7b",
|
|
188
|
+
"pixtral-12b",
|
|
189
|
+
"pixtral-large-latest"
|
|
190
|
+
],
|
|
191
|
+
docUrl: "https://docs.mistral.ai/getting-started/models/",
|
|
192
|
+
gateway: "models.dev"
|
|
193
|
+
},
|
|
194
|
+
vercel: {
|
|
195
|
+
url: "https://ai-gateway.vercel.sh/v1",
|
|
196
|
+
apiKeyEnvVar: "AI_GATEWAY_API_KEY",
|
|
197
|
+
apiKeyHeader: "Authorization",
|
|
198
|
+
name: "Vercel AI Gateway",
|
|
199
|
+
models: [
|
|
200
|
+
"amazon/nova-lite",
|
|
201
|
+
"amazon/nova-micro",
|
|
202
|
+
"amazon/nova-pro",
|
|
203
|
+
"anthropic/claude-3-5-haiku",
|
|
204
|
+
"anthropic/claude-3-haiku",
|
|
205
|
+
"anthropic/claude-3-opus",
|
|
206
|
+
"anthropic/claude-3.5-sonnet",
|
|
207
|
+
"anthropic/claude-3.7-sonnet",
|
|
208
|
+
"anthropic/claude-4-1-opus",
|
|
209
|
+
"anthropic/claude-4-opus",
|
|
210
|
+
"anthropic/claude-4-sonnet",
|
|
211
|
+
"anthropic/claude-4.5-sonnet",
|
|
212
|
+
"cerebras/qwen3-coder",
|
|
213
|
+
"deepseek/deepseek-r1",
|
|
214
|
+
"deepseek/deepseek-r1-distill-llama-70b",
|
|
215
|
+
"google/gemini-2.0-flash",
|
|
216
|
+
"google/gemini-2.0-flash-lite",
|
|
217
|
+
"google/gemini-2.5-flash",
|
|
218
|
+
"google/gemini-2.5-pro",
|
|
219
|
+
"meta/llama-3.3-70b",
|
|
220
|
+
"meta/llama-4-maverick",
|
|
221
|
+
"meta/llama-4-scout",
|
|
222
|
+
"mistral/codestral",
|
|
223
|
+
"mistral/magistral-medium",
|
|
224
|
+
"mistral/magistral-small",
|
|
225
|
+
"mistral/ministral-3b",
|
|
226
|
+
"mistral/ministral-8b",
|
|
227
|
+
"mistral/mistral-large",
|
|
228
|
+
"mistral/mistral-small",
|
|
229
|
+
"mistral/mixtral-8x22b-instruct",
|
|
230
|
+
"mistral/pixtral-12b",
|
|
231
|
+
"mistral/pixtral-large",
|
|
232
|
+
"moonshotai/kimi-k2",
|
|
233
|
+
"morph/morph-v3-fast",
|
|
234
|
+
"morph/morph-v3-large",
|
|
235
|
+
"openai/gpt-4-turbo",
|
|
236
|
+
"openai/gpt-4.1",
|
|
237
|
+
"openai/gpt-4.1-mini",
|
|
238
|
+
"openai/gpt-4.1-nano",
|
|
239
|
+
"openai/gpt-4o",
|
|
240
|
+
"openai/gpt-4o-mini",
|
|
241
|
+
"openai/gpt-5",
|
|
242
|
+
"openai/gpt-5-codex",
|
|
243
|
+
"openai/gpt-5-mini",
|
|
244
|
+
"openai/gpt-5-nano",
|
|
245
|
+
"openai/gpt-oss-120b",
|
|
246
|
+
"openai/gpt-oss-20b",
|
|
247
|
+
"openai/o1",
|
|
248
|
+
"openai/o3",
|
|
249
|
+
"openai/o3-mini",
|
|
250
|
+
"openai/o4-mini",
|
|
251
|
+
"vercel/v0-1.0-md",
|
|
252
|
+
"vercel/v0-1.5-md",
|
|
253
|
+
"xai/grok-2",
|
|
254
|
+
"xai/grok-2-vision",
|
|
255
|
+
"xai/grok-3",
|
|
256
|
+
"xai/grok-3-fast",
|
|
257
|
+
"xai/grok-3-mini",
|
|
258
|
+
"xai/grok-3-mini-fast",
|
|
259
|
+
"xai/grok-4",
|
|
260
|
+
"xai/grok-4-fast",
|
|
261
|
+
"xai/grok-4-fast-non-reasoning",
|
|
262
|
+
"xai/grok-code-fast-1"
|
|
263
|
+
],
|
|
264
|
+
docUrl: "https://github.com/vercel/ai/tree/5eb85cc45a259553501f535b8ac79a77d0e79223/packages/gateway",
|
|
265
|
+
gateway: "models.dev"
|
|
266
|
+
},
|
|
267
|
+
deepseek: {
|
|
268
|
+
url: "https://api.deepseek.com",
|
|
269
|
+
apiKeyEnvVar: "DEEPSEEK_API_KEY",
|
|
270
|
+
apiKeyHeader: "Authorization",
|
|
271
|
+
name: "DeepSeek",
|
|
272
|
+
models: ["deepseek-chat", "deepseek-reasoner"],
|
|
273
|
+
docUrl: "https://platform.deepseek.com/api-docs/pricing",
|
|
274
|
+
gateway: "models.dev"
|
|
275
|
+
},
|
|
276
|
+
"alibaba-cn": {
|
|
277
|
+
url: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
278
|
+
apiKeyEnvVar: "DASHSCOPE_API_KEY",
|
|
279
|
+
apiKeyHeader: "Authorization",
|
|
280
|
+
name: "Alibaba (China)",
|
|
281
|
+
models: ["qwen3-coder-plus"],
|
|
282
|
+
docUrl: "https://www.alibabacloud.com/help/en/model-studio/models",
|
|
283
|
+
gateway: "models.dev"
|
|
284
|
+
},
|
|
285
|
+
venice: {
|
|
286
|
+
url: "https://api.venice.ai/api/v1",
|
|
287
|
+
apiKeyEnvVar: "VENICE_API_KEY",
|
|
288
|
+
apiKeyHeader: "Authorization",
|
|
289
|
+
name: "Venice AI",
|
|
290
|
+
models: [
|
|
291
|
+
"deepseek-coder-v2-lite",
|
|
292
|
+
"deepseek-r1-671b",
|
|
293
|
+
"dolphin-2.9.2-qwen2-72b",
|
|
294
|
+
"llama-3.1-405b",
|
|
295
|
+
"llama-3.2-3b",
|
|
296
|
+
"llama-3.3-70b",
|
|
297
|
+
"mistral-31-24b",
|
|
298
|
+
"qwen-2.5-coder-32b",
|
|
299
|
+
"qwen-2.5-qwq-32b",
|
|
300
|
+
"qwen-2.5-vl",
|
|
301
|
+
"qwen3-235b",
|
|
302
|
+
"qwen3-4b",
|
|
303
|
+
"venice-uncensored"
|
|
304
|
+
],
|
|
305
|
+
docUrl: "https://docs.venice.ai",
|
|
306
|
+
gateway: "models.dev"
|
|
307
|
+
},
|
|
308
|
+
chutes: {
|
|
309
|
+
url: "https://llm.chutes.ai/v1",
|
|
310
|
+
apiKeyEnvVar: "CHUTES_API_KEY",
|
|
311
|
+
apiKeyHeader: "Authorization",
|
|
312
|
+
name: "Chutes",
|
|
313
|
+
models: [
|
|
314
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
315
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
316
|
+
"Qwen/Qwen3-30B-A3B",
|
|
317
|
+
"Qwen/Qwen3-30B-A3B-Instruct-2507",
|
|
318
|
+
"Qwen/Qwen3-30B-A3B-Thinking-2507",
|
|
319
|
+
"Qwen/Qwen3-Coder-30B-A3B-Instruct",
|
|
320
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
321
|
+
"Qwen/Qwen3-Next-80B-A3B-Instruct",
|
|
322
|
+
"Qwen/Qwen3-Next-80B-A3B-Thinking",
|
|
323
|
+
"chutesai/Devstral-Small-2505",
|
|
324
|
+
"chutesai/Mistral-Small-3.2-24B-Instruct-2506",
|
|
325
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
326
|
+
"deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
|
|
327
|
+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
|
|
328
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
329
|
+
"deepseek-ai/DeepSeek-V3.1",
|
|
330
|
+
"deepseek-ai/DeepSeek-V3.1-Terminus",
|
|
331
|
+
"deepseek-ai/DeepSeek-V3.1-turbo",
|
|
332
|
+
"deepseek-ai/DeepSeek-V3.1:THINKING",
|
|
333
|
+
"deepseek-ai/DeepSeek-V3.2-Exp",
|
|
334
|
+
"meituan-longcat/LongCat-Flash-Chat-FP8",
|
|
335
|
+
"moonshotai/Kimi-Dev-72B",
|
|
336
|
+
"moonshotai/Kimi-K2-Instruct-0905",
|
|
337
|
+
"moonshotai/Kimi-K2-Instruct-75k",
|
|
338
|
+
"moonshotai/Kimi-VL-A3B-Thinking",
|
|
339
|
+
"openai/gpt-oss-120b",
|
|
340
|
+
"tngtech/DeepSeek-R1T-Chimera",
|
|
341
|
+
"tngtech/DeepSeek-TNG-R1T2-Chimera",
|
|
342
|
+
"zai-org/GLM-4.5-Air",
|
|
343
|
+
"zai-org/GLM-4.5-FP8",
|
|
344
|
+
"zai-org/GLM-4.5-turbo",
|
|
345
|
+
"zai-org/GLM-4.6-FP8",
|
|
346
|
+
"zai-org/GLM-4.6-turbo"
|
|
347
|
+
],
|
|
348
|
+
docUrl: "https://llm.chutes.ai/v1/models",
|
|
349
|
+
gateway: "models.dev"
|
|
350
|
+
},
|
|
351
|
+
cortecs: {
|
|
352
|
+
url: "https://api.cortecs.ai/v1",
|
|
353
|
+
apiKeyEnvVar: "CORTECS_API_KEY",
|
|
354
|
+
apiKeyHeader: "Authorization",
|
|
355
|
+
name: "Cortecs",
|
|
356
|
+
models: [
|
|
357
|
+
"claude-sonnet-4",
|
|
358
|
+
"deepseek-v3-0324",
|
|
359
|
+
"gemini-2.5-pro",
|
|
360
|
+
"gpt-4.1",
|
|
361
|
+
"gpt-oss-120b",
|
|
362
|
+
"kimi-k2-instruct",
|
|
363
|
+
"llama-3.1-405b-instruct",
|
|
364
|
+
"nova-pro-v1",
|
|
365
|
+
"qwen3-32b",
|
|
366
|
+
"qwen3-coder-480b-a35b-instruct"
|
|
367
|
+
],
|
|
368
|
+
docUrl: "https://api.cortecs.ai/v1/models",
|
|
369
|
+
gateway: "models.dev"
|
|
370
|
+
},
|
|
371
|
+
"github-models": {
|
|
372
|
+
url: "https://models.github.ai/inference",
|
|
373
|
+
apiKeyEnvVar: "GITHUB_TOKEN",
|
|
374
|
+
apiKeyHeader: "Authorization",
|
|
375
|
+
name: "GitHub Models",
|
|
376
|
+
models: [
|
|
377
|
+
"ai21-labs/ai21-jamba-1.5-large",
|
|
378
|
+
"ai21-labs/ai21-jamba-1.5-mini",
|
|
379
|
+
"cohere/cohere-command-a",
|
|
380
|
+
"cohere/cohere-command-r",
|
|
381
|
+
"cohere/cohere-command-r-08-2024",
|
|
382
|
+
"cohere/cohere-command-r-plus",
|
|
383
|
+
"cohere/cohere-command-r-plus-08-2024",
|
|
384
|
+
"core42/jais-30b-chat",
|
|
385
|
+
"deepseek/deepseek-r1",
|
|
386
|
+
"deepseek/deepseek-r1-0528",
|
|
387
|
+
"deepseek/deepseek-v3-0324",
|
|
388
|
+
"meta/llama-3.2-11b-vision-instruct",
|
|
389
|
+
"meta/llama-3.2-90b-vision-instruct",
|
|
390
|
+
"meta/llama-3.3-70b-instruct",
|
|
391
|
+
"meta/llama-4-maverick-17b-128e-instruct-fp8",
|
|
392
|
+
"meta/llama-4-scout-17b-16e-instruct",
|
|
393
|
+
"meta/meta-llama-3-70b-instruct",
|
|
394
|
+
"meta/meta-llama-3-8b-instruct",
|
|
395
|
+
"meta/meta-llama-3.1-405b-instruct",
|
|
396
|
+
"meta/meta-llama-3.1-70b-instruct",
|
|
397
|
+
"meta/meta-llama-3.1-8b-instruct",
|
|
398
|
+
"microsoft/mai-ds-r1",
|
|
399
|
+
"microsoft/phi-3-medium-128k-instruct",
|
|
400
|
+
"microsoft/phi-3-medium-4k-instruct",
|
|
401
|
+
"microsoft/phi-3-mini-128k-instruct",
|
|
402
|
+
"microsoft/phi-3-mini-4k-instruct",
|
|
403
|
+
"microsoft/phi-3-small-128k-instruct",
|
|
404
|
+
"microsoft/phi-3-small-8k-instruct",
|
|
405
|
+
"microsoft/phi-3.5-mini-instruct",
|
|
406
|
+
"microsoft/phi-3.5-moe-instruct",
|
|
407
|
+
"microsoft/phi-3.5-vision-instruct",
|
|
408
|
+
"microsoft/phi-4",
|
|
409
|
+
"microsoft/phi-4-mini-instruct",
|
|
410
|
+
"microsoft/phi-4-mini-reasoning",
|
|
411
|
+
"microsoft/phi-4-multimodal-instruct",
|
|
412
|
+
"microsoft/phi-4-reasoning",
|
|
413
|
+
"mistral-ai/codestral-2501",
|
|
414
|
+
"mistral-ai/ministral-3b",
|
|
415
|
+
"mistral-ai/mistral-large-2411",
|
|
416
|
+
"mistral-ai/mistral-medium-2505",
|
|
417
|
+
"mistral-ai/mistral-nemo",
|
|
418
|
+
"mistral-ai/mistral-small-2503",
|
|
419
|
+
"openai/gpt-4.1",
|
|
420
|
+
"openai/gpt-4.1-mini",
|
|
421
|
+
"openai/gpt-4.1-nano",
|
|
422
|
+
"openai/gpt-4o",
|
|
423
|
+
"openai/gpt-4o-mini",
|
|
424
|
+
"openai/o1",
|
|
425
|
+
"openai/o1-mini",
|
|
426
|
+
"openai/o1-preview",
|
|
427
|
+
"openai/o3",
|
|
428
|
+
"openai/o3-mini",
|
|
429
|
+
"openai/o4-mini",
|
|
430
|
+
"xai/grok-3",
|
|
431
|
+
"xai/grok-3-mini"
|
|
432
|
+
],
|
|
433
|
+
docUrl: "https://docs.github.com/en/github-models",
|
|
434
|
+
gateway: "models.dev"
|
|
435
|
+
},
|
|
436
|
+
togetherai: {
|
|
437
|
+
url: "https://api.together.xyz/v1",
|
|
438
|
+
apiKeyEnvVar: "TOGETHER_API_KEY",
|
|
439
|
+
apiKeyHeader: "Authorization",
|
|
440
|
+
name: "Together AI",
|
|
441
|
+
models: [
|
|
442
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
443
|
+
"deepseek-ai/DeepSeek-R1",
|
|
444
|
+
"deepseek-ai/DeepSeek-V3",
|
|
445
|
+
"meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
|
446
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
447
|
+
"openai/gpt-oss-120b"
|
|
448
|
+
],
|
|
449
|
+
docUrl: "https://docs.together.ai/docs/serverless-models",
|
|
450
|
+
gateway: "models.dev"
|
|
451
|
+
},
|
|
452
|
+
baseten: {
|
|
453
|
+
url: "https://inference.baseten.co/v1",
|
|
454
|
+
apiKeyEnvVar: "BASETEN_API_KEY",
|
|
455
|
+
apiKeyHeader: "Authorization",
|
|
456
|
+
name: "Baseten",
|
|
457
|
+
models: ["Qwen3/Qwen3-Coder-480B-A35B-Instruct", "moonshotai/Kimi-K2-Instruct-0905"],
|
|
458
|
+
docUrl: "https://docs.baseten.co/development/model-apis/overview",
|
|
459
|
+
gateway: "models.dev"
|
|
460
|
+
},
|
|
461
|
+
huggingface: {
|
|
462
|
+
url: "https://router.huggingface.co/v1",
|
|
463
|
+
apiKeyEnvVar: "HF_TOKEN",
|
|
464
|
+
apiKeyHeader: "Authorization",
|
|
465
|
+
name: "Hugging Face",
|
|
466
|
+
models: [
|
|
467
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
468
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
469
|
+
"Qwen/Qwen3-Next-80B-A3B-Instruct",
|
|
470
|
+
"Qwen/Qwen3-Next-80B-A3B-Thinking",
|
|
471
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
472
|
+
"deepseek-ai/Deepseek-V3-0324",
|
|
473
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
474
|
+
"moonshotai/Kimi-K2-Instruct-0905",
|
|
475
|
+
"zai-org/GLM-4.5",
|
|
476
|
+
"zai-org/GLM-4.5-Air",
|
|
477
|
+
"zai-org/GLM-4.6"
|
|
478
|
+
],
|
|
479
|
+
docUrl: "https://huggingface.co/docs/inference-providers",
|
|
480
|
+
gateway: "models.dev"
|
|
481
|
+
},
|
|
482
|
+
opencode: {
|
|
483
|
+
url: "https://opencode.ai/zen/v1",
|
|
484
|
+
apiKeyEnvVar: "OPENCODE_API_KEY",
|
|
485
|
+
apiKeyHeader: "Authorization",
|
|
486
|
+
name: "OpenCode Zen",
|
|
487
|
+
models: [
|
|
488
|
+
"claude-3-5-haiku",
|
|
489
|
+
"claude-opus-4-1",
|
|
490
|
+
"claude-sonnet-4",
|
|
491
|
+
"claude-sonnet-4-5",
|
|
492
|
+
"code-supernova",
|
|
493
|
+
"glm-4.6",
|
|
494
|
+
"gpt-5",
|
|
495
|
+
"gpt-5-codex",
|
|
496
|
+
"grok-code",
|
|
497
|
+
"kimi-k2",
|
|
498
|
+
"qwen3-coder"
|
|
499
|
+
],
|
|
500
|
+
docUrl: "https://opencode.ai/docs/zen",
|
|
501
|
+
gateway: "models.dev"
|
|
502
|
+
},
|
|
503
|
+
fastrouter: {
|
|
504
|
+
url: "https://go.fastrouter.ai/api/v1",
|
|
505
|
+
apiKeyEnvVar: "FASTROUTER_API_KEY",
|
|
506
|
+
apiKeyHeader: "Authorization",
|
|
507
|
+
name: "FastRouter",
|
|
508
|
+
models: [
|
|
509
|
+
"anthropic/claude-opus-4.1",
|
|
510
|
+
"anthropic/claude-sonnet-4",
|
|
511
|
+
"deepseek-ai/deepseek-r1-distill-llama-70b",
|
|
512
|
+
"google/gemini-2.5-flash",
|
|
513
|
+
"google/gemini-2.5-pro",
|
|
514
|
+
"moonshotai/kimi-k2",
|
|
515
|
+
"openai/gpt-4.1",
|
|
516
|
+
"openai/gpt-5",
|
|
517
|
+
"openai/gpt-5-mini",
|
|
518
|
+
"openai/gpt-5-nano",
|
|
519
|
+
"openai/gpt-oss-120b",
|
|
520
|
+
"openai/gpt-oss-20b",
|
|
521
|
+
"qwen/qwen3-coder",
|
|
522
|
+
"x-ai/grok-4"
|
|
523
|
+
],
|
|
524
|
+
docUrl: "https://fastrouter.ai/models",
|
|
525
|
+
gateway: "models.dev"
|
|
526
|
+
},
|
|
527
|
+
google: {
|
|
528
|
+
apiKeyEnvVar: "GOOGLE_GENERATIVE_AI_API_KEY",
|
|
529
|
+
name: "Google",
|
|
530
|
+
models: [
|
|
531
|
+
"gemini-1.5-flash",
|
|
532
|
+
"gemini-1.5-flash-8b",
|
|
533
|
+
"gemini-1.5-pro",
|
|
534
|
+
"gemini-2.0-flash",
|
|
535
|
+
"gemini-2.0-flash-lite",
|
|
536
|
+
"gemini-2.5-flash",
|
|
537
|
+
"gemini-2.5-flash-lite",
|
|
538
|
+
"gemini-2.5-flash-lite-preview-06-17",
|
|
539
|
+
"gemini-2.5-flash-lite-preview-09-2025",
|
|
540
|
+
"gemini-2.5-flash-preview-04-17",
|
|
541
|
+
"gemini-2.5-flash-preview-05-20",
|
|
542
|
+
"gemini-2.5-flash-preview-09-2025",
|
|
543
|
+
"gemini-2.5-pro",
|
|
544
|
+
"gemini-2.5-pro-preview-05-06",
|
|
545
|
+
"gemini-2.5-pro-preview-06-05",
|
|
546
|
+
"gemini-flash-latest",
|
|
547
|
+
"gemini-flash-lite-latest",
|
|
548
|
+
"gemini-live-2.5-flash-preview-native-audio"
|
|
549
|
+
],
|
|
550
|
+
docUrl: "https://ai.google.dev/gemini-api/docs/pricing",
|
|
551
|
+
gateway: "models.dev"
|
|
552
|
+
},
|
|
553
|
+
inception: {
|
|
554
|
+
url: "https://api.inceptionlabs.ai/v1/",
|
|
555
|
+
apiKeyEnvVar: "INCEPTION_API_KEY",
|
|
556
|
+
apiKeyHeader: "Authorization",
|
|
557
|
+
name: "Inception",
|
|
558
|
+
models: ["mercury", "mercury-coder"],
|
|
559
|
+
docUrl: "https://platform.inceptionlabs.ai/docs",
|
|
560
|
+
gateway: "models.dev"
|
|
561
|
+
},
|
|
562
|
+
wandb: {
|
|
563
|
+
url: "https://api.inference.wandb.ai/v1",
|
|
564
|
+
apiKeyEnvVar: "WANDB_API_KEY",
|
|
565
|
+
apiKeyHeader: "Authorization",
|
|
566
|
+
name: "Weights & Biases",
|
|
567
|
+
models: [
|
|
568
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
569
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
570
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
571
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
572
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
573
|
+
"meta-llama/Llama-3.1-8B-Instruct",
|
|
574
|
+
"meta-llama/Llama-3.3-70B-Instruct",
|
|
575
|
+
"meta-llama/Llama-4-Scout-17B-16E-Instruct",
|
|
576
|
+
"microsoft/Phi-4-mini-instruct",
|
|
577
|
+
"moonshotai/Kimi-K2-Instruct"
|
|
578
|
+
],
|
|
579
|
+
docUrl: "https://weave-docs.wandb.ai/guides/integrations/inference/",
|
|
580
|
+
gateway: "models.dev"
|
|
581
|
+
},
|
|
582
|
+
openai: {
|
|
583
|
+
apiKeyEnvVar: "OPENAI_API_KEY",
|
|
584
|
+
name: "OpenAI",
|
|
585
|
+
models: [
|
|
586
|
+
"codex-mini-latest",
|
|
587
|
+
"gpt-3.5-turbo",
|
|
588
|
+
"gpt-4",
|
|
589
|
+
"gpt-4-turbo",
|
|
590
|
+
"gpt-4.1",
|
|
591
|
+
"gpt-4.1-mini",
|
|
592
|
+
"gpt-4.1-nano",
|
|
593
|
+
"gpt-4o",
|
|
594
|
+
"gpt-4o-2024-05-13",
|
|
595
|
+
"gpt-4o-2024-08-06",
|
|
596
|
+
"gpt-4o-2024-11-20",
|
|
597
|
+
"gpt-4o-mini",
|
|
598
|
+
"gpt-5",
|
|
599
|
+
"gpt-5-chat-latest",
|
|
600
|
+
"gpt-5-codex",
|
|
601
|
+
"gpt-5-mini",
|
|
602
|
+
"gpt-5-nano",
|
|
603
|
+
"o1",
|
|
604
|
+
"o1-mini",
|
|
605
|
+
"o1-preview",
|
|
606
|
+
"o1-pro",
|
|
607
|
+
"o3",
|
|
608
|
+
"o3-deep-research",
|
|
609
|
+
"o3-mini",
|
|
610
|
+
"o3-pro",
|
|
611
|
+
"o4-mini",
|
|
612
|
+
"o4-mini-deep-research"
|
|
613
|
+
],
|
|
614
|
+
docUrl: "https://platform.openai.com/docs/models",
|
|
615
|
+
gateway: "models.dev"
|
|
616
|
+
},
|
|
617
|
+
"zhipuai-coding-plan": {
|
|
618
|
+
url: "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
619
|
+
apiKeyEnvVar: "ZHIPU_API_KEY",
|
|
620
|
+
apiKeyHeader: "Authorization",
|
|
621
|
+
name: "Zhipu AI Coding Plan",
|
|
622
|
+
models: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
623
|
+
docUrl: "https://docs.bigmodel.cn/cn/coding-plan/overview",
|
|
624
|
+
gateway: "models.dev"
|
|
625
|
+
},
|
|
626
|
+
perplexity: {
|
|
627
|
+
url: "https://api.perplexity.ai",
|
|
628
|
+
apiKeyEnvVar: "PERPLEXITY_API_KEY",
|
|
629
|
+
apiKeyHeader: "Authorization",
|
|
630
|
+
name: "Perplexity",
|
|
631
|
+
models: ["sonar", "sonar-pro", "sonar-reasoning", "sonar-reasoning-pro"],
|
|
632
|
+
docUrl: "https://docs.perplexity.ai",
|
|
633
|
+
gateway: "models.dev"
|
|
634
|
+
},
|
|
635
|
+
openrouter: {
|
|
636
|
+
url: "https://openrouter.ai/api/v1",
|
|
637
|
+
apiKeyEnvVar: "OPENROUTER_API_KEY",
|
|
638
|
+
name: "OpenRouter",
|
|
639
|
+
models: [
|
|
640
|
+
"anthropic/claude-3.5-haiku",
|
|
641
|
+
"anthropic/claude-3.7-sonnet",
|
|
642
|
+
"anthropic/claude-opus-4",
|
|
643
|
+
"anthropic/claude-opus-4.1",
|
|
644
|
+
"anthropic/claude-sonnet-4",
|
|
645
|
+
"anthropic/claude-sonnet-4.5",
|
|
646
|
+
"cognitivecomputations/dolphin3.0-mistral-24b",
|
|
647
|
+
"cognitivecomputations/dolphin3.0-r1-mistral-24b",
|
|
648
|
+
"deepseek/deepseek-chat-v3-0324",
|
|
649
|
+
"deepseek/deepseek-chat-v3.1",
|
|
650
|
+
"deepseek/deepseek-r1-0528-qwen3-8b:free",
|
|
651
|
+
"deepseek/deepseek-r1-0528:free",
|
|
652
|
+
"deepseek/deepseek-r1-distill-llama-70b",
|
|
653
|
+
"deepseek/deepseek-r1-distill-qwen-14b",
|
|
654
|
+
"deepseek/deepseek-r1:free",
|
|
655
|
+
"deepseek/deepseek-v3-base:free",
|
|
656
|
+
"deepseek/deepseek-v3.1-terminus",
|
|
657
|
+
"featherless/qwerky-72b",
|
|
658
|
+
"google/gemini-2.0-flash-001",
|
|
659
|
+
"google/gemini-2.0-flash-exp:free",
|
|
660
|
+
"google/gemini-2.5-flash",
|
|
661
|
+
"google/gemini-2.5-pro",
|
|
662
|
+
"google/gemini-2.5-pro-preview-05-06",
|
|
663
|
+
"google/gemini-2.5-pro-preview-06-05",
|
|
664
|
+
"google/gemma-2-9b-it:free",
|
|
665
|
+
"google/gemma-3-12b-it",
|
|
666
|
+
"google/gemma-3-27b-it",
|
|
667
|
+
"google/gemma-3n-e4b-it",
|
|
668
|
+
"google/gemma-3n-e4b-it:free",
|
|
669
|
+
"meta-llama/llama-3.2-11b-vision-instruct",
|
|
670
|
+
"meta-llama/llama-3.3-70b-instruct:free",
|
|
671
|
+
"meta-llama/llama-4-scout:free",
|
|
672
|
+
"microsoft/mai-ds-r1:free",
|
|
673
|
+
"mistralai/codestral-2508",
|
|
674
|
+
"mistralai/devstral-medium-2507",
|
|
675
|
+
"mistralai/devstral-small-2505",
|
|
676
|
+
"mistralai/devstral-small-2505:free",
|
|
677
|
+
"mistralai/devstral-small-2507",
|
|
678
|
+
"mistralai/mistral-7b-instruct:free",
|
|
679
|
+
"mistralai/mistral-medium-3",
|
|
680
|
+
"mistralai/mistral-medium-3.1",
|
|
681
|
+
"mistralai/mistral-nemo:free",
|
|
682
|
+
"mistralai/mistral-small-3.1-24b-instruct",
|
|
683
|
+
"mistralai/mistral-small-3.2-24b-instruct",
|
|
684
|
+
"mistralai/mistral-small-3.2-24b-instruct:free",
|
|
685
|
+
"moonshotai/kimi-dev-72b:free",
|
|
686
|
+
"moonshotai/kimi-k2",
|
|
687
|
+
"moonshotai/kimi-k2-0905",
|
|
688
|
+
"moonshotai/kimi-k2:free",
|
|
689
|
+
"nousresearch/deephermes-3-llama-3-8b-preview",
|
|
690
|
+
"nousresearch/hermes-4-405b",
|
|
691
|
+
"nousresearch/hermes-4-70b",
|
|
692
|
+
"openai/gpt-4.1",
|
|
693
|
+
"openai/gpt-4.1-mini",
|
|
694
|
+
"openai/gpt-4o-mini",
|
|
695
|
+
"openai/gpt-5",
|
|
696
|
+
"openai/gpt-5-chat",
|
|
697
|
+
"openai/gpt-5-codex",
|
|
698
|
+
"openai/gpt-5-mini",
|
|
699
|
+
"openai/gpt-5-nano",
|
|
700
|
+
"openai/gpt-oss-120b",
|
|
701
|
+
"openai/gpt-oss-20b",
|
|
702
|
+
"openai/o4-mini",
|
|
703
|
+
"openrouter/cypher-alpha:free",
|
|
704
|
+
"openrouter/horizon-alpha",
|
|
705
|
+
"openrouter/horizon-beta",
|
|
706
|
+
"openrouter/sonoma-dusk-alpha",
|
|
707
|
+
"openrouter/sonoma-sky-alpha",
|
|
708
|
+
"qwen/qwen-2.5-coder-32b-instruct",
|
|
709
|
+
"qwen/qwen2.5-vl-32b-instruct:free",
|
|
710
|
+
"qwen/qwen2.5-vl-72b-instruct",
|
|
711
|
+
"qwen/qwen2.5-vl-72b-instruct:free",
|
|
712
|
+
"qwen/qwen3-14b:free",
|
|
713
|
+
"qwen/qwen3-235b-a22b-07-25",
|
|
714
|
+
"qwen/qwen3-235b-a22b-07-25:free",
|
|
715
|
+
"qwen/qwen3-235b-a22b-thinking-2507",
|
|
716
|
+
"qwen/qwen3-235b-a22b:free",
|
|
717
|
+
"qwen/qwen3-30b-a3b-instruct-2507",
|
|
718
|
+
"qwen/qwen3-30b-a3b:free",
|
|
719
|
+
"qwen/qwen3-32b:free",
|
|
720
|
+
"qwen/qwen3-8b:free",
|
|
721
|
+
"qwen/qwen3-coder",
|
|
722
|
+
"qwen/qwen3-coder:free",
|
|
723
|
+
"qwen/qwen3-max",
|
|
724
|
+
"qwen/qwen3-next-80b-a3b-instruct",
|
|
725
|
+
"qwen/qwq-32b:free",
|
|
726
|
+
"rekaai/reka-flash-3",
|
|
727
|
+
"sarvamai/sarvam-m:free",
|
|
728
|
+
"thudm/glm-z1-32b:free",
|
|
729
|
+
"tngtech/deepseek-r1t2-chimera:free",
|
|
730
|
+
"x-ai/grok-3",
|
|
731
|
+
"x-ai/grok-3-beta",
|
|
732
|
+
"x-ai/grok-3-mini",
|
|
733
|
+
"x-ai/grok-3-mini-beta",
|
|
734
|
+
"x-ai/grok-4",
|
|
735
|
+
"x-ai/grok-4-fast",
|
|
736
|
+
"x-ai/grok-4-fast:free",
|
|
737
|
+
"x-ai/grok-code-fast-1",
|
|
738
|
+
"z-ai/glm-4.5",
|
|
739
|
+
"z-ai/glm-4.5-air",
|
|
740
|
+
"z-ai/glm-4.5-air:free",
|
|
741
|
+
"z-ai/glm-4.5v",
|
|
742
|
+
"z-ai/glm-4.6"
|
|
743
|
+
],
|
|
744
|
+
docUrl: "https://openrouter.ai/models",
|
|
745
|
+
gateway: "models.dev"
|
|
746
|
+
},
|
|
747
|
+
synthetic: {
|
|
748
|
+
url: "https://api.synthetic.new/v1",
|
|
749
|
+
apiKeyEnvVar: "SYNTHETIC_API_KEY",
|
|
750
|
+
apiKeyHeader: "Authorization",
|
|
751
|
+
name: "Synthetic",
|
|
752
|
+
models: [
|
|
753
|
+
"hf:Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
754
|
+
"hf:Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
755
|
+
"hf:Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
756
|
+
"hf:Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
757
|
+
"hf:deepseek-ai/DeepSeek-R1",
|
|
758
|
+
"hf:deepseek-ai/DeepSeek-R1-0528",
|
|
759
|
+
"hf:deepseek-ai/DeepSeek-V3",
|
|
760
|
+
"hf:deepseek-ai/DeepSeek-V3-0324",
|
|
761
|
+
"hf:deepseek-ai/DeepSeek-V3.1",
|
|
762
|
+
"hf:deepseek-ai/DeepSeek-V3.1-Terminus",
|
|
763
|
+
"hf:meta-llama/Llama-3.1-405B-Instruct",
|
|
764
|
+
"hf:meta-llama/Llama-3.1-70B-Instruct",
|
|
765
|
+
"hf:meta-llama/Llama-3.1-8B-Instruct",
|
|
766
|
+
"hf:meta-llama/Llama-3.3-70B-Instruct",
|
|
767
|
+
"hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
|
|
768
|
+
"hf:meta-llama/Llama-4-Scout-17B-16E-Instruct",
|
|
769
|
+
"hf:moonshotai/Kimi-K2-Instruct",
|
|
770
|
+
"hf:moonshotai/Kimi-K2-Instruct-0905",
|
|
771
|
+
"hf:openai/gpt-oss-120b",
|
|
772
|
+
"hf:zai-org/GLM-4.5",
|
|
773
|
+
"hf:zai-org/GLM-4.6"
|
|
774
|
+
],
|
|
775
|
+
docUrl: "https://synthetic.new/pricing",
|
|
776
|
+
gateway: "models.dev"
|
|
777
|
+
},
|
|
778
|
+
deepinfra: {
|
|
779
|
+
url: "https://api.deepinfra.com/v1/openai",
|
|
780
|
+
apiKeyEnvVar: "DEEPINFRA_API_KEY",
|
|
781
|
+
apiKeyHeader: "Authorization",
|
|
782
|
+
name: "Deep Infra",
|
|
783
|
+
models: [
|
|
784
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
785
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo",
|
|
786
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
787
|
+
"zai-org/GLM-4.5"
|
|
788
|
+
],
|
|
789
|
+
docUrl: "https://deepinfra.com/models",
|
|
790
|
+
gateway: "models.dev"
|
|
791
|
+
},
|
|
792
|
+
zhipuai: {
|
|
793
|
+
url: "https://open.bigmodel.cn/api/paas/v4",
|
|
794
|
+
apiKeyEnvVar: "ZHIPU_API_KEY",
|
|
795
|
+
apiKeyHeader: "Authorization",
|
|
796
|
+
name: "Zhipu AI",
|
|
797
|
+
models: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
798
|
+
docUrl: "https://docs.z.ai/guides/overview/pricing",
|
|
799
|
+
gateway: "models.dev"
|
|
800
|
+
},
|
|
801
|
+
submodel: {
|
|
802
|
+
url: "https://llm.submodel.ai/v1",
|
|
803
|
+
apiKeyEnvVar: "SUBMODEL_INSTAGEN_ACCESS_KEY",
|
|
804
|
+
apiKeyHeader: "Authorization",
|
|
805
|
+
name: "submodel",
|
|
806
|
+
models: [
|
|
807
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
808
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
809
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
810
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
811
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
812
|
+
"deepseek-ai/DeepSeek-V3.1",
|
|
813
|
+
"openai/gpt-oss-120b",
|
|
814
|
+
"zai-org/GLM-4.5-Air",
|
|
815
|
+
"zai-org/GLM-4.5-FP8"
|
|
816
|
+
],
|
|
817
|
+
docUrl: "https://submodel.gitbook.io",
|
|
818
|
+
gateway: "models.dev"
|
|
819
|
+
},
|
|
820
|
+
zai: {
|
|
821
|
+
url: "https://api.z.ai/api/paas/v4",
|
|
822
|
+
apiKeyEnvVar: "ZHIPU_API_KEY",
|
|
823
|
+
apiKeyHeader: "Authorization",
|
|
824
|
+
name: "Z.AI",
|
|
825
|
+
models: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
826
|
+
docUrl: "https://docs.z.ai/guides/overview/pricing",
|
|
827
|
+
gateway: "models.dev"
|
|
828
|
+
},
|
|
829
|
+
inference: {
|
|
830
|
+
url: "https://inference.net/v1",
|
|
831
|
+
apiKeyEnvVar: "INFERENCE_API_KEY",
|
|
832
|
+
apiKeyHeader: "Authorization",
|
|
833
|
+
name: "Inference",
|
|
834
|
+
models: [
|
|
835
|
+
"google/gemma-3",
|
|
836
|
+
"meta/llama-3.1-8b-instruct",
|
|
837
|
+
"meta/llama-3.2-11b-vision-instruct",
|
|
838
|
+
"meta/llama-3.2-1b-instruct",
|
|
839
|
+
"meta/llama-3.2-3b-instruct",
|
|
840
|
+
"mistral/mistral-nemo-12b-instruct",
|
|
841
|
+
"osmosis/osmosis-structure-0.6b",
|
|
842
|
+
"qwen/qwen-2.5-7b-vision-instruct",
|
|
843
|
+
"qwen/qwen3-embedding-4b"
|
|
844
|
+
],
|
|
845
|
+
docUrl: "https://inference.net/models",
|
|
846
|
+
gateway: "models.dev"
|
|
847
|
+
},
|
|
848
|
+
requesty: {
|
|
849
|
+
url: "https://router.requesty.ai/v1",
|
|
850
|
+
apiKeyEnvVar: "REQUESTY_API_KEY",
|
|
851
|
+
apiKeyHeader: "Authorization",
|
|
852
|
+
name: "Requesty",
|
|
853
|
+
models: [
|
|
854
|
+
"anthropic/claude-3-7-sonnet",
|
|
855
|
+
"anthropic/claude-4-sonnet-20250522",
|
|
856
|
+
"anthropic/claude-opus-4",
|
|
857
|
+
"anthropic/claude-opus-4-1-20250805",
|
|
858
|
+
"google/gemini-2.5-flash",
|
|
859
|
+
"google/gemini-2.5-pro",
|
|
860
|
+
"openai/gpt-4.1",
|
|
861
|
+
"openai/gpt-4.1-mini",
|
|
862
|
+
"openai/gpt-4o-mini",
|
|
863
|
+
"openai/gpt-5",
|
|
864
|
+
"openai/gpt-5-mini",
|
|
865
|
+
"openai/gpt-5-nano",
|
|
866
|
+
"openai/o4-mini"
|
|
867
|
+
],
|
|
868
|
+
docUrl: "https://requesty.ai/solution/llm-routing/models",
|
|
869
|
+
gateway: "models.dev"
|
|
870
|
+
},
|
|
871
|
+
morph: {
|
|
872
|
+
url: "https://api.morphllm.com/v1",
|
|
873
|
+
apiKeyEnvVar: "MORPH_API_KEY",
|
|
874
|
+
apiKeyHeader: "Authorization",
|
|
875
|
+
name: "Morph",
|
|
876
|
+
models: ["auto", "morph-v3-fast", "morph-v3-large"],
|
|
877
|
+
docUrl: "https://docs.morphllm.com/api-reference/introduction",
|
|
878
|
+
gateway: "models.dev"
|
|
879
|
+
},
|
|
880
|
+
lmstudio: {
|
|
881
|
+
url: "http://127.0.0.1:1234/v1",
|
|
882
|
+
apiKeyEnvVar: "LMSTUDIO_API_KEY",
|
|
883
|
+
apiKeyHeader: "Authorization",
|
|
884
|
+
name: "LMStudio",
|
|
885
|
+
models: ["openai/gpt-oss-20b", "qwen/qwen3-30b-a3b-2507", "qwen/qwen3-coder-30b"],
|
|
886
|
+
docUrl: "https://lmstudio.ai/models",
|
|
887
|
+
gateway: "models.dev"
|
|
888
|
+
},
|
|
889
|
+
anthropic: {
|
|
890
|
+
apiKeyEnvVar: "ANTHROPIC_API_KEY",
|
|
891
|
+
name: "Anthropic",
|
|
892
|
+
models: [
|
|
893
|
+
"claude-3-5-haiku-20241022",
|
|
894
|
+
"claude-3-5-sonnet-20240620",
|
|
895
|
+
"claude-3-5-sonnet-20241022",
|
|
896
|
+
"claude-3-7-sonnet-20250219",
|
|
897
|
+
"claude-3-haiku-20240307",
|
|
898
|
+
"claude-3-opus-20240229",
|
|
899
|
+
"claude-3-sonnet-20240229",
|
|
900
|
+
"claude-opus-4-1-20250805",
|
|
901
|
+
"claude-opus-4-20250514",
|
|
902
|
+
"claude-sonnet-4-20250514",
|
|
903
|
+
"claude-sonnet-4-5-20250929"
|
|
904
|
+
],
|
|
905
|
+
docUrl: "https://docs.anthropic.com/en/docs/about-claude/models",
|
|
906
|
+
gateway: "models.dev"
|
|
907
|
+
},
|
|
908
|
+
"fireworks-ai": {
|
|
909
|
+
url: "https://api.fireworks.ai/inference/v1/",
|
|
910
|
+
apiKeyEnvVar: "FIREWORKS_API_KEY",
|
|
911
|
+
apiKeyHeader: "Authorization",
|
|
912
|
+
name: "Fireworks AI",
|
|
913
|
+
models: [
|
|
914
|
+
"accounts/fireworks/models/deepseek-r1-0528",
|
|
915
|
+
"accounts/fireworks/models/deepseek-v3-0324",
|
|
916
|
+
"accounts/fireworks/models/deepseek-v3p1",
|
|
917
|
+
"accounts/fireworks/models/glm-4p5",
|
|
918
|
+
"accounts/fireworks/models/glm-4p5-air",
|
|
919
|
+
"accounts/fireworks/models/gpt-oss-120b",
|
|
920
|
+
"accounts/fireworks/models/gpt-oss-20b",
|
|
921
|
+
"accounts/fireworks/models/kimi-k2-instruct",
|
|
922
|
+
"accounts/fireworks/models/qwen3-235b-a22b",
|
|
923
|
+
"accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
|
|
924
|
+
],
|
|
925
|
+
docUrl: "https://fireworks.ai/docs/",
|
|
926
|
+
gateway: "models.dev"
|
|
927
|
+
},
|
|
928
|
+
modelscope: {
|
|
929
|
+
url: "https://api-inference.modelscope.cn/v1",
|
|
930
|
+
apiKeyEnvVar: "MODELSCOPE_API_KEY",
|
|
931
|
+
apiKeyHeader: "Authorization",
|
|
932
|
+
name: "ModelScope",
|
|
933
|
+
models: [
|
|
934
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
935
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
936
|
+
"Qwen/Qwen3-30B-A3B-Instruct-2507",
|
|
937
|
+
"Qwen/Qwen3-30B-A3B-Thinking-2507",
|
|
938
|
+
"Qwen/Qwen3-Coder-30B-A3B-Instruct",
|
|
939
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
940
|
+
"ZhipuAI/GLM-4.5"
|
|
941
|
+
],
|
|
942
|
+
docUrl: "https://modelscope.cn/docs/model-service/API-Inference/intro",
|
|
943
|
+
gateway: "models.dev"
|
|
944
|
+
},
|
|
945
|
+
llama: {
|
|
946
|
+
url: "https://api.llama.com/compat/v1/",
|
|
947
|
+
apiKeyEnvVar: "LLAMA_API_KEY",
|
|
948
|
+
apiKeyHeader: "Authorization",
|
|
949
|
+
name: "Llama",
|
|
950
|
+
models: [
|
|
951
|
+
"cerebras-llama-4-maverick-17b-128e-instruct",
|
|
952
|
+
"cerebras-llama-4-scout-17b-16e-instruct",
|
|
953
|
+
"groq-llama-4-maverick-17b-128e-instruct",
|
|
954
|
+
"llama-3.3-70b-instruct",
|
|
955
|
+
"llama-3.3-8b-instruct",
|
|
956
|
+
"llama-4-maverick-17b-128e-instruct-fp8",
|
|
957
|
+
"llama-4-scout-17b-16e-instruct-fp8"
|
|
958
|
+
],
|
|
959
|
+
docUrl: "https://llama.developer.meta.com/docs/models",
|
|
960
|
+
gateway: "models.dev"
|
|
961
|
+
},
|
|
962
|
+
cerebras: {
|
|
963
|
+
url: "https://api.cerebras.ai/v1",
|
|
964
|
+
apiKeyEnvVar: "CEREBRAS_API_KEY",
|
|
965
|
+
apiKeyHeader: "Authorization",
|
|
966
|
+
name: "Cerebras",
|
|
967
|
+
models: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "qwen-3-coder-480b"],
|
|
968
|
+
docUrl: "https://inference-docs.cerebras.ai/models/overview",
|
|
969
|
+
gateway: "models.dev"
|
|
970
|
+
},
|
|
971
|
+
netlify: {
|
|
972
|
+
apiKeyEnvVar: ["NETLIFY_TOKEN", "NETLIFY_SITE_ID"],
|
|
973
|
+
apiKeyHeader: "Authorization",
|
|
974
|
+
name: "Netlify",
|
|
975
|
+
gateway: "netlify",
|
|
976
|
+
models: [
|
|
977
|
+
"anthropic/claude-3-5-haiku-20241022",
|
|
978
|
+
"anthropic/claude-3-5-haiku-latest",
|
|
979
|
+
"anthropic/claude-3-7-sonnet-20250219",
|
|
980
|
+
"anthropic/claude-3-7-sonnet-latest",
|
|
981
|
+
"anthropic/claude-3-haiku-20240307",
|
|
982
|
+
"anthropic/claude-opus-4-1-20250805",
|
|
983
|
+
"anthropic/claude-opus-4-20250514",
|
|
984
|
+
"anthropic/claude-sonnet-4-20250514",
|
|
985
|
+
"anthropic/claude-sonnet-4-5-20250929",
|
|
986
|
+
"gemini/gemini-2.0-flash",
|
|
987
|
+
"gemini/gemini-2.0-flash-lite",
|
|
988
|
+
"gemini/gemini-2.5-flash",
|
|
989
|
+
"gemini/gemini-2.5-flash-image-preview",
|
|
990
|
+
"gemini/gemini-2.5-flash-lite",
|
|
991
|
+
"gemini/gemini-2.5-flash-lite-preview-09-2025",
|
|
992
|
+
"gemini/gemini-2.5-flash-preview-09-2025",
|
|
993
|
+
"gemini/gemini-2.5-pro",
|
|
994
|
+
"gemini/gemini-flash-latest",
|
|
995
|
+
"gemini/gemini-flash-lite-latest",
|
|
996
|
+
"openai/codex-mini-latest",
|
|
997
|
+
"openai/gpt-4.1",
|
|
998
|
+
"openai/gpt-4.1-mini",
|
|
999
|
+
"openai/gpt-4.1-nano",
|
|
1000
|
+
"openai/gpt-4o",
|
|
1001
|
+
"openai/gpt-4o-mini",
|
|
1002
|
+
"openai/gpt-5",
|
|
1003
|
+
"openai/gpt-5-codex",
|
|
1004
|
+
"openai/gpt-5-mini",
|
|
1005
|
+
"openai/gpt-5-nano",
|
|
1006
|
+
"openai/gpt-5-pro",
|
|
1007
|
+
"openai/o3",
|
|
1008
|
+
"openai/o3-mini",
|
|
1009
|
+
"openai/o4-mini"
|
|
1010
|
+
],
|
|
1011
|
+
docUrl: "https://docs.netlify.com/build/ai-gateway/overview/"
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
models: {
|
|
1015
|
+
"moonshotai-cn": ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
|
|
1016
|
+
lucidquery: ["lucidnova-rf1-100b", "lucidquery-nexus-coder"],
|
|
1017
|
+
moonshotai: ["kimi-k2-0711-preview", "kimi-k2-0905-preview", "kimi-k2-turbo-preview"],
|
|
1018
|
+
"zai-coding-plan": ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
1019
|
+
alibaba: ["qwen3-coder-plus"],
|
|
1020
|
+
xai: [
|
|
1021
|
+
"grok-2",
|
|
1022
|
+
"grok-2-1212",
|
|
1023
|
+
"grok-2-latest",
|
|
1024
|
+
"grok-2-vision",
|
|
1025
|
+
"grok-2-vision-1212",
|
|
1026
|
+
"grok-2-vision-latest",
|
|
1027
|
+
"grok-3",
|
|
1028
|
+
"grok-3-fast",
|
|
1029
|
+
"grok-3-fast-latest",
|
|
1030
|
+
"grok-3-latest",
|
|
1031
|
+
"grok-3-mini",
|
|
1032
|
+
"grok-3-mini-fast",
|
|
1033
|
+
"grok-3-mini-fast-latest",
|
|
1034
|
+
"grok-3-mini-latest",
|
|
1035
|
+
"grok-4",
|
|
1036
|
+
"grok-4-fast",
|
|
1037
|
+
"grok-4-fast-non-reasoning",
|
|
1038
|
+
"grok-beta",
|
|
1039
|
+
"grok-code-fast-1",
|
|
1040
|
+
"grok-vision-beta"
|
|
1041
|
+
],
|
|
1042
|
+
nvidia: [
|
|
1043
|
+
"black-forest-labs/flux.1-dev",
|
|
1044
|
+
"deepseek-ai/deepseek-v3.1",
|
|
1045
|
+
"google/gemma-3-27b-it",
|
|
1046
|
+
"microsoft/phi-4-mini-instruct",
|
|
1047
|
+
"moonshotai/kimi-k2-instruct",
|
|
1048
|
+
"nvidia/cosmos-nemotron-34b",
|
|
1049
|
+
"nvidia/llama-3.1-nemotron-ultra-253b-v1",
|
|
1050
|
+
"nvidia/nemoretriever-ocr-v1",
|
|
1051
|
+
"nvidia/parakeet-tdt-0.6b-v2",
|
|
1052
|
+
"openai/gpt-oss-120b",
|
|
1053
|
+
"openai/whisper-large-v3",
|
|
1054
|
+
"qwen/qwen3-235b-a22b",
|
|
1055
|
+
"qwen/qwen3-coder-480b-a35b-instruct"
|
|
1056
|
+
],
|
|
1057
|
+
upstage: ["solar-mini", "solar-pro2"],
|
|
1058
|
+
groq: [
|
|
1059
|
+
"deepseek-r1-distill-llama-70b",
|
|
1060
|
+
"gemma2-9b-it",
|
|
1061
|
+
"llama-3.1-8b-instant",
|
|
1062
|
+
"llama-3.3-70b-versatile",
|
|
1063
|
+
"llama-guard-3-8b",
|
|
1064
|
+
"llama3-70b-8192",
|
|
1065
|
+
"llama3-8b-8192",
|
|
1066
|
+
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
|
1067
|
+
"meta-llama/llama-4-scout-17b-16e-instruct",
|
|
1068
|
+
"meta-llama/llama-guard-4-12b",
|
|
1069
|
+
"mistral-saba-24b",
|
|
1070
|
+
"moonshotai/kimi-k2-instruct",
|
|
1071
|
+
"moonshotai/kimi-k2-instruct-0905",
|
|
1072
|
+
"openai/gpt-oss-120b",
|
|
1073
|
+
"openai/gpt-oss-20b",
|
|
1074
|
+
"qwen-qwq-32b",
|
|
1075
|
+
"qwen/qwen3-32b"
|
|
1076
|
+
],
|
|
1077
|
+
mistral: [
|
|
1078
|
+
"codestral-latest",
|
|
1079
|
+
"devstral-medium-2507",
|
|
1080
|
+
"devstral-small-2505",
|
|
1081
|
+
"devstral-small-2507",
|
|
1082
|
+
"magistral-medium-latest",
|
|
1083
|
+
"magistral-small",
|
|
1084
|
+
"ministral-3b-latest",
|
|
1085
|
+
"ministral-8b-latest",
|
|
1086
|
+
"mistral-large-latest",
|
|
1087
|
+
"mistral-medium-2505",
|
|
1088
|
+
"mistral-medium-2508",
|
|
1089
|
+
"mistral-medium-latest",
|
|
1090
|
+
"mistral-nemo",
|
|
1091
|
+
"mistral-small-latest",
|
|
1092
|
+
"open-mistral-7b",
|
|
1093
|
+
"open-mixtral-8x22b",
|
|
1094
|
+
"open-mixtral-8x7b",
|
|
1095
|
+
"pixtral-12b",
|
|
1096
|
+
"pixtral-large-latest"
|
|
1097
|
+
],
|
|
1098
|
+
vercel: [
|
|
1099
|
+
"amazon/nova-lite",
|
|
1100
|
+
"amazon/nova-micro",
|
|
1101
|
+
"amazon/nova-pro",
|
|
1102
|
+
"anthropic/claude-3-5-haiku",
|
|
1103
|
+
"anthropic/claude-3-haiku",
|
|
1104
|
+
"anthropic/claude-3-opus",
|
|
1105
|
+
"anthropic/claude-3.5-sonnet",
|
|
1106
|
+
"anthropic/claude-3.7-sonnet",
|
|
1107
|
+
"anthropic/claude-4-1-opus",
|
|
1108
|
+
"anthropic/claude-4-opus",
|
|
1109
|
+
"anthropic/claude-4-sonnet",
|
|
1110
|
+
"anthropic/claude-4.5-sonnet",
|
|
1111
|
+
"cerebras/qwen3-coder",
|
|
1112
|
+
"deepseek/deepseek-r1",
|
|
1113
|
+
"deepseek/deepseek-r1-distill-llama-70b",
|
|
1114
|
+
"google/gemini-2.0-flash",
|
|
1115
|
+
"google/gemini-2.0-flash-lite",
|
|
1116
|
+
"google/gemini-2.5-flash",
|
|
1117
|
+
"google/gemini-2.5-pro",
|
|
1118
|
+
"meta/llama-3.3-70b",
|
|
1119
|
+
"meta/llama-4-maverick",
|
|
1120
|
+
"meta/llama-4-scout",
|
|
1121
|
+
"mistral/codestral",
|
|
1122
|
+
"mistral/magistral-medium",
|
|
1123
|
+
"mistral/magistral-small",
|
|
1124
|
+
"mistral/ministral-3b",
|
|
1125
|
+
"mistral/ministral-8b",
|
|
1126
|
+
"mistral/mistral-large",
|
|
1127
|
+
"mistral/mistral-small",
|
|
1128
|
+
"mistral/mixtral-8x22b-instruct",
|
|
1129
|
+
"mistral/pixtral-12b",
|
|
1130
|
+
"mistral/pixtral-large",
|
|
1131
|
+
"moonshotai/kimi-k2",
|
|
1132
|
+
"morph/morph-v3-fast",
|
|
1133
|
+
"morph/morph-v3-large",
|
|
1134
|
+
"openai/gpt-4-turbo",
|
|
1135
|
+
"openai/gpt-4.1",
|
|
1136
|
+
"openai/gpt-4.1-mini",
|
|
1137
|
+
"openai/gpt-4.1-nano",
|
|
1138
|
+
"openai/gpt-4o",
|
|
1139
|
+
"openai/gpt-4o-mini",
|
|
1140
|
+
"openai/gpt-5",
|
|
1141
|
+
"openai/gpt-5-codex",
|
|
1142
|
+
"openai/gpt-5-mini",
|
|
1143
|
+
"openai/gpt-5-nano",
|
|
1144
|
+
"openai/gpt-oss-120b",
|
|
1145
|
+
"openai/gpt-oss-20b",
|
|
1146
|
+
"openai/o1",
|
|
1147
|
+
"openai/o3",
|
|
1148
|
+
"openai/o3-mini",
|
|
1149
|
+
"openai/o4-mini",
|
|
1150
|
+
"vercel/v0-1.0-md",
|
|
1151
|
+
"vercel/v0-1.5-md",
|
|
1152
|
+
"xai/grok-2",
|
|
1153
|
+
"xai/grok-2-vision",
|
|
1154
|
+
"xai/grok-3",
|
|
1155
|
+
"xai/grok-3-fast",
|
|
1156
|
+
"xai/grok-3-mini",
|
|
1157
|
+
"xai/grok-3-mini-fast",
|
|
1158
|
+
"xai/grok-4",
|
|
1159
|
+
"xai/grok-4-fast",
|
|
1160
|
+
"xai/grok-4-fast-non-reasoning",
|
|
1161
|
+
"xai/grok-code-fast-1"
|
|
1162
|
+
],
|
|
1163
|
+
deepseek: ["deepseek-chat", "deepseek-reasoner"],
|
|
1164
|
+
"alibaba-cn": ["qwen3-coder-plus"],
|
|
1165
|
+
venice: [
|
|
1166
|
+
"deepseek-coder-v2-lite",
|
|
1167
|
+
"deepseek-r1-671b",
|
|
1168
|
+
"dolphin-2.9.2-qwen2-72b",
|
|
1169
|
+
"llama-3.1-405b",
|
|
1170
|
+
"llama-3.2-3b",
|
|
1171
|
+
"llama-3.3-70b",
|
|
1172
|
+
"mistral-31-24b",
|
|
1173
|
+
"qwen-2.5-coder-32b",
|
|
1174
|
+
"qwen-2.5-qwq-32b",
|
|
1175
|
+
"qwen-2.5-vl",
|
|
1176
|
+
"qwen3-235b",
|
|
1177
|
+
"qwen3-4b",
|
|
1178
|
+
"venice-uncensored"
|
|
1179
|
+
],
|
|
1180
|
+
chutes: [
|
|
1181
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
1182
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1183
|
+
"Qwen/Qwen3-30B-A3B",
|
|
1184
|
+
"Qwen/Qwen3-30B-A3B-Instruct-2507",
|
|
1185
|
+
"Qwen/Qwen3-30B-A3B-Thinking-2507",
|
|
1186
|
+
"Qwen/Qwen3-Coder-30B-A3B-Instruct",
|
|
1187
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
1188
|
+
"Qwen/Qwen3-Next-80B-A3B-Instruct",
|
|
1189
|
+
"Qwen/Qwen3-Next-80B-A3B-Thinking",
|
|
1190
|
+
"chutesai/Devstral-Small-2505",
|
|
1191
|
+
"chutesai/Mistral-Small-3.2-24B-Instruct-2506",
|
|
1192
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
1193
|
+
"deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
|
|
1194
|
+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
|
|
1195
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
1196
|
+
"deepseek-ai/DeepSeek-V3.1",
|
|
1197
|
+
"deepseek-ai/DeepSeek-V3.1-Terminus",
|
|
1198
|
+
"deepseek-ai/DeepSeek-V3.1-turbo",
|
|
1199
|
+
"deepseek-ai/DeepSeek-V3.1:THINKING",
|
|
1200
|
+
"deepseek-ai/DeepSeek-V3.2-Exp",
|
|
1201
|
+
"meituan-longcat/LongCat-Flash-Chat-FP8",
|
|
1202
|
+
"moonshotai/Kimi-Dev-72B",
|
|
1203
|
+
"moonshotai/Kimi-K2-Instruct-0905",
|
|
1204
|
+
"moonshotai/Kimi-K2-Instruct-75k",
|
|
1205
|
+
"moonshotai/Kimi-VL-A3B-Thinking",
|
|
1206
|
+
"openai/gpt-oss-120b",
|
|
1207
|
+
"tngtech/DeepSeek-R1T-Chimera",
|
|
1208
|
+
"tngtech/DeepSeek-TNG-R1T2-Chimera",
|
|
1209
|
+
"zai-org/GLM-4.5-Air",
|
|
1210
|
+
"zai-org/GLM-4.5-FP8",
|
|
1211
|
+
"zai-org/GLM-4.5-turbo",
|
|
1212
|
+
"zai-org/GLM-4.6-FP8",
|
|
1213
|
+
"zai-org/GLM-4.6-turbo"
|
|
1214
|
+
],
|
|
1215
|
+
cortecs: [
|
|
1216
|
+
"claude-sonnet-4",
|
|
1217
|
+
"deepseek-v3-0324",
|
|
1218
|
+
"gemini-2.5-pro",
|
|
1219
|
+
"gpt-4.1",
|
|
1220
|
+
"gpt-oss-120b",
|
|
1221
|
+
"kimi-k2-instruct",
|
|
1222
|
+
"llama-3.1-405b-instruct",
|
|
1223
|
+
"nova-pro-v1",
|
|
1224
|
+
"qwen3-32b",
|
|
1225
|
+
"qwen3-coder-480b-a35b-instruct"
|
|
1226
|
+
],
|
|
1227
|
+
"github-models": [
|
|
1228
|
+
"ai21-labs/ai21-jamba-1.5-large",
|
|
1229
|
+
"ai21-labs/ai21-jamba-1.5-mini",
|
|
1230
|
+
"cohere/cohere-command-a",
|
|
1231
|
+
"cohere/cohere-command-r",
|
|
1232
|
+
"cohere/cohere-command-r-08-2024",
|
|
1233
|
+
"cohere/cohere-command-r-plus",
|
|
1234
|
+
"cohere/cohere-command-r-plus-08-2024",
|
|
1235
|
+
"core42/jais-30b-chat",
|
|
1236
|
+
"deepseek/deepseek-r1",
|
|
1237
|
+
"deepseek/deepseek-r1-0528",
|
|
1238
|
+
"deepseek/deepseek-v3-0324",
|
|
1239
|
+
"meta/llama-3.2-11b-vision-instruct",
|
|
1240
|
+
"meta/llama-3.2-90b-vision-instruct",
|
|
1241
|
+
"meta/llama-3.3-70b-instruct",
|
|
1242
|
+
"meta/llama-4-maverick-17b-128e-instruct-fp8",
|
|
1243
|
+
"meta/llama-4-scout-17b-16e-instruct",
|
|
1244
|
+
"meta/meta-llama-3-70b-instruct",
|
|
1245
|
+
"meta/meta-llama-3-8b-instruct",
|
|
1246
|
+
"meta/meta-llama-3.1-405b-instruct",
|
|
1247
|
+
"meta/meta-llama-3.1-70b-instruct",
|
|
1248
|
+
"meta/meta-llama-3.1-8b-instruct",
|
|
1249
|
+
"microsoft/mai-ds-r1",
|
|
1250
|
+
"microsoft/phi-3-medium-128k-instruct",
|
|
1251
|
+
"microsoft/phi-3-medium-4k-instruct",
|
|
1252
|
+
"microsoft/phi-3-mini-128k-instruct",
|
|
1253
|
+
"microsoft/phi-3-mini-4k-instruct",
|
|
1254
|
+
"microsoft/phi-3-small-128k-instruct",
|
|
1255
|
+
"microsoft/phi-3-small-8k-instruct",
|
|
1256
|
+
"microsoft/phi-3.5-mini-instruct",
|
|
1257
|
+
"microsoft/phi-3.5-moe-instruct",
|
|
1258
|
+
"microsoft/phi-3.5-vision-instruct",
|
|
1259
|
+
"microsoft/phi-4",
|
|
1260
|
+
"microsoft/phi-4-mini-instruct",
|
|
1261
|
+
"microsoft/phi-4-mini-reasoning",
|
|
1262
|
+
"microsoft/phi-4-multimodal-instruct",
|
|
1263
|
+
"microsoft/phi-4-reasoning",
|
|
1264
|
+
"mistral-ai/codestral-2501",
|
|
1265
|
+
"mistral-ai/ministral-3b",
|
|
1266
|
+
"mistral-ai/mistral-large-2411",
|
|
1267
|
+
"mistral-ai/mistral-medium-2505",
|
|
1268
|
+
"mistral-ai/mistral-nemo",
|
|
1269
|
+
"mistral-ai/mistral-small-2503",
|
|
1270
|
+
"openai/gpt-4.1",
|
|
1271
|
+
"openai/gpt-4.1-mini",
|
|
1272
|
+
"openai/gpt-4.1-nano",
|
|
1273
|
+
"openai/gpt-4o",
|
|
1274
|
+
"openai/gpt-4o-mini",
|
|
1275
|
+
"openai/o1",
|
|
1276
|
+
"openai/o1-mini",
|
|
1277
|
+
"openai/o1-preview",
|
|
1278
|
+
"openai/o3",
|
|
1279
|
+
"openai/o3-mini",
|
|
1280
|
+
"openai/o4-mini",
|
|
1281
|
+
"xai/grok-3",
|
|
1282
|
+
"xai/grok-3-mini"
|
|
1283
|
+
],
|
|
1284
|
+
togetherai: [
|
|
1285
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
1286
|
+
"deepseek-ai/DeepSeek-R1",
|
|
1287
|
+
"deepseek-ai/DeepSeek-V3",
|
|
1288
|
+
"meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
|
1289
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
1290
|
+
"openai/gpt-oss-120b"
|
|
1291
|
+
],
|
|
1292
|
+
baseten: ["Qwen3/Qwen3-Coder-480B-A35B-Instruct", "moonshotai/Kimi-K2-Instruct-0905"],
|
|
1293
|
+
huggingface: [
|
|
1294
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1295
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
1296
|
+
"Qwen/Qwen3-Next-80B-A3B-Instruct",
|
|
1297
|
+
"Qwen/Qwen3-Next-80B-A3B-Thinking",
|
|
1298
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
1299
|
+
"deepseek-ai/Deepseek-V3-0324",
|
|
1300
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
1301
|
+
"moonshotai/Kimi-K2-Instruct-0905",
|
|
1302
|
+
"zai-org/GLM-4.5",
|
|
1303
|
+
"zai-org/GLM-4.5-Air",
|
|
1304
|
+
"zai-org/GLM-4.6"
|
|
1305
|
+
],
|
|
1306
|
+
opencode: [
|
|
1307
|
+
"claude-3-5-haiku",
|
|
1308
|
+
"claude-opus-4-1",
|
|
1309
|
+
"claude-sonnet-4",
|
|
1310
|
+
"claude-sonnet-4-5",
|
|
1311
|
+
"code-supernova",
|
|
1312
|
+
"glm-4.6",
|
|
1313
|
+
"gpt-5",
|
|
1314
|
+
"gpt-5-codex",
|
|
1315
|
+
"grok-code",
|
|
1316
|
+
"kimi-k2",
|
|
1317
|
+
"qwen3-coder"
|
|
1318
|
+
],
|
|
1319
|
+
fastrouter: [
|
|
1320
|
+
"anthropic/claude-opus-4.1",
|
|
1321
|
+
"anthropic/claude-sonnet-4",
|
|
1322
|
+
"deepseek-ai/deepseek-r1-distill-llama-70b",
|
|
1323
|
+
"google/gemini-2.5-flash",
|
|
1324
|
+
"google/gemini-2.5-pro",
|
|
1325
|
+
"moonshotai/kimi-k2",
|
|
1326
|
+
"openai/gpt-4.1",
|
|
1327
|
+
"openai/gpt-5",
|
|
1328
|
+
"openai/gpt-5-mini",
|
|
1329
|
+
"openai/gpt-5-nano",
|
|
1330
|
+
"openai/gpt-oss-120b",
|
|
1331
|
+
"openai/gpt-oss-20b",
|
|
1332
|
+
"qwen/qwen3-coder",
|
|
1333
|
+
"x-ai/grok-4"
|
|
1334
|
+
],
|
|
1335
|
+
google: [
|
|
1336
|
+
"gemini-1.5-flash",
|
|
1337
|
+
"gemini-1.5-flash-8b",
|
|
1338
|
+
"gemini-1.5-pro",
|
|
1339
|
+
"gemini-2.0-flash",
|
|
1340
|
+
"gemini-2.0-flash-lite",
|
|
1341
|
+
"gemini-2.5-flash",
|
|
1342
|
+
"gemini-2.5-flash-lite",
|
|
1343
|
+
"gemini-2.5-flash-lite-preview-06-17",
|
|
1344
|
+
"gemini-2.5-flash-lite-preview-09-2025",
|
|
1345
|
+
"gemini-2.5-flash-preview-04-17",
|
|
1346
|
+
"gemini-2.5-flash-preview-05-20",
|
|
1347
|
+
"gemini-2.5-flash-preview-09-2025",
|
|
1348
|
+
"gemini-2.5-pro",
|
|
1349
|
+
"gemini-2.5-pro-preview-05-06",
|
|
1350
|
+
"gemini-2.5-pro-preview-06-05",
|
|
1351
|
+
"gemini-flash-latest",
|
|
1352
|
+
"gemini-flash-lite-latest",
|
|
1353
|
+
"gemini-live-2.5-flash-preview-native-audio"
|
|
1354
|
+
],
|
|
1355
|
+
inception: ["mercury", "mercury-coder"],
|
|
1356
|
+
wandb: [
|
|
1357
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
1358
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1359
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
1360
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
1361
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
1362
|
+
"meta-llama/Llama-3.1-8B-Instruct",
|
|
1363
|
+
"meta-llama/Llama-3.3-70B-Instruct",
|
|
1364
|
+
"meta-llama/Llama-4-Scout-17B-16E-Instruct",
|
|
1365
|
+
"microsoft/Phi-4-mini-instruct",
|
|
1366
|
+
"moonshotai/Kimi-K2-Instruct"
|
|
1367
|
+
],
|
|
1368
|
+
openai: [
|
|
1369
|
+
"codex-mini-latest",
|
|
1370
|
+
"gpt-3.5-turbo",
|
|
1371
|
+
"gpt-4",
|
|
1372
|
+
"gpt-4-turbo",
|
|
1373
|
+
"gpt-4.1",
|
|
1374
|
+
"gpt-4.1-mini",
|
|
1375
|
+
"gpt-4.1-nano",
|
|
1376
|
+
"gpt-4o",
|
|
1377
|
+
"gpt-4o-2024-05-13",
|
|
1378
|
+
"gpt-4o-2024-08-06",
|
|
1379
|
+
"gpt-4o-2024-11-20",
|
|
1380
|
+
"gpt-4o-mini",
|
|
1381
|
+
"gpt-5",
|
|
1382
|
+
"gpt-5-chat-latest",
|
|
1383
|
+
"gpt-5-codex",
|
|
1384
|
+
"gpt-5-mini",
|
|
1385
|
+
"gpt-5-nano",
|
|
1386
|
+
"o1",
|
|
1387
|
+
"o1-mini",
|
|
1388
|
+
"o1-preview",
|
|
1389
|
+
"o1-pro",
|
|
1390
|
+
"o3",
|
|
1391
|
+
"o3-deep-research",
|
|
1392
|
+
"o3-mini",
|
|
1393
|
+
"o3-pro",
|
|
1394
|
+
"o4-mini",
|
|
1395
|
+
"o4-mini-deep-research"
|
|
1396
|
+
],
|
|
1397
|
+
"zhipuai-coding-plan": ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
1398
|
+
perplexity: ["sonar", "sonar-pro", "sonar-reasoning", "sonar-reasoning-pro"],
|
|
1399
|
+
openrouter: [
|
|
1400
|
+
"anthropic/claude-3.5-haiku",
|
|
1401
|
+
"anthropic/claude-3.7-sonnet",
|
|
1402
|
+
"anthropic/claude-opus-4",
|
|
1403
|
+
"anthropic/claude-opus-4.1",
|
|
1404
|
+
"anthropic/claude-sonnet-4",
|
|
1405
|
+
"anthropic/claude-sonnet-4.5",
|
|
1406
|
+
"cognitivecomputations/dolphin3.0-mistral-24b",
|
|
1407
|
+
"cognitivecomputations/dolphin3.0-r1-mistral-24b",
|
|
1408
|
+
"deepseek/deepseek-chat-v3-0324",
|
|
1409
|
+
"deepseek/deepseek-chat-v3.1",
|
|
1410
|
+
"deepseek/deepseek-r1-0528-qwen3-8b:free",
|
|
1411
|
+
"deepseek/deepseek-r1-0528:free",
|
|
1412
|
+
"deepseek/deepseek-r1-distill-llama-70b",
|
|
1413
|
+
"deepseek/deepseek-r1-distill-qwen-14b",
|
|
1414
|
+
"deepseek/deepseek-r1:free",
|
|
1415
|
+
"deepseek/deepseek-v3-base:free",
|
|
1416
|
+
"deepseek/deepseek-v3.1-terminus",
|
|
1417
|
+
"featherless/qwerky-72b",
|
|
1418
|
+
"google/gemini-2.0-flash-001",
|
|
1419
|
+
"google/gemini-2.0-flash-exp:free",
|
|
1420
|
+
"google/gemini-2.5-flash",
|
|
1421
|
+
"google/gemini-2.5-pro",
|
|
1422
|
+
"google/gemini-2.5-pro-preview-05-06",
|
|
1423
|
+
"google/gemini-2.5-pro-preview-06-05",
|
|
1424
|
+
"google/gemma-2-9b-it:free",
|
|
1425
|
+
"google/gemma-3-12b-it",
|
|
1426
|
+
"google/gemma-3-27b-it",
|
|
1427
|
+
"google/gemma-3n-e4b-it",
|
|
1428
|
+
"google/gemma-3n-e4b-it:free",
|
|
1429
|
+
"meta-llama/llama-3.2-11b-vision-instruct",
|
|
1430
|
+
"meta-llama/llama-3.3-70b-instruct:free",
|
|
1431
|
+
"meta-llama/llama-4-scout:free",
|
|
1432
|
+
"microsoft/mai-ds-r1:free",
|
|
1433
|
+
"mistralai/codestral-2508",
|
|
1434
|
+
"mistralai/devstral-medium-2507",
|
|
1435
|
+
"mistralai/devstral-small-2505",
|
|
1436
|
+
"mistralai/devstral-small-2505:free",
|
|
1437
|
+
"mistralai/devstral-small-2507",
|
|
1438
|
+
"mistralai/mistral-7b-instruct:free",
|
|
1439
|
+
"mistralai/mistral-medium-3",
|
|
1440
|
+
"mistralai/mistral-medium-3.1",
|
|
1441
|
+
"mistralai/mistral-nemo:free",
|
|
1442
|
+
"mistralai/mistral-small-3.1-24b-instruct",
|
|
1443
|
+
"mistralai/mistral-small-3.2-24b-instruct",
|
|
1444
|
+
"mistralai/mistral-small-3.2-24b-instruct:free",
|
|
1445
|
+
"moonshotai/kimi-dev-72b:free",
|
|
1446
|
+
"moonshotai/kimi-k2",
|
|
1447
|
+
"moonshotai/kimi-k2-0905",
|
|
1448
|
+
"moonshotai/kimi-k2:free",
|
|
1449
|
+
"nousresearch/deephermes-3-llama-3-8b-preview",
|
|
1450
|
+
"nousresearch/hermes-4-405b",
|
|
1451
|
+
"nousresearch/hermes-4-70b",
|
|
1452
|
+
"openai/gpt-4.1",
|
|
1453
|
+
"openai/gpt-4.1-mini",
|
|
1454
|
+
"openai/gpt-4o-mini",
|
|
1455
|
+
"openai/gpt-5",
|
|
1456
|
+
"openai/gpt-5-chat",
|
|
1457
|
+
"openai/gpt-5-codex",
|
|
1458
|
+
"openai/gpt-5-mini",
|
|
1459
|
+
"openai/gpt-5-nano",
|
|
1460
|
+
"openai/gpt-oss-120b",
|
|
1461
|
+
"openai/gpt-oss-20b",
|
|
1462
|
+
"openai/o4-mini",
|
|
1463
|
+
"openrouter/cypher-alpha:free",
|
|
1464
|
+
"openrouter/horizon-alpha",
|
|
1465
|
+
"openrouter/horizon-beta",
|
|
1466
|
+
"openrouter/sonoma-dusk-alpha",
|
|
1467
|
+
"openrouter/sonoma-sky-alpha",
|
|
1468
|
+
"qwen/qwen-2.5-coder-32b-instruct",
|
|
1469
|
+
"qwen/qwen2.5-vl-32b-instruct:free",
|
|
1470
|
+
"qwen/qwen2.5-vl-72b-instruct",
|
|
1471
|
+
"qwen/qwen2.5-vl-72b-instruct:free",
|
|
1472
|
+
"qwen/qwen3-14b:free",
|
|
1473
|
+
"qwen/qwen3-235b-a22b-07-25",
|
|
1474
|
+
"qwen/qwen3-235b-a22b-07-25:free",
|
|
1475
|
+
"qwen/qwen3-235b-a22b-thinking-2507",
|
|
1476
|
+
"qwen/qwen3-235b-a22b:free",
|
|
1477
|
+
"qwen/qwen3-30b-a3b-instruct-2507",
|
|
1478
|
+
"qwen/qwen3-30b-a3b:free",
|
|
1479
|
+
"qwen/qwen3-32b:free",
|
|
1480
|
+
"qwen/qwen3-8b:free",
|
|
1481
|
+
"qwen/qwen3-coder",
|
|
1482
|
+
"qwen/qwen3-coder:free",
|
|
1483
|
+
"qwen/qwen3-max",
|
|
1484
|
+
"qwen/qwen3-next-80b-a3b-instruct",
|
|
1485
|
+
"qwen/qwq-32b:free",
|
|
1486
|
+
"rekaai/reka-flash-3",
|
|
1487
|
+
"sarvamai/sarvam-m:free",
|
|
1488
|
+
"thudm/glm-z1-32b:free",
|
|
1489
|
+
"tngtech/deepseek-r1t2-chimera:free",
|
|
1490
|
+
"x-ai/grok-3",
|
|
1491
|
+
"x-ai/grok-3-beta",
|
|
1492
|
+
"x-ai/grok-3-mini",
|
|
1493
|
+
"x-ai/grok-3-mini-beta",
|
|
1494
|
+
"x-ai/grok-4",
|
|
1495
|
+
"x-ai/grok-4-fast",
|
|
1496
|
+
"x-ai/grok-4-fast:free",
|
|
1497
|
+
"x-ai/grok-code-fast-1",
|
|
1498
|
+
"z-ai/glm-4.5",
|
|
1499
|
+
"z-ai/glm-4.5-air",
|
|
1500
|
+
"z-ai/glm-4.5-air:free",
|
|
1501
|
+
"z-ai/glm-4.5v",
|
|
1502
|
+
"z-ai/glm-4.6"
|
|
1503
|
+
],
|
|
1504
|
+
synthetic: [
|
|
1505
|
+
"hf:Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
1506
|
+
"hf:Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
1507
|
+
"hf:Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1508
|
+
"hf:Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
1509
|
+
"hf:deepseek-ai/DeepSeek-R1",
|
|
1510
|
+
"hf:deepseek-ai/DeepSeek-R1-0528",
|
|
1511
|
+
"hf:deepseek-ai/DeepSeek-V3",
|
|
1512
|
+
"hf:deepseek-ai/DeepSeek-V3-0324",
|
|
1513
|
+
"hf:deepseek-ai/DeepSeek-V3.1",
|
|
1514
|
+
"hf:deepseek-ai/DeepSeek-V3.1-Terminus",
|
|
1515
|
+
"hf:meta-llama/Llama-3.1-405B-Instruct",
|
|
1516
|
+
"hf:meta-llama/Llama-3.1-70B-Instruct",
|
|
1517
|
+
"hf:meta-llama/Llama-3.1-8B-Instruct",
|
|
1518
|
+
"hf:meta-llama/Llama-3.3-70B-Instruct",
|
|
1519
|
+
"hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
|
|
1520
|
+
"hf:meta-llama/Llama-4-Scout-17B-16E-Instruct",
|
|
1521
|
+
"hf:moonshotai/Kimi-K2-Instruct",
|
|
1522
|
+
"hf:moonshotai/Kimi-K2-Instruct-0905",
|
|
1523
|
+
"hf:openai/gpt-oss-120b",
|
|
1524
|
+
"hf:zai-org/GLM-4.5",
|
|
1525
|
+
"hf:zai-org/GLM-4.6"
|
|
1526
|
+
],
|
|
1527
|
+
deepinfra: [
|
|
1528
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
1529
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo",
|
|
1530
|
+
"moonshotai/Kimi-K2-Instruct",
|
|
1531
|
+
"zai-org/GLM-4.5"
|
|
1532
|
+
],
|
|
1533
|
+
zhipuai: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
1534
|
+
submodel: [
|
|
1535
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
1536
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1537
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8",
|
|
1538
|
+
"deepseek-ai/DeepSeek-R1-0528",
|
|
1539
|
+
"deepseek-ai/DeepSeek-V3-0324",
|
|
1540
|
+
"deepseek-ai/DeepSeek-V3.1",
|
|
1541
|
+
"openai/gpt-oss-120b",
|
|
1542
|
+
"zai-org/GLM-4.5-Air",
|
|
1543
|
+
"zai-org/GLM-4.5-FP8"
|
|
1544
|
+
],
|
|
1545
|
+
zai: ["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v", "glm-4.6"],
|
|
1546
|
+
inference: [
|
|
1547
|
+
"google/gemma-3",
|
|
1548
|
+
"meta/llama-3.1-8b-instruct",
|
|
1549
|
+
"meta/llama-3.2-11b-vision-instruct",
|
|
1550
|
+
"meta/llama-3.2-1b-instruct",
|
|
1551
|
+
"meta/llama-3.2-3b-instruct",
|
|
1552
|
+
"mistral/mistral-nemo-12b-instruct",
|
|
1553
|
+
"osmosis/osmosis-structure-0.6b",
|
|
1554
|
+
"qwen/qwen-2.5-7b-vision-instruct",
|
|
1555
|
+
"qwen/qwen3-embedding-4b"
|
|
1556
|
+
],
|
|
1557
|
+
requesty: [
|
|
1558
|
+
"anthropic/claude-3-7-sonnet",
|
|
1559
|
+
"anthropic/claude-4-sonnet-20250522",
|
|
1560
|
+
"anthropic/claude-opus-4",
|
|
1561
|
+
"anthropic/claude-opus-4-1-20250805",
|
|
1562
|
+
"google/gemini-2.5-flash",
|
|
1563
|
+
"google/gemini-2.5-pro",
|
|
1564
|
+
"openai/gpt-4.1",
|
|
1565
|
+
"openai/gpt-4.1-mini",
|
|
1566
|
+
"openai/gpt-4o-mini",
|
|
1567
|
+
"openai/gpt-5",
|
|
1568
|
+
"openai/gpt-5-mini",
|
|
1569
|
+
"openai/gpt-5-nano",
|
|
1570
|
+
"openai/o4-mini"
|
|
1571
|
+
],
|
|
1572
|
+
morph: ["auto", "morph-v3-fast", "morph-v3-large"],
|
|
1573
|
+
lmstudio: ["openai/gpt-oss-20b", "qwen/qwen3-30b-a3b-2507", "qwen/qwen3-coder-30b"],
|
|
1574
|
+
anthropic: [
|
|
1575
|
+
"claude-3-5-haiku-20241022",
|
|
1576
|
+
"claude-3-5-sonnet-20240620",
|
|
1577
|
+
"claude-3-5-sonnet-20241022",
|
|
1578
|
+
"claude-3-7-sonnet-20250219",
|
|
1579
|
+
"claude-3-haiku-20240307",
|
|
1580
|
+
"claude-3-opus-20240229",
|
|
1581
|
+
"claude-3-sonnet-20240229",
|
|
1582
|
+
"claude-opus-4-1-20250805",
|
|
1583
|
+
"claude-opus-4-20250514",
|
|
1584
|
+
"claude-sonnet-4-20250514",
|
|
1585
|
+
"claude-sonnet-4-5-20250929"
|
|
1586
|
+
],
|
|
1587
|
+
"fireworks-ai": [
|
|
1588
|
+
"accounts/fireworks/models/deepseek-r1-0528",
|
|
1589
|
+
"accounts/fireworks/models/deepseek-v3-0324",
|
|
1590
|
+
"accounts/fireworks/models/deepseek-v3p1",
|
|
1591
|
+
"accounts/fireworks/models/glm-4p5",
|
|
1592
|
+
"accounts/fireworks/models/glm-4p5-air",
|
|
1593
|
+
"accounts/fireworks/models/gpt-oss-120b",
|
|
1594
|
+
"accounts/fireworks/models/gpt-oss-20b",
|
|
1595
|
+
"accounts/fireworks/models/kimi-k2-instruct",
|
|
1596
|
+
"accounts/fireworks/models/qwen3-235b-a22b",
|
|
1597
|
+
"accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
|
|
1598
|
+
],
|
|
1599
|
+
modelscope: [
|
|
1600
|
+
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
1601
|
+
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
1602
|
+
"Qwen/Qwen3-30B-A3B-Instruct-2507",
|
|
1603
|
+
"Qwen/Qwen3-30B-A3B-Thinking-2507",
|
|
1604
|
+
"Qwen/Qwen3-Coder-30B-A3B-Instruct",
|
|
1605
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
1606
|
+
"ZhipuAI/GLM-4.5"
|
|
1607
|
+
],
|
|
1608
|
+
llama: [
|
|
1609
|
+
"cerebras-llama-4-maverick-17b-128e-instruct",
|
|
1610
|
+
"cerebras-llama-4-scout-17b-16e-instruct",
|
|
1611
|
+
"groq-llama-4-maverick-17b-128e-instruct",
|
|
1612
|
+
"llama-3.3-70b-instruct",
|
|
1613
|
+
"llama-3.3-8b-instruct",
|
|
1614
|
+
"llama-4-maverick-17b-128e-instruct-fp8",
|
|
1615
|
+
"llama-4-scout-17b-16e-instruct-fp8"
|
|
1616
|
+
],
|
|
1617
|
+
cerebras: ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "qwen-3-coder-480b"],
|
|
1618
|
+
netlify: [
|
|
1619
|
+
"anthropic/claude-3-5-haiku-20241022",
|
|
1620
|
+
"anthropic/claude-3-5-haiku-latest",
|
|
1621
|
+
"anthropic/claude-3-7-sonnet-20250219",
|
|
1622
|
+
"anthropic/claude-3-7-sonnet-latest",
|
|
1623
|
+
"anthropic/claude-3-haiku-20240307",
|
|
1624
|
+
"anthropic/claude-opus-4-1-20250805",
|
|
1625
|
+
"anthropic/claude-opus-4-20250514",
|
|
1626
|
+
"anthropic/claude-sonnet-4-20250514",
|
|
1627
|
+
"anthropic/claude-sonnet-4-5-20250929",
|
|
1628
|
+
"gemini/gemini-2.0-flash",
|
|
1629
|
+
"gemini/gemini-2.0-flash-lite",
|
|
1630
|
+
"gemini/gemini-2.5-flash",
|
|
1631
|
+
"gemini/gemini-2.5-flash-image-preview",
|
|
1632
|
+
"gemini/gemini-2.5-flash-lite",
|
|
1633
|
+
"gemini/gemini-2.5-flash-lite-preview-09-2025",
|
|
1634
|
+
"gemini/gemini-2.5-flash-preview-09-2025",
|
|
1635
|
+
"gemini/gemini-2.5-pro",
|
|
1636
|
+
"gemini/gemini-flash-latest",
|
|
1637
|
+
"gemini/gemini-flash-lite-latest",
|
|
1638
|
+
"openai/codex-mini-latest",
|
|
1639
|
+
"openai/gpt-4.1",
|
|
1640
|
+
"openai/gpt-4.1-mini",
|
|
1641
|
+
"openai/gpt-4.1-nano",
|
|
1642
|
+
"openai/gpt-4o",
|
|
1643
|
+
"openai/gpt-4o-mini",
|
|
1644
|
+
"openai/gpt-5",
|
|
1645
|
+
"openai/gpt-5-codex",
|
|
1646
|
+
"openai/gpt-5-mini",
|
|
1647
|
+
"openai/gpt-5-nano",
|
|
1648
|
+
"openai/gpt-5-pro",
|
|
1649
|
+
"openai/o3",
|
|
1650
|
+
"openai/o3-mini",
|
|
1651
|
+
"openai/o4-mini"
|
|
1652
|
+
]
|
|
1653
|
+
},
|
|
1654
|
+
version: "1.0.0"
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
// src/llm/model/provider-registry.ts
|
|
1658
|
+
var registryData = null;
|
|
1659
|
+
var CACHE_DIR = path.join(os.homedir(), ".cache", "mastra");
|
|
1660
|
+
var CACHE_FILE = path.join(CACHE_DIR, "gateway-refresh-time");
|
|
1661
|
+
var modelRouterCacheFailed = false;
|
|
1662
|
+
function getLastRefreshTimeFromDisk() {
|
|
1663
|
+
try {
|
|
1664
|
+
if (!fs.existsSync(CACHE_FILE)) {
|
|
1665
|
+
return null;
|
|
1666
|
+
}
|
|
1667
|
+
const timestamp = fs.readFileSync(CACHE_FILE, "utf-8").trim();
|
|
1668
|
+
return new Date(parseInt(timestamp, 10));
|
|
1669
|
+
} catch (err) {
|
|
1670
|
+
console.warn("[GatewayRegistry] Failed to read cache file:", err);
|
|
1671
|
+
modelRouterCacheFailed = true;
|
|
1672
|
+
return null;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
function saveLastRefreshTimeToDisk(date) {
|
|
1676
|
+
try {
|
|
1677
|
+
if (!fs.existsSync(CACHE_DIR)) {
|
|
1678
|
+
fs.mkdirSync(CACHE_DIR, { recursive: true });
|
|
1679
|
+
}
|
|
1680
|
+
fs.writeFileSync(CACHE_FILE, date.getTime().toString(), "utf-8");
|
|
1681
|
+
} catch (err) {
|
|
1682
|
+
modelRouterCacheFailed = true;
|
|
1683
|
+
console.warn("[GatewayRegistry] Failed to write cache file:", err);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
function getPackageRoot() {
|
|
1687
|
+
try {
|
|
1688
|
+
const require2 = createRequire(import.meta.url || "file://");
|
|
1689
|
+
const packageJsonPath = require2.resolve("@mastra/core/package.json");
|
|
1690
|
+
return path.dirname(packageJsonPath);
|
|
1691
|
+
} catch {
|
|
1692
|
+
return process.cwd();
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
function loadRegistry(useDynamicLoading) {
|
|
1696
|
+
if (!useDynamicLoading) {
|
|
1697
|
+
return provider_registry_default;
|
|
1698
|
+
}
|
|
1699
|
+
if (registryData) {
|
|
1700
|
+
return registryData;
|
|
1701
|
+
}
|
|
1702
|
+
const packageRoot = getPackageRoot();
|
|
1703
|
+
const possiblePaths = [
|
|
1704
|
+
// Built: in dist/ relative to package root (first priority - what gets distributed)
|
|
1705
|
+
path.join(packageRoot, "dist", "provider-registry.json"),
|
|
1706
|
+
// Development: in src/ relative to package root
|
|
1707
|
+
path.join(packageRoot, "src", "llm", "model", "provider-registry.json"),
|
|
1708
|
+
// Fallback: relative to cwd (for monorepo setups)
|
|
1709
|
+
path.join(process.cwd(), "packages/core/src/llm/model/provider-registry.json"),
|
|
1710
|
+
path.join(process.cwd(), "src/llm/model/provider-registry.json")
|
|
1711
|
+
];
|
|
1712
|
+
const errors = [];
|
|
1713
|
+
for (const jsonPath of possiblePaths) {
|
|
1714
|
+
try {
|
|
1715
|
+
const content = fs.readFileSync(jsonPath, "utf-8");
|
|
1716
|
+
registryData = JSON.parse(content);
|
|
1717
|
+
return registryData;
|
|
1718
|
+
} catch (err) {
|
|
1719
|
+
errors.push(`${jsonPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
1720
|
+
continue;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
throw new Error(
|
|
1724
|
+
`Failed to load provider registry with dynamic loading. Make sure provider-registry.json is generated by running: npm run generate:providers
|
|
1725
|
+
|
|
1726
|
+
Tried paths:
|
|
1727
|
+
${errors.join("\n")}`
|
|
1728
|
+
);
|
|
1729
|
+
}
|
|
1730
|
+
var PROVIDER_REGISTRY = new Proxy({}, {
|
|
1731
|
+
get(_target, prop) {
|
|
1732
|
+
const registry = GatewayRegistry.getInstance();
|
|
1733
|
+
const providers = registry.getProviders();
|
|
1734
|
+
return providers[prop];
|
|
1735
|
+
},
|
|
1736
|
+
ownKeys() {
|
|
1737
|
+
const registry = GatewayRegistry.getInstance();
|
|
1738
|
+
const providers = registry.getProviders();
|
|
1739
|
+
return Object.keys(providers);
|
|
1740
|
+
},
|
|
1741
|
+
has(_target, prop) {
|
|
1742
|
+
const registry = GatewayRegistry.getInstance();
|
|
1743
|
+
const providers = registry.getProviders();
|
|
1744
|
+
return prop in providers;
|
|
1745
|
+
},
|
|
1746
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
1747
|
+
const registry = GatewayRegistry.getInstance();
|
|
1748
|
+
const providers = registry.getProviders();
|
|
1749
|
+
if (prop in providers) {
|
|
1750
|
+
return {
|
|
1751
|
+
enumerable: true,
|
|
1752
|
+
configurable: true
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
return void 0;
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
new Proxy({}, {
|
|
1759
|
+
get(_target, prop) {
|
|
1760
|
+
const registry = GatewayRegistry.getInstance();
|
|
1761
|
+
const models = registry.getModels();
|
|
1762
|
+
return models[prop];
|
|
1763
|
+
},
|
|
1764
|
+
ownKeys() {
|
|
1765
|
+
const registry = GatewayRegistry.getInstance();
|
|
1766
|
+
const models = registry.getModels();
|
|
1767
|
+
return Object.keys(models);
|
|
1768
|
+
},
|
|
1769
|
+
has(_target, prop) {
|
|
1770
|
+
const registry = GatewayRegistry.getInstance();
|
|
1771
|
+
const models = registry.getModels();
|
|
1772
|
+
return prop in models;
|
|
1773
|
+
},
|
|
1774
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
1775
|
+
const registry = GatewayRegistry.getInstance();
|
|
1776
|
+
const models = registry.getModels();
|
|
1777
|
+
if (prop in models) {
|
|
1778
|
+
return {
|
|
1779
|
+
enumerable: true,
|
|
1780
|
+
configurable: true
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
return void 0;
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
function parseModelString(modelString) {
|
|
1787
|
+
const firstSlashIndex = modelString.indexOf("/");
|
|
1788
|
+
if (firstSlashIndex !== -1) {
|
|
1789
|
+
const provider = modelString.substring(0, firstSlashIndex);
|
|
1790
|
+
const modelId = modelString.substring(firstSlashIndex + 1);
|
|
1791
|
+
if (provider && modelId) {
|
|
1792
|
+
return {
|
|
1793
|
+
provider,
|
|
1794
|
+
modelId
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
return {
|
|
1799
|
+
provider: null,
|
|
1800
|
+
modelId: modelString
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
function getProviderConfig(providerId) {
|
|
1804
|
+
const registry = GatewayRegistry.getInstance();
|
|
1805
|
+
return registry.getProviderConfig(providerId);
|
|
1806
|
+
}
|
|
1807
|
+
var GatewayRegistry = class _GatewayRegistry {
|
|
1808
|
+
static instance = null;
|
|
1809
|
+
lastRefreshTime = null;
|
|
1810
|
+
refreshInterval = null;
|
|
1811
|
+
isRefreshing = false;
|
|
1812
|
+
useDynamicLoading;
|
|
1813
|
+
constructor(options = {}) {
|
|
1814
|
+
const isDev2 = process.env.MASTRA_DEV === "true" || process.env.MASTRA_DEV === "1";
|
|
1815
|
+
this.useDynamicLoading = options.useDynamicLoading ?? isDev2;
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Get the singleton instance
|
|
1819
|
+
*/
|
|
1820
|
+
static getInstance(options) {
|
|
1821
|
+
if (!_GatewayRegistry.instance) {
|
|
1822
|
+
_GatewayRegistry.instance = new _GatewayRegistry(options);
|
|
1823
|
+
}
|
|
1824
|
+
return _GatewayRegistry.instance;
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* Sync providers from all gateways
|
|
1828
|
+
* Requires dynamic loading to be enabled (useDynamicLoading=true).
|
|
1829
|
+
* @param forceRefresh - Force refresh even if recently synced
|
|
1830
|
+
* @param writeToSrc - Write to src/ directory in addition to dist/ (useful for manual generation in repo)
|
|
1831
|
+
*/
|
|
1832
|
+
async syncGateways(forceRefresh = false, writeToSrc = false) {
|
|
1833
|
+
if (!this.useDynamicLoading && !writeToSrc) {
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
if (this.isRefreshing && !forceRefresh) {
|
|
1837
|
+
return;
|
|
1838
|
+
}
|
|
1839
|
+
this.isRefreshing = true;
|
|
1840
|
+
try {
|
|
1841
|
+
const { ModelsDevGateway: ModelsDevGateway2 } = await import('./models-dev-A334FF64.js');
|
|
1842
|
+
const { NetlifyGateway: NetlifyGateway2 } = await import('./netlify-CEYZ5O54.js');
|
|
1843
|
+
const { fetchProvidersFromGateways, writeRegistryFiles } = await import('./registry-generator-ZKIT6I3E.js');
|
|
1844
|
+
const gateways2 = [new ModelsDevGateway2({}), new NetlifyGateway2()];
|
|
1845
|
+
const { providers, models } = await fetchProvidersFromGateways(gateways2);
|
|
1846
|
+
const packageRoot = getPackageRoot();
|
|
1847
|
+
const distJsonPath = path.join(packageRoot, "dist", "provider-registry.json");
|
|
1848
|
+
const distTypesPath = path.join(packageRoot, "dist", "llm", "model", "provider-types.generated.d.ts");
|
|
1849
|
+
await writeRegistryFiles(distJsonPath, distTypesPath, providers, models);
|
|
1850
|
+
if (writeToSrc || this.useDynamicLoading) {
|
|
1851
|
+
const srcJsonPath = path.join(packageRoot, "src", "llm", "model", "provider-registry.json");
|
|
1852
|
+
const srcTypesPath = path.join(packageRoot, "src", "llm", "model", "provider-types.generated.d.ts");
|
|
1853
|
+
await fs.promises.copyFile(distJsonPath, srcJsonPath);
|
|
1854
|
+
await fs.promises.copyFile(distTypesPath, srcTypesPath);
|
|
1855
|
+
}
|
|
1856
|
+
if (this.useDynamicLoading) {
|
|
1857
|
+
registryData = null;
|
|
1858
|
+
}
|
|
1859
|
+
this.lastRefreshTime = /* @__PURE__ */ new Date();
|
|
1860
|
+
saveLastRefreshTimeToDisk(this.lastRefreshTime);
|
|
1861
|
+
} catch (error) {
|
|
1862
|
+
console.error("[GatewayRegistry] \u274C Gateway sync failed:", error);
|
|
1863
|
+
throw error;
|
|
1864
|
+
} finally {
|
|
1865
|
+
this.isRefreshing = false;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Get the last refresh time (from memory or disk cache)
|
|
1870
|
+
*/
|
|
1871
|
+
getLastRefreshTime() {
|
|
1872
|
+
return this.lastRefreshTime || getLastRefreshTimeFromDisk();
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Start auto-refresh on an interval
|
|
1876
|
+
* Requires dynamic loading to be enabled (useDynamicLoading=true).
|
|
1877
|
+
* @param intervalMs - Interval in milliseconds (default: 1 hour)
|
|
1878
|
+
*/
|
|
1879
|
+
startAutoRefresh(intervalMs = 60 * 60 * 1e3) {
|
|
1880
|
+
if (!this.useDynamicLoading) {
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
if (this.refreshInterval) {
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
const lastRefresh = getLastRefreshTimeFromDisk();
|
|
1887
|
+
const now = Date.now();
|
|
1888
|
+
const shouldRefresh = !modelRouterCacheFailed && (!lastRefresh || now - lastRefresh.getTime() > intervalMs);
|
|
1889
|
+
if (shouldRefresh) {
|
|
1890
|
+
this.syncGateways().catch((err) => {
|
|
1891
|
+
console.error("[GatewayRegistry] Initial auto-refresh failed:", err);
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
this.refreshInterval = setInterval(() => {
|
|
1895
|
+
if (modelRouterCacheFailed && this.refreshInterval) {
|
|
1896
|
+
clearInterval(this.refreshInterval);
|
|
1897
|
+
this.refreshInterval = null;
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
this.syncGateways().catch((err) => {
|
|
1901
|
+
console.error("[GatewayRegistry] Auto-refresh failed:", err);
|
|
1902
|
+
});
|
|
1903
|
+
}, intervalMs);
|
|
1904
|
+
if (this.refreshInterval.unref) {
|
|
1905
|
+
this.refreshInterval.unref();
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* Stop auto-refresh
|
|
1910
|
+
*/
|
|
1911
|
+
stopAutoRefresh() {
|
|
1912
|
+
if (this.refreshInterval) {
|
|
1913
|
+
clearInterval(this.refreshInterval);
|
|
1914
|
+
this.refreshInterval = null;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
/**
|
|
1918
|
+
* Get provider configuration by ID
|
|
1919
|
+
*/
|
|
1920
|
+
getProviderConfig(providerId) {
|
|
1921
|
+
const data = loadRegistry(this.useDynamicLoading);
|
|
1922
|
+
return data.providers[providerId];
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Check if a provider is registered
|
|
1926
|
+
*/
|
|
1927
|
+
isProviderRegistered(providerId) {
|
|
1928
|
+
const data = loadRegistry(this.useDynamicLoading);
|
|
1929
|
+
return providerId in data.providers;
|
|
1930
|
+
}
|
|
1931
|
+
/**
|
|
1932
|
+
* Get all registered providers
|
|
1933
|
+
*/
|
|
1934
|
+
getProviders() {
|
|
1935
|
+
const data = loadRegistry(this.useDynamicLoading);
|
|
1936
|
+
return data.providers;
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Get all models
|
|
1940
|
+
*/
|
|
1941
|
+
getModels() {
|
|
1942
|
+
return loadRegistry(this.useDynamicLoading).models;
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
var isDev = process.env.MASTRA_DEV === "true" || process.env.MASTRA_DEV === "1";
|
|
1946
|
+
var autoRefreshEnabled = process.env.MASTRA_AUTO_REFRESH_PROVIDERS === "true" || process.env.MASTRA_AUTO_REFRESH_PROVIDERS !== "false" && isDev;
|
|
1947
|
+
if (autoRefreshEnabled) {
|
|
1948
|
+
GatewayRegistry.getInstance({ useDynamicLoading: isDev }).startAutoRefresh();
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
// src/llm/model/router.ts
|
|
1952
|
+
function getStaticProvidersByGateway(name) {
|
|
1953
|
+
return Object.fromEntries(Object.entries(PROVIDER_REGISTRY).filter(([_provider, config]) => config.gateway === name));
|
|
1954
|
+
}
|
|
1955
|
+
var gateways = [new NetlifyGateway(), new ModelsDevGateway(getStaticProvidersByGateway(`models.dev`))];
|
|
1956
|
+
var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
|
|
1957
|
+
specificationVersion = "v2";
|
|
1958
|
+
defaultObjectGenerationMode = "json";
|
|
1959
|
+
supportsStructuredOutputs = true;
|
|
1960
|
+
supportsImageUrls = true;
|
|
1961
|
+
supportedUrls = {};
|
|
1962
|
+
modelId;
|
|
1963
|
+
provider;
|
|
1964
|
+
config;
|
|
1965
|
+
gateway;
|
|
1966
|
+
constructor(config) {
|
|
1967
|
+
let normalizedConfig;
|
|
1968
|
+
if (typeof config === "string") {
|
|
1969
|
+
normalizedConfig = { id: config };
|
|
1970
|
+
} else if ("providerId" in config && "modelId" in config) {
|
|
1971
|
+
normalizedConfig = {
|
|
1972
|
+
id: `${config.providerId}/${config.modelId}`,
|
|
1973
|
+
url: config.url,
|
|
1974
|
+
apiKey: config.apiKey,
|
|
1975
|
+
headers: config.headers
|
|
1976
|
+
};
|
|
1977
|
+
} else {
|
|
1978
|
+
normalizedConfig = {
|
|
1979
|
+
id: config.id,
|
|
1980
|
+
url: config.url,
|
|
1981
|
+
apiKey: config.apiKey,
|
|
1982
|
+
headers: config.headers
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
const parsedConfig = {
|
|
1986
|
+
...normalizedConfig,
|
|
1987
|
+
routerId: normalizedConfig.id
|
|
1988
|
+
};
|
|
1989
|
+
this.gateway = findGatewayForModel(normalizedConfig.id, gateways);
|
|
1990
|
+
const parsed = parseModelRouterId(normalizedConfig.id, this.gateway.prefix);
|
|
1991
|
+
this.provider = parsed.providerId || "openai-compatible";
|
|
1992
|
+
if (parsed.providerId && parsed.modelId !== normalizedConfig.id) {
|
|
1993
|
+
parsedConfig.id = parsed.modelId;
|
|
1994
|
+
}
|
|
1995
|
+
this.modelId = parsedConfig.id;
|
|
1996
|
+
this.config = parsedConfig;
|
|
1997
|
+
}
|
|
1998
|
+
async doGenerate() {
|
|
1999
|
+
throw new Error(
|
|
2000
|
+
"doGenerate is not supported by Mastra model router. Mastra only uses streaming (doStream) for all LLM calls."
|
|
2001
|
+
);
|
|
2002
|
+
}
|
|
2003
|
+
async doStream(options) {
|
|
2004
|
+
let apiKey;
|
|
2005
|
+
try {
|
|
2006
|
+
apiKey = this.config.apiKey || await this.gateway.getApiKey(this.config.routerId);
|
|
2007
|
+
} catch (error) {
|
|
2008
|
+
return {
|
|
2009
|
+
stream: new ReadableStream({
|
|
2010
|
+
start(controller) {
|
|
2011
|
+
controller.enqueue({
|
|
2012
|
+
type: "error",
|
|
2013
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
})
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
const model = await this.resolveLanguageModel({
|
|
2020
|
+
apiKey,
|
|
2021
|
+
...parseModelRouterId(this.config.routerId, this.gateway.prefix)
|
|
2022
|
+
});
|
|
2023
|
+
return model.doStream(options);
|
|
2024
|
+
}
|
|
2025
|
+
async resolveLanguageModel({
|
|
2026
|
+
modelId,
|
|
2027
|
+
providerId,
|
|
2028
|
+
apiKey
|
|
2029
|
+
}) {
|
|
2030
|
+
const key = createHash("sha256").update(this.gateway.name + modelId + providerId + apiKey + (this.config.url || "")).digest("hex");
|
|
2031
|
+
if (_ModelRouterLanguageModel.modelInstances.has(key)) return _ModelRouterLanguageModel.modelInstances.get(key);
|
|
2032
|
+
if (this.config.url) {
|
|
2033
|
+
const modelInstance2 = createOpenAICompatible({
|
|
2034
|
+
name: providerId,
|
|
2035
|
+
apiKey,
|
|
2036
|
+
baseURL: this.config.url,
|
|
2037
|
+
headers: this.config.headers
|
|
2038
|
+
}).chatModel(modelId);
|
|
2039
|
+
_ModelRouterLanguageModel.modelInstances.set(key, modelInstance2);
|
|
2040
|
+
return modelInstance2;
|
|
2041
|
+
}
|
|
2042
|
+
const modelInstance = await this.gateway.resolveLanguageModel({ modelId, providerId, apiKey });
|
|
2043
|
+
_ModelRouterLanguageModel.modelInstances.set(key, modelInstance);
|
|
2044
|
+
return modelInstance;
|
|
2045
|
+
}
|
|
2046
|
+
static modelInstances = /* @__PURE__ */ new Map();
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
// src/llm/model/resolve-model.ts
|
|
2050
|
+
function isOpenAICompatibleObjectConfig(modelConfig) {
|
|
2051
|
+
if (typeof modelConfig === "object" && "specificationVersion" in modelConfig) return false;
|
|
2052
|
+
if (typeof modelConfig === "object" && !("model" in modelConfig)) {
|
|
2053
|
+
if ("id" in modelConfig) return true;
|
|
2054
|
+
if ("providerId" in modelConfig && "modelId" in modelConfig) return true;
|
|
2055
|
+
}
|
|
2056
|
+
return false;
|
|
2057
|
+
}
|
|
2058
|
+
async function resolveModelConfig(modelConfig, runtimeContext = new RuntimeContext(), mastra) {
|
|
2059
|
+
if (typeof modelConfig === "object" && "specificationVersion" in modelConfig) {
|
|
2060
|
+
return modelConfig;
|
|
2061
|
+
}
|
|
2062
|
+
if (typeof modelConfig === "string" || isOpenAICompatibleObjectConfig(modelConfig)) {
|
|
2063
|
+
return new ModelRouterLanguageModel(modelConfig);
|
|
2064
|
+
}
|
|
2065
|
+
if (typeof modelConfig === "function") {
|
|
2066
|
+
const fromDynamic = await modelConfig({ runtimeContext, mastra });
|
|
2067
|
+
if (typeof fromDynamic === "string" || isOpenAICompatibleObjectConfig(fromDynamic)) {
|
|
2068
|
+
return new ModelRouterLanguageModel(fromDynamic);
|
|
2069
|
+
}
|
|
2070
|
+
return fromDynamic;
|
|
2071
|
+
}
|
|
2072
|
+
throw new Error("Invalid model configuration provided");
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
export { ModelRouterLanguageModel, PROVIDER_REGISTRY, getProviderConfig, parseModelString, resolveModelConfig };
|
|
2076
|
+
//# sourceMappingURL=chunk-33JJWAVI.js.map
|
|
2077
|
+
//# sourceMappingURL=chunk-33JJWAVI.js.map
|