(endpoint: &str, protocols: &[&str], auth: AuthHeader)
| 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. |
no outgoing calls
no test coverage detected