fix(relay): fix llm_routing read path bug and add User-Agent header for Coding Plan
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
1. connectionStore.ts: storedAccount.account.llm_routing → storedAccount.llm_routing
- saveSaaSSession stores SaaSAccountInfo directly, not { account: SaaSAccountInfo }
- This bug caused admin llm_routing config to never take effect
2. relay/service.rs: add User-Agent: claude-code/1.0 header
- Kimi Coding Plan requires recognized coding agent User-Agent
- Default reqwest UA is rejected with 403
3. Docs: add llm_routing routing mode explanation and troubleshooting entries
This commit is contained in:
@@ -243,6 +243,8 @@ pub async fn execute_relay(
|
||||
|
||||
let mut req_builder = client.post(&url)
|
||||
.header("Content-Type", "application/json")
|
||||
// Kimi Coding Plan 等 Coding Agent API 需要识别 User-Agent 为 coding agent
|
||||
.header("User-Agent", "claude-code/1.0")
|
||||
.body(request_body.to_string());
|
||||
|
||||
if let Some(ref key) = api_key {
|
||||
|
||||
Reference in New Issue
Block a user