Skip to content

Commit a5a64dd

Browse files
authored
fix: Anthropic渠道测试添加max_tokens参数 (#164)
1 parent 8d0562c commit a5a64dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/channel/anthropic_channel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ func (ch *AnthropicChannel) ValidateKey(ctx context.Context, apiKey *models.APIK
9191

9292
// Use a minimal, low-cost payload for validation
9393
payload := gin.H{
94-
"model": ch.TestModel,
94+
"model": ch.TestModel,
95+
"max_tokens": 100,
9596
"messages": []gin.H{
9697
{"role": "user", "content": "hi"},
9798
},

0 commit comments

Comments
 (0)