Anthropic 直通只用 x-api-key 出示 Router 凭据
Project CI / AI game creator shell Rust crates (push) Successful in 1m55s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 2m20s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m36s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 3m24s
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Repository checks (push) Successful in 3m43s
Project CI / Backend tests (push) Successful in 5m15s
Project CI / AI game creator shell web tests (push) Successful in 1m47s
Project CI / Native shell tests (push) Successful in 7m34s

- llm:原生 Anthropic 直通不再同时带 Authorization: Bearer,只发 Anthropic 规范的 x-api-key
- 实测:Router 对同一次 /v1/messages 请求,只带 x-api-key 时 200(4.7s 返回真实回复),同时带 Bearer 时 79 秒后被断开
This commit is contained in:
kdletters
2026-10-02 16:14:56 +08:00
parent 3e9bc76c2c
commit 3a0d92b622
@@ -606,7 +606,6 @@ pub async fn proxy_llm_messages(
let mut native_request = client
.post(router_protocol_url(&base_url, "messages"))
.header("x-api-key", api_key.clone())
.bearer_auth(api_key.clone())
.header("content-type", "application/json");
for name in ["anthropic-version", "anthropic-beta", "accept"] {
if let Some(value) = headers.get(name) {