Normalize canonical API formats

This commit is contained in:
fawney19
2026-04-29 09:25:19 +08:00
parent 02ad67fe33
commit 07a319259b
171 changed files with 2460 additions and 1962 deletions

View File

@@ -1090,14 +1090,14 @@ mod tests {
Some(serde_json::json!({
"openai:chat": {"health_score": 0.85},
"openai:responses": {"health_score": 0.45},
"claude:chat": {"health_score": 0.70}
"claude:messages": {"health_score": 0.70}
})),
None,
);
assert_eq!(aggregate_provider_key_health_score(&key), Some(0.45));
assert_eq!(
effective_provider_key_health_score(&key, "gemini:chat"),
effective_provider_key_health_score(&key, "gemini:generate_content"),
Some(0.45)
);
}

View File

@@ -279,7 +279,7 @@ pub fn extract_global_priority_for_format(
}
pub fn normalize_api_format(value: &str) -> String {
aether_ai_formats::normalize_legacy_openai_format_alias(value)
aether_ai_formats::normalize_api_format_alias(value)
}
fn row_has_candidate_model_name(