fix: prevent anthropic 3.5 models from use thinking (#8303)

* fix: prevent anthropic 3.5 models from use thinking

* turn off for all claude 3 models

* use -3-

* fix: add 3.5 exclusion for thinking

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
This commit is contained in:
Aditya Mitra 2025-10-24 02:25:01 +05:30 • committed by GitHub
parent 5eb9f4a9bf
commit aff2f31fec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,7 +144,12 @@ function modelSupportsReasoning(
if (!model) {
return false;
}
if ("anthropic" === model.underlyingProviderName) {
// do not turn reasoning on by default for claude 3 models
if (
model.model.includes("claude") &&
!model.model.includes("-3-") &&
!model.model.includes("-3.5-")
) {
return true;
}
if (model.model.includes("deepseek-r")) {