🔧 refactor(dto): update BudgetTokens handling in Thinking struct

This commit is contained in:
CaIon committed 2025-06-16 18:29:49 +08:00
1 parent 1f6ec0174a
commit c4e652461e
4 files changed
+12 -5

No files matched your search

+8 -1
View File
@@ -178,7 +178,14 @@ type ClaudeRequest struct {
type Thinking struct {
Type string `json:"type"`
BudgetTokens int `json:"budget_tokens"`
BudgetTokens *int `json:"budget_tokens,omitempty"`
}
func (c *Thinking) GetBudgetTokens() int {
if c.BudgetTokens == nil {
return 0
}
return *c.BudgetTokens
}
func (c *ClaudeRequest) IsStringSystem() bool {