mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:52:44 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
VENICE_DEFAULT_MODEL_REF,
|
||||
VENICE_MODEL_CATALOG,
|
||||
} from "../agents/venice-models.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import {
|
||||
OPENROUTER_DEFAULT_MODEL_REF,
|
||||
VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF,
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
MOONSHOT_DEFAULT_MODEL_REF,
|
||||
} from "./onboard-auth.models.js";
|
||||
|
||||
export function applyZaiConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyZaiConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[ZAI_DEFAULT_MODEL_REF] = {
|
||||
...models[ZAI_DEFAULT_MODEL_REF],
|
||||
@@ -55,7 +55,7 @@ export function applyZaiConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyOpenrouterProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyOpenrouterProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[OPENROUTER_DEFAULT_MODEL_REF] = {
|
||||
...models[OPENROUTER_DEFAULT_MODEL_REF],
|
||||
@@ -74,7 +74,7 @@ export function applyOpenrouterProviderConfig(cfg: ClawdbotConfig): ClawdbotConf
|
||||
};
|
||||
}
|
||||
|
||||
export function applyVercelAiGatewayProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyVercelAiGatewayProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF] = {
|
||||
...models[VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF],
|
||||
@@ -93,7 +93,7 @@ export function applyVercelAiGatewayProviderConfig(cfg: ClawdbotConfig): Clawdbo
|
||||
};
|
||||
}
|
||||
|
||||
export function applyVercelAiGatewayConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyVercelAiGatewayConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applyVercelAiGatewayProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -115,7 +115,7 @@ export function applyVercelAiGatewayConfig(cfg: ClawdbotConfig): ClawdbotConfig
|
||||
};
|
||||
}
|
||||
|
||||
export function applyOpenrouterConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyOpenrouterConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applyOpenrouterProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -137,7 +137,7 @@ export function applyOpenrouterConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyMoonshotProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyMoonshotProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[MOONSHOT_DEFAULT_MODEL_REF] = {
|
||||
...models[MOONSHOT_DEFAULT_MODEL_REF],
|
||||
@@ -180,7 +180,7 @@ export function applyMoonshotProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig
|
||||
};
|
||||
}
|
||||
|
||||
export function applyMoonshotConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyMoonshotConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applyMoonshotProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -202,7 +202,7 @@ export function applyMoonshotConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyKimiCodeProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyKimiCodeProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[KIMI_CODE_MODEL_REF] = {
|
||||
...models[KIMI_CODE_MODEL_REF],
|
||||
@@ -245,7 +245,7 @@ export function applyKimiCodeProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig
|
||||
};
|
||||
}
|
||||
|
||||
export function applyKimiCodeConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyKimiCodeConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applyKimiCodeProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -267,7 +267,7 @@ export function applyKimiCodeConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applySyntheticProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applySyntheticProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[SYNTHETIC_DEFAULT_MODEL_REF] = {
|
||||
...models[SYNTHETIC_DEFAULT_MODEL_REF],
|
||||
@@ -314,7 +314,7 @@ export function applySyntheticProviderConfig(cfg: ClawdbotConfig): ClawdbotConfi
|
||||
};
|
||||
}
|
||||
|
||||
export function applySyntheticConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applySyntheticConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applySyntheticProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -340,7 +340,7 @@ export function applySyntheticConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
* Apply Venice provider configuration without changing the default model.
|
||||
* Registers Venice models and sets up the provider, but preserves existing model selection.
|
||||
*/
|
||||
export function applyVeniceProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyVeniceProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[VENICE_DEFAULT_MODEL_REF] = {
|
||||
...models[VENICE_DEFAULT_MODEL_REF],
|
||||
@@ -389,7 +389,7 @@ export function applyVeniceProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
* Apply Venice provider configuration AND set Venice as the default model.
|
||||
* Use this when Venice is the primary provider choice during onboarding.
|
||||
*/
|
||||
export function applyVeniceConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
export function applyVeniceConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
const next = applyVeniceProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -412,7 +412,7 @@ export function applyVeniceConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
}
|
||||
|
||||
export function applyAuthProfileConfig(
|
||||
cfg: ClawdbotConfig,
|
||||
cfg: MoltbotConfig,
|
||||
params: {
|
||||
profileId: string;
|
||||
provider: string;
|
||||
@@ -420,7 +420,7 @@ export function applyAuthProfileConfig(
|
||||
email?: string;
|
||||
preferProfileFirst?: boolean;
|
||||
},
|
||||
): ClawdbotConfig {
|
||||
): MoltbotConfig {
|
||||
const profiles = {
|
||||
...cfg.auth?.profiles,
|
||||
[params.profileId]: {
|
||||
|
||||
Reference in New Issue
Block a user