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

Function make_route

crates/openshell-router/src/mock.rs:146–160  ·  view source on GitHub ↗
(endpoint: &str, protocols: &[&str], model: &str)

Source from the content-addressed store, hash-verified

144 use super::*;
145
146 fn make_route(endpoint: &str, protocols: &[&str], model: &str) -> ResolvedRoute {
147 ResolvedRoute {
148 name: "test".to_string(),
149 endpoint: endpoint.to_string(),
150 model: model.to_string(),
151 api_key: "key".to_string(),
152 protocols: protocols.iter().map(ToString::to_string).collect(),
153 auth: crate::config::AuthHeader::Bearer,
154 default_headers: Vec::new(),
155 passthrough_headers: Vec::new(),
156 timeout: crate::config::DEFAULT_ROUTE_TIMEOUT,
157 model_in_path: false,
158 request_path_override: None,
159 }
160 }
161
162 #[test]
163 fn is_mock_route_detects_mock_scheme() {

Callers 5

mock_anthropic_messagesFunction · 0.70
mock_openai_embeddingsFunction · 0.70
mock_generic_protocolFunction · 0.70

Calls

no outgoing calls

Tested by 5

mock_anthropic_messagesFunction · 0.56
mock_openai_embeddingsFunction · 0.56
mock_generic_protocolFunction · 0.56