mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix: ensure modelId is case-insensitive in findTokenLimit function (#5844)
* fix: ensure modelId is case-insensitive in findTokenLimit function * fix: make modelId case-insensitive in findTokenLimit function
This commit is contained in:
parent
38f082bd8e
commit
d2e17747ef
@ -2606,7 +2606,7 @@ export const THINKING_TOKEN_MAP: Record<string, { min: number; max: number }> =
|
||||
|
||||
export const findTokenLimit = (modelId: string): { min: number; max: number } | undefined => {
|
||||
for (const [pattern, limits] of Object.entries(THINKING_TOKEN_MAP)) {
|
||||
if (new RegExp(pattern).test(modelId)) {
|
||||
if (new RegExp(pattern, 'i').test(modelId)) {
|
||||
return limits
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user