mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 10:19:37 +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:
@@ -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