

























@@ -1,10 +1,17 @@
1+import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
12import { fetchWithTimeout } from "openclaw/plugin-sdk/provider-http";
23import type { ModelDefinitionConfig } from "openclaw/plugin-sdk/provider-model-shared";
34import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
5+import manifest from "./openclaw.plugin.json" with { type: "json" };
4657const log = createSubsystemLogger("deepinfra-models");
687-export const DEEPINFRA_BASE_URL = "https://api.deepinfra.com/v1/openai";
9+const DEEPINFRA_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
10+providerId: "deepinfra",
11+catalog: manifest.modelCatalog.providers.deepinfra,
12+});
13+14+export const DEEPINFRA_BASE_URL = DEEPINFRA_MANIFEST_PROVIDER.baseUrl;
815export const DEEPINFRA_MODELS_URL = `${DEEPINFRA_BASE_URL}/models?sort_by=openclaw&filter=with_meta`;
9161017export const DEEPINFRA_DEFAULT_MODEL_ID = "deepseek-ai/DeepSeek-V3.2";
@@ -13,71 +20,7 @@ export const DEEPINFRA_DEFAULT_MODEL_REF = `deepinfra/${DEEPINFRA_DEFAULT_MODEL_
1320const DEEPINFRA_DEFAULT_CONTEXT_WINDOW = 128000;
1421const DEEPINFRA_DEFAULT_MAX_TOKENS = 8192;
152216-export const DEEPINFRA_MODEL_CATALOG: ModelDefinitionConfig[] = [
17-{
18-id: "deepseek-ai/DeepSeek-V3.2",
19-name: "DeepSeek V3.2",
20-reasoning: false,
21-input: ["text"],
22-contextWindow: 163840,
23-maxTokens: 163840,
24-cost: { input: 0.26, output: 0.38, cacheRead: 0.13, cacheWrite: 0 },
25-},
26-{
27-id: "zai-org/GLM-5.1",
28-name: "GLM-5.1",
29-reasoning: true,
30-input: ["text"],
31-contextWindow: 202752,
32-maxTokens: 202752,
33-cost: { input: 1.05, output: 3.5, cacheRead: 0.205000005, cacheWrite: 0 },
34-},
35-{
36-id: "stepfun-ai/Step-3.5-Flash",
37-name: "Step 3.5 Flash",
38-reasoning: false,
39-input: ["text"],
40-contextWindow: 262144,
41-maxTokens: 262144,
42-cost: { input: 0.1, output: 0.3, cacheRead: 0.02, cacheWrite: 0 },
43-},
44-{
45-id: "MiniMaxAI/MiniMax-M2.5",
46-name: "MiniMax M2.5",
47-reasoning: true,
48-input: ["text"],
49-contextWindow: 196608,
50-maxTokens: 196608,
51-cost: { input: 0.15, output: 1.15, cacheRead: 0.03, cacheWrite: 0 },
52-},
53-{
54-id: "moonshotai/Kimi-K2.5",
55-name: "Kimi K2.5",
56-reasoning: true,
57-input: ["text", "image"],
58-contextWindow: 262144,
59-maxTokens: 262144,
60-cost: { input: 0.45, output: 2.25, cacheRead: 0.070000002, cacheWrite: 0 },
61-},
62-{
63-id: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B",
64-name: "NVIDIA Nemotron 3 Super 120B A12B",
65-reasoning: true,
66-input: ["text"],
67-contextWindow: 262144,
68-maxTokens: 262144,
69-cost: { input: 0.1, output: 0.5, cacheRead: 0, cacheWrite: 0 },
70-},
71-{
72-id: "meta-llama/Llama-3.3-70B-Instruct-Turbo",
73-name: "Llama 3.3 70B Instruct Turbo",
74-reasoning: false,
75-input: ["text"],
76-contextWindow: 131072,
77-maxTokens: 131072,
78-cost: { input: 0.1, output: 0.32, cacheRead: 0, cacheWrite: 0 },
79-},
80-];
23+export const DEEPINFRA_MODEL_CATALOG: ModelDefinitionConfig[] = DEEPINFRA_MANIFEST_PROVIDER.models;
81248225const DISCOVERY_TIMEOUT_MS = 5000;
8326const DISCOVERY_CACHE_TTL_MS = 5 * 60 * 1000;
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。