Commit 6ae82e04 authored by SilentFlower's avatar SilentFlower
Browse files

[UPDATE] 优化思考预算逻辑与代码结构

🧠 refactor(antigravity): 完善 thinking 预算分配策略并重构工具构建逻辑
parent 19cca11e
......@@ -28,7 +28,7 @@ type ClaudeMessage struct {
// ThinkingConfig Thinking 配置
type ThinkingConfig struct {
Type string `json:"type"` // "enabled" / "adaptive" / "disabled"
BudgetTokens int `json:"budget_tokens,omitempty"` // thinking budget(-1 表示动态预算)
BudgetTokens int `json:"budget_tokens,omitempty"` // thinking budget
}
// ClaudeMetadata 请求元数据
......
......@@ -618,9 +618,8 @@ func buildGenerationConfig(req *ClaudeRequest) *GeminiGenerationConfig {
IncludeThoughts: true,
}
// - thinking.type=enabled:budget_tokens>0 用显式预算;否则使用动态预算(-1)
// - thinking.type=enabled:budget_tokens>0 用显式预算
// - thinking.type=adaptive:仅在 Antigravity 的 Opus 4.6 上覆写为 (24576)
// (CLIProxyAPI 先翻译为 thinkingLevel="high",再按模型能力转换为预算值)。
budget := -1
if req.Thinking.BudgetTokens > 0 {
budget = req.Thinking.BudgetTokens
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment