mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-11 20:13:43 +00:00
fix(cliproxy): add case-insensitive model lookup
Normalize model IDs to lowercase for comparison in findModel()
This commit is contained in:
1 parent
b634f365f3
commit
36bcc04133
1 file changed
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user