mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix(test): reasoning
This commit is contained in:
parent
ec84485ee9
commit
0a63540160
@ -368,8 +368,7 @@ describe('reasoning utils', () => {
|
||||
|
||||
const result = getReasoningEffort(assistant, model)
|
||||
expect(result).toEqual({
|
||||
enable_thinking: true,
|
||||
thinking_budget: 32768
|
||||
enable_thinking: true
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -480,12 +480,12 @@ export function getAnthropicThinkingBudget(
|
||||
}
|
||||
|
||||
const budget = Math.floor((tokenLimit.max - tokenLimit.min) * effortRatio + tokenLimit.min)
|
||||
|
||||
|
||||
let budgetTokens = budget
|
||||
if (maxTokens !== undefined) {
|
||||
budgetTokens = Math.min(budget, maxTokens)
|
||||
}
|
||||
|
||||
|
||||
return Math.max(1024, budgetTokens)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user