Commit 816d293
committed
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 #31 parent a504ec8 commit 816d293
6 files changed
Lines changed: 53 additions & 6 deletions
File tree
- docs/images
- src-tauri
- src
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
880 | 924 | | |
881 | 925 | | |
882 | 926 | | |
| |||
1293 | 1337 | | |
1294 | 1338 | | |
1295 | 1339 | | |
1296 | | - | |
| 1340 | + | |
| 1341 | + | |
1297 | 1342 | | |
1298 | 1343 | | |
1299 | 1344 | | |
| |||
2276 | 2321 | | |
2277 | 2322 | | |
2278 | 2323 | | |
2279 | | - | |
| 2324 | + | |
| 2325 | + | |
2280 | 2326 | | |
2281 | 2327 | | |
2282 | 2328 | | |
| |||
2523 | 2569 | | |
2524 | 2570 | | |
2525 | 2571 | | |
2526 | | - | |
| 2572 | + | |
| 2573 | + | |
2527 | 2574 | | |
2528 | 2575 | | |
2529 | 2576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments