Look up the inference provider profile for a given provider type. Returns `None` for provider types that don't support inference routing (e.g. `github`, `gitlab`, `outlook`).
(provider_type: &str)
| 235 | /// Returns `None` for provider types that don't support inference routing |
| 236 | /// (e.g. `github`, `gitlab`, `outlook`). |
| 237 | pub fn profile_for(provider_type: &str) -> Option<&'static InferenceProviderProfile> { |
| 238 | match normalize_inference_provider_type(provider_type)? { |
| 239 | "openai" => Some(&OPENAI_PROFILE), |
| 240 | "anthropic" => Some(&ANTHROPIC_PROFILE), |
| 241 | "nvidia" => Some(&NVIDIA_PROFILE), |
| 242 | "deepinfra" => Some(&DEEPINFRA_PROFILE), |
| 243 | "google-vertex-ai" => Some(&VERTEX_AI_PROFILE), |
| 244 | "aws-bedrock" => Some(&AWS_BEDROCK_PROFILE), |
| 245 | _ => None, |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | /// Derive the [`AuthHeader`] and default headers for a provider type string. |
| 250 | /// |