fix: 修复 /v1/messages 端点返回 Anthropic 标准错误格式

- 新增 verify_api_key_anthropic 函数,返回 Anthropic 标准错误格式
- 更新 /v1/messages、/:selector/v1/messages、/api/provider/:provider/v1/messages 端点使用新认证函数
- 优先检查 x-api-key header(Anthropic 标准)
- 错误响应格式: {"type": "error", "error": {"type": "authentication_error", "message": "..."}}

Fixes #3
This commit is contained in:
coso
2025-12-18 01:11:55 +08:00
parent a504ec88fb
commit 816d293631
6 changed files with 53 additions and 6 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB