fix(cliproxy): add case-insensitive model lookup

Normalize model IDs to lowercase for comparison in findModel()
This commit is contained in:
kaitranntt
2026-01-08 15:50:05 -05:00
parent b634f365f3
commit 36bcc04133
+3 -1
View File
@@ -153,11 +153,13 @@ export function getProviderCatalog(provider: CLIProxyProvider): ProviderCatalog
/**
* Find model entry by ID
* Note: Model IDs are normalized to lowercase for case-insensitive comparison
*/
export function findModel(provider: CLIProxyProvider, modelId: string): ModelEntry | undefined {
const catalog = MODEL_CATALOG[provider];
if (!catalog) return undefined;
return catalog.models.find((m) => m.id === modelId);
const normalizedId = modelId.toLowerCase();
return catalog.models.find((m) => m.id.toLowerCase() === normalizedId);
}
/**