centralize openai responses alias handling

This commit is contained in:
fawney19
2026-04-26 21:47:01 +08:00
parent ea3dc3257e
commit 4ec591fbf2
52 changed files with 364 additions and 396 deletions

View File

@@ -7,6 +7,7 @@ repository.workspace = true
description = "Shared data contracts and repository traits for Aether Rust services"
[dependencies]
aether-ai-formats.workspace = true
async-trait.workspace = true
serde.workspace = true
serde_json.workspace = true

View File

@@ -58,11 +58,7 @@ impl StoredMinimalCandidateSelectionRow {
}
fn normalize_api_format(value: &str) -> String {
match value.trim().to_ascii_lowercase().as_str() {
"openai:cli" => "openai:responses".to_string(),
"openai:compact" => "openai:responses:compact".to_string(),
other => other.to_string(),
}
aether_ai_formats::normalize_legacy_openai_format_alias(value)
}
fn api_format_matches(left: &str, right: &str) -> bool {