mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-12 16:15:13 +00:00
fix(cliproxy): strip thinking suffix in detectFailedTier matching
Model names with thinking suffixes like "model(high)" now match stderr that contains the base model name without the suffix.
This commit is contained in:
1 parent
1ebd9f43d6
commit
efd3f21e29
1 file changed
+3
-1
@@ -116,7 +116,9 @@ export function detectFailedTier(
|
|||||||
tiers: { opus: CompositeTierConfig; sonnet: CompositeTierConfig; haiku: CompositeTierConfig }
|
tiers: { opus: CompositeTierConfig; sonnet: CompositeTierConfig; haiku: CompositeTierConfig }
|
||||||
): 'opus' | 'sonnet' | 'haiku' | null {
|
): 'opus' | 'sonnet' | 'haiku' | null {
|
||||||
for (const tier of ['opus', 'sonnet', 'haiku'] as const) {
|
for (const tier of ['opus', 'sonnet', 'haiku'] as const) {
|
||||||
if (stderr.includes(tiers[tier].model)) return tier;
|
// Strip thinking suffix (e.g., "model(high)" → "model") for matching
|
||||||
|
const model = tiers[tier].model.replace(/\([^)]+\)$/, '');
|
||||||
|
if (stderr.includes(model)) return tier;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user