fix: add omitempty to model field so it's not sent when empty
CI / test (pull_request) Successful in 15s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Failing after 16s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m25s
CI / review (gpt-5, security, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 2m39s

This commit is contained in:
Rodin
2026-05-09 23:39:22 -07:00
parent b12df1a636
commit 8da8fca19d
+1 -1
View File
@@ -207,7 +207,7 @@ func (c *Client) completeOpenAI(ctx context.Context, messages []Message) (string
type anthropicRequest struct { type anthropicRequest struct {
AnthropicVersion string `json:"anthropic_version,omitempty"` AnthropicVersion string `json:"anthropic_version,omitempty"`
Model string `json:"model"` Model string `json:"model,omitempty"`
MaxTokens int `json:"max_tokens"` MaxTokens int `json:"max_tokens"`
System string `json:"system,omitempty"` System string `json:"system,omitempty"`
Messages []anthropicMsg `json:"messages"` Messages []anthropicMsg `json:"messages"`