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
This commit is contained in:
kaitranntt
2025-12-04 06:14:14 -05:00
parent fcfa7ce35f
commit fdb8761cfa
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -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)
+1 -1
View File
@@ -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;