(
route_name: &str,
endpoint: String,
model_id: &str,
api_key: &str,
protocols: Vec<String>,
profile: &openshell_core::inference::InferenceProviderProfile,
model_in_path: b
| 513 | /// Build a [`RouterResolvedRoute`] for Vertex AI without duplicating the 15-field struct. |
| 514 | #[allow(clippy::too_many_arguments)] |
| 515 | fn build_vertex_route( |
| 516 | route_name: &str, |
| 517 | endpoint: String, |
| 518 | model_id: &str, |
| 519 | api_key: &str, |
| 520 | protocols: Vec<String>, |
| 521 | profile: &openshell_core::inference::InferenceProviderProfile, |
| 522 | model_in_path: bool, |
| 523 | request_path_override: Option<String>, |
| 524 | ) -> RouterResolvedRoute { |
| 525 | RouterResolvedRoute { |
| 526 | name: route_name.to_string(), |
| 527 | endpoint, |
| 528 | model: model_id.to_string(), |
| 529 | api_key: api_key.to_string(), |
| 530 | protocols, |
| 531 | auth: profile.auth.clone(), |
| 532 | default_headers: profile |
| 533 | .default_headers |
| 534 | .iter() |
| 535 | .map(|(k, v)| ((*k).to_string(), (*v).to_string())) |
| 536 | .collect(), |
| 537 | passthrough_headers: profile |
| 538 | .passthrough_headers |
| 539 | .iter() |
| 540 | .map(|p| (*p).to_string()) |
| 541 | .collect(), |
| 542 | timeout: openshell_router::config::DEFAULT_ROUTE_TIMEOUT, |
| 543 | model_in_path, |
| 544 | request_path_override, |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | /// Resolve a Vertex AI route given provider config, model, and bearer token. |
| 549 | fn resolve_vertex_ai_route( |
no outgoing calls
no test coverage detected