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:
@@ -2312,7 +2312,7 @@ export function isSupportedThinkingTokenQwenModel(model?: Model): boolean {
|
||||
}
|
||||
|
||||
return (
|
||||
model.id.includes('qwen3') ||
|
||||
model.id.toLowerCase().includes('qwen3') ||
|
||||
[
|
||||
'qwen-plus-latest',
|
||||
'qwen-plus-0428',
|
||||
@@ -2320,7 +2320,7 @@ export function isSupportedThinkingTokenQwenModel(model?: Model): boolean {
|
||||
'qwen-turbo-latest',
|
||||
'qwen-turbo-0428',
|
||||
'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 || []
|
||||
models.forEach((model) => {
|
||||
model.id = model.id.trim()
|
||||
})
|
||||
|
||||
return models.filter(isSupportedModel)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user