This commit is contained in:
leokun
2026-06-30 10:38:52 +08:00
commit c083be5ec2
312 changed files with 146628 additions and 0 deletions
@@ -0,0 +1,18 @@
package modeladapter
func maxAnthropicTokens(req StreamRequest) int {
if req.AnthropicMaxTokens > 0 {
return req.AnthropicMaxTokens
}
if req.MaxTokens > 0 {
return req.MaxTokens
}
return 65536
}
func maxThinkingBudget(req StreamRequest) int {
if req.ThinkingBudgetTokens > 0 {
return req.ThinkingBudgetTokens
}
return anthropicThinkingBudget(maxAnthropicTokens(req))
}