AGC 官方 LLM Router 账号链路与流式联网输出 #242
File diff suppressed because it is too large
Load Diff
@@ -717,7 +717,14 @@ async fn resolve_llm_router_credentials(
|
||||
|
||||
// No fixture means the request must follow the same provisioning/read path
|
||||
// as production. In particular, a missing external_api_key row must never
|
||||
// be replaced by a process-wide test key.
|
||||
// be replaced by a process-wide test key. An already-provisioned row is
|
||||
// read locally on the hot path; Router account repair and subscription
|
||||
// checks run from the authentication/key-preparation anchor instead.
|
||||
if let Some(credentials) =
|
||||
crate::external_api_keys::read_active_llm_router_credentials(state, owner_user_id).await?
|
||||
{
|
||||
return Ok(credentials);
|
||||
}
|
||||
let record = crate::external_api_keys::ensure_llm_router_account(state, owner_user_id).await?;
|
||||
let ciphertext = record
|
||||
.secret_ciphertext
|
||||
|
||||
Reference in New Issue
Block a user