mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-08-18 12:07:02 +08:00
v0.3.8
This commit is contained in:
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user