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)
|
const result = getReasoningEffort(assistant, model)
|
||||||
expect(result).toEqual({
|
expect(result).toEqual({
|
||||||
enable_thinking: true,
|
enable_thinking: true
|
||||||
thinking_budget: 32768
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -480,12 +480,12 @@ export function getAnthropicThinkingBudget(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const budget = Math.floor((tokenLimit.max - tokenLimit.min) * effortRatio + tokenLimit.min)
|
const budget = Math.floor((tokenLimit.max - tokenLimit.min) * effortRatio + tokenLimit.min)
|
||||||
|
|
||||||
let budgetTokens = budget
|
let budgetTokens = budget
|
||||||
if (maxTokens !== undefined) {
|
if (maxTokens !== undefined) {
|
||||||
budgetTokens = Math.min(budget, maxTokens)
|
budgetTokens = Math.min(budget, maxTokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(1024, budgetTokens)
|
return Math.max(1024, budgetTokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user