test(subscription): allow the LLM proxy to name api.anthropic.com, with the reason
deploy / test (push) Successful in 5m16s
deploy / build (push) Successful in 5m58s

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) <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-23 13:08:19 -05:00
co-authored by Claude Opus 5.5
parent 72fb0dcb6f
commit 527384c5fb
+9
View File
@@ -529,6 +529,15 @@ mod tests {
if path.ends_with("subscription.rs") { if path.ends_with("subscription.rs") {
continue; 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"); let src = std::fs::read_to_string(&path).expect("readable source");
for needle in ["api.anthropic.com", "\"x-api-key\""] { for needle in ["api.anthropic.com", "\"x-api-key\""] {
assert!( assert!(