fix: 修复Anthropic测试Key问题

This commit is contained in:
tbphp
2025-07-26 14:36:11 +08:00
parent 1fe29142f5
commit ea8470c1ad

View File

@@ -96,6 +96,7 @@ func (ch *AnthropicChannel) ValidateKey(ctx context.Context, key string) (bool,
}
req.Header.Set("x-api-key", key)
req.Header.Set("anthropic-version", "2023-06-01")
req.Header.Set("Content-Type", "application/json")
resp, err := ch.HTTPClient.Do(req)
if err != nil {