mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 18:15:23 +00:00
fix(cliproxy): handle edge cases in thinking validation
- model-catalog: add null guard and trim for modelId lookup - thinking-validator: add 100 char length limit, accept "8192.0" format - cliproxy-executor: error on empty --thinking= value - use-thinking-config: handle HTML error pages, return cleanup fn
This commit is contained in:
1 parent
299d96c011
commit
ca490a9f4e
4 files changed
+42
-4
No files matched your search
@@ -188,8 +188,8 @@ export function getProviderCatalog(provider: CLIProxyProvider): ProviderCatalog
|
||||
*/
|
||||
export function findModel(provider: CLIProxyProvider, modelId: string): ModelEntry | undefined {
|
||||
const catalog = MODEL_CATALOG[provider];
|
||||
if (!catalog) return undefined;
|
||||
const normalizedId = modelId.toLowerCase();
|
||||
if (!catalog || !modelId) return undefined;
|
||||
const normalizedId = modelId.trim().toLowerCase();
|
||||
return catalog.models.find((m) => m.id.toLowerCase() === normalizedId);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user