fix: preserve explicit zero values in native relay requests

This commit is contained in:
Seefs
2026-03-01 15:47:03 +08:00
parent e22f59e449
commit 2cf3c1836c
52 changed files with 523 additions and 232 deletions

View File

@@ -10,12 +10,12 @@ type VertexAIClaudeRequest struct {
AnthropicVersion string `json:"anthropic_version"`
Messages []dto.ClaudeMessage `json:"messages"`
System any `json:"system,omitempty"`
MaxTokens uint `json:"max_tokens,omitempty"`
MaxTokens *uint `json:"max_tokens,omitempty"`
StopSequences []string `json:"stop_sequences,omitempty"`
Stream bool `json:"stream,omitempty"`
Stream *bool `json:"stream,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
TopP float64 `json:"top_p,omitempty"`
TopK int `json:"top_k,omitempty"`
TopP *float64 `json:"top_p,omitempty"`
TopK *int `json:"top_k,omitempty"`
Tools any `json:"tools,omitempty"`
ToolChoice any `json:"tool_choice,omitempty"`
Thinking *dto.Thinking `json:"thinking,omitempty"`