#[must_use]
pub fn resolve_upstream_path(path: &str) -> String {
if let Some(rest) = path.strip_prefix("/api/services/anthropic") {
return rest.to_string();
}
if let Some(rest) = path.strip_prefix("/api/services/bedrock") {
return rest.to_string();
}
if let Some(rest) = path.strip_prefix("/api/services/vertex") {
return rest.to_string();
}
if let Some(rest) = path.strip_prefix("/api/anthropic") {
return rest.to_string();
}
if let Some(rest) = path.strip_prefix("/api/latest/anthropic") {
return rest.to_string();
}
path.to_string()
}