From 527384c5fb113a58dff157f3dc30a0906c4fe7aa Mon Sep 17 00:00:00 2001 From: Omar Sobh Date: Wed, 23 Sep 2026 13:08:19 -0500 Subject: [PATCH] test(subscription): allow the LLM proxy to name api.anthropic.com, with the reason The crate-wide guard exists so nobody hand-rolls a model call around the provider layer. The proxy originates no calls: it relays a mission container's own request and swaps the credential, reading the same env and auth mode. CI caught the new module (72fb0dc); local runs had covered only touched modules. Co-Authored-By: Claude Opus 5.5 (1M context) --- crates/cm-api/src/subscription.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/cm-api/src/subscription.rs b/crates/cm-api/src/subscription.rs index 0bfa4ee..65104cd 100644 --- a/crates/cm-api/src/subscription.rs +++ b/crates/cm-api/src/subscription.rs @@ -529,6 +529,15 @@ mod tests { if path.ends_with("subscription.rs") { continue; } + // The LLM proxy never ORIGINATES a model call: it relays a mission + // container's own Claude Code request byte for byte and swaps in + // the credential. Routing it through `complete_or` would re-build + // (and could re-route) what the agent asked for. Credential choice + // for relayed calls is `llm_proxy::upstream`, and it reads the same + // env and auth mode (`runtime_auth_mode`) as everything else. + if path.ends_with("llm_proxy.rs") { + continue; + } let src = std::fs::read_to_string(&path).expect("readable source"); for needle in ["api.anthropic.com", "\"x-api-key\""] { assert!(