From fdb8761cfac416831a8c3ae64f5718179517e3d0 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Thu, 4 Dec 2025 06:14:14 -0500 Subject: [PATCH] fix(cliproxy): correct model selection default and update fallback version - Fix --config showing wrong default star position by using current user model instead of catalog default when reconfiguring - Update CLIPROXY_FALLBACK_VERSION from 6.5.31 to 6.5.40 --- src/cliproxy/model-config.ts | 6 ++++-- src/cliproxy/platform-detector.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cliproxy/model-config.ts b/src/cliproxy/model-config.ts index cc5bcfa4..b5b4311c 100644 --- a/src/cliproxy/model-config.ts +++ b/src/cliproxy/model-config.ts @@ -94,8 +94,10 @@ export async function configureProviderModel( label: formatModelOption(m), })); - // Find default index - const defaultIdx = catalog.models.findIndex((m) => m.id === catalog.defaultModel); + // Find default index - use current model if configured, otherwise catalog default + const currentModel = getCurrentModel(provider); + const targetModel = currentModel || catalog.defaultModel; + const defaultIdx = catalog.models.findIndex((m) => m.id === targetModel); const safeDefaultIdx = defaultIdx >= 0 ? defaultIdx : 0; // Show header with context (gradient like ccs doctor) diff --git a/src/cliproxy/platform-detector.ts b/src/cliproxy/platform-detector.ts index 28b5ad3b..13ef8f9b 100644 --- a/src/cliproxy/platform-detector.ts +++ b/src/cliproxy/platform-detector.ts @@ -11,7 +11,7 @@ import { PlatformInfo, SupportedOS, SupportedArch, ArchiveExtension } from './ty * CLIProxyAPI fallback version (used when GitHub API unavailable) * Auto-update fetches latest from GitHub; this is only a safety net */ -export const CLIPROXY_FALLBACK_VERSION = '6.5.31'; +export const CLIPROXY_FALLBACK_VERSION = '6.5.40'; /** @deprecated Use CLIPROXY_FALLBACK_VERSION instead */ export const CLIPROXY_VERSION = CLIPROXY_FALLBACK_VERSION;