feat: support claude-opus-4-7 (#4293)

* feat: support claude-opus-4-7

* feat: summarized display for opus 4.7
This commit is contained in:
papersnake
2026-04-17 13:52:34 +08:00
committed by GitHub
parent 22e509c1ef
commit 47d7bca268
9 changed files with 107 additions and 30 deletions
+5
View File
@@ -448,6 +448,11 @@ func ProcessTools(tools []any) ([]*Tool, []*ClaudeWebSearchTool) {
type Thinking struct {
Type string `json:"type,omitempty"`
BudgetTokens *int `json:"budget_tokens,omitempty"`
// Display controls whether thinking content is returned in the response.
// Used with adaptive thinking on Claude Opus 4.7+: "summarized" restores
// the visible summary that was default on Opus 4.6; "omitted" (default on
// 4.7) suppresses it. Pass-through field from upstream Anthropic API.
Display string `json:"display,omitempty"`
}
func (c *Thinking) GetBudgetTokens() int {