From 2b222e3d951d317389f361f8f12be0fbc77267eb Mon Sep 17 00:00:00 2001 From: masroor-ahmad <75073229+masroor-ahmad@users.noreply.github.com> Date: Mon, 1 Dec 2025 18:16:36 +0100 Subject: [PATCH] fix: remove `max_tokens` minimum requirement to fix json schema issue (#1532) --- internal/config/config.go | 2 +- schema.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index fab908413c691eb6cf7a73ea44c31fdfb722d0b9..464dc14bc8c6d12cdf1db17c681c4faa68a59339 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -73,7 +73,7 @@ type SelectedModel struct { Think bool `json:"think,omitempty" jsonschema:"description=Enable thinking mode for Anthropic models that support reasoning"` // Overrides the default model configuration. - MaxTokens int64 `json:"max_tokens,omitempty" jsonschema:"description=Maximum number of tokens for model responses,minimum=1,maximum=200000,example=4096"` + MaxTokens int64 `json:"max_tokens,omitempty" jsonschema:"description=Maximum number of tokens for model responses,maximum=200000,example=4096"` Temperature *float64 `json:"temperature,omitempty" jsonschema:"description=Sampling temperature,minimum=0,maximum=1,example=0.7"` TopP *float64 `json:"top_p,omitempty" jsonschema:"description=Top-p (nucleus) sampling parameter,minimum=0,maximum=1,example=0.9"` TopK *int64 `json:"top_k,omitempty" jsonschema:"description=Top-k sampling parameter"` diff --git a/schema.json b/schema.json index 41809010df84ba774d734d81403a0cebb1579375..47740b9c18c8d2807c74557ffd9e21b5b6658ceb 100644 --- a/schema.json +++ b/schema.json @@ -555,7 +555,6 @@ "max_tokens": { "type": "integer", "maximum": 200000, - "minimum": 1, "description": "Maximum number of tokens for model responses", "examples": [ 4096