MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_route

Function test_route

crates/openshell-router/src/backend.rs:1042–1059  ·  view source on GitHub ↗
(endpoint: &str, protocols: &[&str], auth: AuthHeader)

Source from the content-addressed store, hash-verified

1040 }
1041
1042 fn test_route(endpoint: &str, protocols: &[&str], auth: AuthHeader) -> ResolvedRoute {
1043 ResolvedRoute {
1044 name: "inference.local".to_string(),
1045 endpoint: endpoint.to_string(),
1046 model: "test-model".to_string(),
1047 api_key: "sk-test".to_string(),
1048 protocols: protocols.iter().map(|p| (*p).to_string()).collect(),
1049 auth,
1050 default_headers: vec![("anthropic-version".to_string(), "2023-06-01".to_string())],
1051 passthrough_headers: vec![
1052 "anthropic-version".to_string(),
1053 "anthropic-beta".to_string(),
1054 ],
1055 timeout: DEFAULT_ROUTE_TIMEOUT,
1056 model_in_path: false,
1057 request_path_override: None,
1058 }
1059 }
1060
1061 /// The buffered path must reject an over-cap upstream response rather than
1062 /// buffer it. Guards the DoS/OOM exposure of reading the body unbounded.

Calls

no outgoing calls

Tested by

no test coverage detected