fix: keep Moonshot CN base URL in onboarding (#7180) (thanks @waynelwz)

This commit is contained in:
Peter Steinberger
2026-02-03 21:58:04 -08:00
parent 1c6b25ddbb
commit 4a5d368926
5 changed files with 163 additions and 11 deletions

View File

@@ -141,6 +141,10 @@ export function applyMoonshotProviderConfig(cfg: OpenClawConfig): OpenClawConfig
return applyMoonshotProviderConfigWithBaseUrl(cfg, MOONSHOT_BASE_URL);
}
export function applyMoonshotProviderConfigCn(cfg: OpenClawConfig): OpenClawConfig {
return applyMoonshotProviderConfigWithBaseUrl(cfg, MOONSHOT_CN_BASE_URL);
}
function applyMoonshotProviderConfigWithBaseUrl(
cfg: OpenClawConfig,
baseUrl: string,
@@ -210,7 +214,7 @@ export function applyMoonshotConfig(cfg: OpenClawConfig): OpenClawConfig {
}
export function applyMoonshotConfigCn(cfg: OpenClawConfig): OpenClawConfig {
const next = applyMoonshotProviderConfigWithBaseUrl(cfg, MOONSHOT_CN_BASE_URL);
const next = applyMoonshotProviderConfigCn(cfg);
const existingModel = next.agents?.defaults?.model;
return {
...next,