mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 03:40:33 +08:00
fix(models): normalize model IDs to lowercase for consistency (#5642)
fix(models): normalize model IDs to lowercase for consistent matching in isSupportedThinkingTokenQwenModel function
This commit is contained in:
parent
3718b86044
commit
d95e4d8155
@ -2312,7 +2312,7 @@ export function isSupportedThinkingTokenQwenModel(model?: Model): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
model.id.includes('qwen3') ||
|
model.id.toLowerCase().includes('qwen3') ||
|
||||||
[
|
[
|
||||||
'qwen-plus-latest',
|
'qwen-plus-latest',
|
||||||
'qwen-plus-0428',
|
'qwen-plus-0428',
|
||||||
@ -2320,7 +2320,7 @@ export function isSupportedThinkingTokenQwenModel(model?: Model): boolean {
|
|||||||
'qwen-turbo-latest',
|
'qwen-turbo-latest',
|
||||||
'qwen-turbo-0428',
|
'qwen-turbo-0428',
|
||||||
'qwen-turbo-2025-04-28'
|
'qwen-turbo-2025-04-28'
|
||||||
].includes(model.id)
|
].includes(model.id.toLowerCase())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1074,6 +1074,9 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const models = response?.data || []
|
const models = response?.data || []
|
||||||
|
models.forEach((model) => {
|
||||||
|
model.id = model.id.trim()
|
||||||
|
})
|
||||||
|
|
||||||
return models.filter(isSupportedModel)
|
return models.filter(isSupportedModel)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user