mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
Fix provider model mapping selection (#354)
This commit is contained in:
@@ -641,7 +641,7 @@ async fn data_state_reads_minimal_candidate_selection_with_auth_filters() {
|
||||
assert_eq!(selection[1].key_id, "key-3");
|
||||
assert_eq!(
|
||||
selection[1].selected_provider_model_name,
|
||||
"gpt-4.1-edge".to_string()
|
||||
"gpt-4.1-canary".to_string()
|
||||
);
|
||||
assert_eq!(
|
||||
selection[1].mapping_matched_model,
|
||||
|
||||
@@ -39,13 +39,13 @@ fn candidate_model_names_keep_base_and_scoped_mappings() {
|
||||
#[test]
|
||||
fn resolves_mapping_matched_model_from_key_allowed_models() {
|
||||
let mut row = sample_row();
|
||||
row.key_allowed_models = Some(vec!["gpt-4.1-canary".to_string()]);
|
||||
row.key_allowed_models = Some(vec!["gpt-4.1-upstream".to_string()]);
|
||||
|
||||
let resolved = resolve_provider_model_name(&row, "gpt-4.1", "openai:chat")
|
||||
.expect("candidate should resolve");
|
||||
|
||||
assert_eq!(resolved.0, "gpt-4.1-canary");
|
||||
assert_eq!(resolved.1, Some("gpt-4.1-canary".to_string()));
|
||||
assert_eq!(resolved.1, Some("gpt-4.1-upstream".to_string()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -56,7 +56,7 @@ fn resolves_mapping_matched_model_from_global_regex_mapping() {
|
||||
let resolved = resolve_provider_model_name(&row, "gpt-4.1", "openai:chat")
|
||||
.expect("candidate should resolve");
|
||||
|
||||
assert_eq!(resolved.0, "gpt-4.1-variant");
|
||||
assert_eq!(resolved.0, "gpt-4.1-canary");
|
||||
assert_eq!(resolved.1, Some("gpt-4.1-variant".to_string()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user