Skip to content

Commit aa9f6e3

Browse files
authored
Merge pull request #66 from tbphp/fix-anthropic-checkkey
fix: 修复Anthropic测试Key问题
2 parents d11f2e9 + ea8470c commit aa9f6e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/channel/anthropic_channel.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ func (ch *AnthropicChannel) ValidateKey(ctx context.Context, key string) (bool,
9696
}
9797
req.Header.Set("x-api-key", key)
9898
req.Header.Set("anthropic-version", "2023-06-01")
99+
req.Header.Set("Content-Type", "application/json")
99100

100101
resp, err := ch.HTTPClient.Do(req)
101102
if err != nil {

0 commit comments

Comments
 (0)