refactor(anthropic): improve model version detection using regex pattern

This commit is contained in:
municorn
2025-10-22 08:33:33 -06:00
parent a0dc1c87c5
commit 74fff2861b

View File

@@ -41,7 +41,7 @@ export class AnthropicEngine implements AiEngine {
};
// add top_p for non-4.5 models
if (!params.model.includes('-4-5') || !params.model.includes('claude')) {
if (!/claude.*-4-5/.test(params.model)) {
params.top_p = 0.1;
}