refactor: remove stale provider helpers · openclaw/openclaw@bf7ac8d
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -34,10 +34,6 @@ const arceeOpenRouterPresetAppliers = createModelCatalogPresetAppliers({
|
34 | 34 | }), |
35 | 35 | }); |
36 | 36 | |
37 | | -export function applyArceeProviderConfig(cfg: OpenClawConfig): OpenClawConfig { |
38 | | -return arceePresetAppliers.applyProviderConfig(cfg); |
39 | | -} |
40 | | - |
41 | 37 | export function applyArceeConfig(cfg: OpenClawConfig): OpenClawConfig { |
42 | 38 | return arceePresetAppliers.applyConfig(cfg); |
43 | 39 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -19,10 +19,6 @@ export function normalizeArceeOpenRouterBaseUrl(baseUrl: string | undefined): st
|
19 | 19 | return undefined; |
20 | 20 | } |
21 | 21 | |
22 | | -export function isArceeOpenRouterBaseUrl(baseUrl: string | undefined): boolean { |
23 | | -return normalizeArceeOpenRouterBaseUrl(baseUrl) === OPENROUTER_BASE_URL; |
24 | | -} |
25 | | - |
26 | 22 | export function toArceeOpenRouterModelId(modelId: string): string { |
27 | 23 | const normalized = modelId.trim(); |
28 | 24 | if (!normalized || normalized.startsWith("arcee/")) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,8 +15,6 @@ const BYTEPLUS_CODING_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
15 | 15 | export const BYTEPLUS_BASE_URL = BYTEPLUS_MANIFEST_PROVIDER.baseUrl; |
16 | 16 | export const BYTEPLUS_CODING_BASE_URL = BYTEPLUS_CODING_MANIFEST_PROVIDER.baseUrl; |
17 | 17 | export const BYTEPLUS_DEFAULT_MODEL_ID = "seed-1-8-251228"; |
18 | | -export const BYTEPLUS_CODING_DEFAULT_MODEL_ID = "ark-code-latest"; |
19 | | -export const BYTEPLUS_DEFAULT_MODEL_REF = `byteplus/${BYTEPLUS_DEFAULT_MODEL_ID}`; |
20 | 18 | |
21 | 19 | export const BYTEPLUS_DEFAULT_COST = { |
22 | 20 | input: 0.0001, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,10 +21,6 @@ const cerebrasPresetAppliers = createModelCatalogPresetAppliers({
|
21 | 21 | }), |
22 | 22 | }); |
23 | 23 | |
24 | | -export function applyCerebrasProviderConfig(cfg: OpenClawConfig): OpenClawConfig { |
25 | | -return cerebrasPresetAppliers.applyProviderConfig(cfg); |
26 | | -} |
27 | | - |
28 | 24 | export function applyCerebrasConfig(cfg: OpenClawConfig): OpenClawConfig { |
29 | 25 | return cerebrasPresetAppliers.applyConfig(cfg); |
30 | 26 | } |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { |
2 | 2 | GPT5_BEHAVIOR_CONTRACT, |
3 | | -GPT5_FRIENDLY_PROMPT_OVERLAY, |
4 | | -isGpt5ModelId, |
5 | 3 | renderGpt5PromptOverlay, |
6 | 4 | resolveGpt5SystemPromptContribution, |
7 | 5 | } from "openclaw/plugin-sdk/provider-model-shared"; |
8 | 6 | |
9 | | -export const CODEX_FRIENDLY_PROMPT_OVERLAY = GPT5_FRIENDLY_PROMPT_OVERLAY; |
10 | 7 | export const CODEX_GPT5_BEHAVIOR_CONTRACT = GPT5_BEHAVIOR_CONTRACT; |
11 | 8 | |
12 | | -export function shouldApplyCodexPromptOverlay(params: { modelId?: string }): boolean { |
13 | | -return isGpt5ModelId(params.modelId); |
14 | | -} |
15 | | - |
16 | 9 | export function resolveCodexSystemPromptContribution( |
17 | 10 | params: Parameters<typeof resolveGpt5SystemPromptContribution>[0], |
18 | 11 | ) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,10 +25,6 @@ const fireworksPresetAppliers = createDefaultModelsPresetAppliers({
|
25 | 25 | }, |
26 | 26 | }); |
27 | 27 | |
28 | | -export function applyFireworksProviderConfig(cfg: OpenClawConfig): OpenClawConfig { |
29 | | -return fireworksPresetAppliers.applyProviderConfig(cfg); |
30 | | -} |
31 | | - |
32 | 28 | export function applyFireworksConfig(cfg: OpenClawConfig): OpenClawConfig { |
33 | 29 | return fireworksPresetAppliers.applyConfig(cfg); |
34 | 30 | } |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,10 +21,6 @@ const huggingfacePresetAppliers = createModelCatalogPresetAppliers({
|
21 | 21 | }), |
22 | 22 | }); |
23 | 23 | |
24 | | -export function applyHuggingfaceProviderConfig(cfg: OpenClawConfig): OpenClawConfig { |
25 | | -return huggingfacePresetAppliers.applyProviderConfig(cfg); |
26 | | -} |
27 | | - |
28 | 24 | export function applyHuggingfaceConfig(cfg: OpenClawConfig): OpenClawConfig { |
29 | 25 | return huggingfacePresetAppliers.applyConfig(cfg); |
30 | 26 | } |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,6 @@ import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-sha
|
3 | 3 | export const KIMI_BASE_URL = "https://api.kimi.com/coding/"; |
4 | 4 | const KIMI_CODING_USER_AGENT = "claude-code/0.1.0"; |
5 | 5 | export const KIMI_DEFAULT_MODEL_ID = "kimi-code"; |
6 | | -export const KIMI_UPSTREAM_MODEL_ID = "kimi-for-coding"; |
7 | 6 | export const KIMI_LEGACY_MODEL_ID = "k2p5"; |
8 | 7 | const KIMI_CODING_DEFAULT_CONTEXT_WINDOW = 262144; |
9 | 8 | const KIMI_CODING_DEFAULT_MAX_TOKENS = 32768; |
@@ -46,5 +45,3 @@ export function buildKimiCodingProvider(): ModelProviderConfig {
|
46 | 45 | |
47 | 46 | export const KIMI_CODING_BASE_URL = KIMI_BASE_URL; |
48 | 47 | export const KIMI_CODING_DEFAULT_MODEL_ID = KIMI_DEFAULT_MODEL_ID; |
49 | | -export const KIMI_CODING_LEGACY_MODEL_ID = KIMI_LEGACY_MODEL_ID; |
50 | | -export const buildKimiProvider = buildKimiCodingProvider; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,6 @@ const MISTRAL_MANIFEST_CATALOG = manifest.modelCatalog.providers.mistral;
|
6 | 6 | |
7 | 7 | export const MISTRAL_BASE_URL = MISTRAL_MANIFEST_CATALOG.baseUrl; |
8 | 8 | export const MISTRAL_DEFAULT_MODEL_ID = "mistral-large-latest"; |
9 | | -export const MISTRAL_DEFAULT_MODEL_REF = `mistral/${MISTRAL_DEFAULT_MODEL_ID}`; |
10 | 9 | |
11 | 10 | function requireMistralManifestModel(id: string): (typeof MISTRAL_MANIFEST_CATALOG.models)[number] { |
12 | 11 | const model = MISTRAL_MANIFEST_CATALOG.models.find((entry) => entry.id === id); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -29,14 +29,6 @@ const moonshotPresetAppliers = createDefaultModelPresetAppliers<[string]>({
|
29 | 29 | }, |
30 | 30 | }); |
31 | 31 | |
32 | | -export function applyMoonshotProviderConfig(cfg: OpenClawConfig): OpenClawConfig { |
33 | | -return moonshotPresetAppliers.applyProviderConfig(cfg, MOONSHOT_BASE_URL); |
34 | | -} |
35 | | - |
36 | | -export function applyMoonshotProviderConfigCn(cfg: OpenClawConfig): OpenClawConfig { |
37 | | -return moonshotPresetAppliers.applyProviderConfig(cfg, MOONSHOT_CN_BASE_URL); |
38 | | -} |
39 | | - |
40 | 32 | export function applyMoonshotConfig(cfg: OpenClawConfig): OpenClawConfig { |
41 | 33 | return moonshotPresetAppliers.applyConfig(cfg, MOONSHOT_BASE_URL); |
42 | 34 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。