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) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
72fb0dcb6f
commit
527384c5fb
@@ -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!(
|
||||||
|
|||||||
Reference in New Issue
Block a user