chore: expand alias template benchmark coverage

This commit is contained in:
Evandro Fonseca Junior committed 2026-03-26 18:26:40 -03:00
1 parent 28d3fa7b51
commit 9bf79ff68c
5 files changed
+76 -5

No files matched your search

+47
View File
@@ -1068,4 +1068,51 @@ mod tests {
assert!(prepared.prompt.contains("User: hello"));
assert!(prepared.prompt.ends_with("Assistant:"));
}
#[test]
#[ignore = "autoresearch benchmark"]
fn dynamic_template_alias_family_can_override_generic_canonical_id() {
let config = ServerConfig {
model_catalog: ModelCatalog::new(
"my-local-model".to_owned(),
vec!["qwen-coder".to_owned()],
),
..base_config()
};
let request = parse_request(
r#"{
"model": "qwen-coder",
"messages": [{"role":"user","content":"hello"}]
}"#,
);
let prepared = prepare_prompt(&request, &config);
assert!(prepared.prompt.contains("<|im_start|>system\n"));
assert!(prepared.prompt.ends_with("<|im_start|>assistant\n"));
}
#[test]
#[ignore = "autoresearch benchmark"]
fn dynamic_template_generic_alias_stays_generic_without_family_hint() {
let config = ServerConfig {
model_catalog: ModelCatalog::new(
"my-local-model".to_owned(),
vec!["assistant-prod".to_owned()],
),
..base_config()
};
let request = parse_request(
r#"{
"model": "assistant-prod",
"messages": [{"role":"user","content":"hello"}]
}"#,
);
let prepared = prepare_prompt(&request, &config);
assert!(prepared
.prompt
.contains("System: Default coding system prompt"));
assert!(prepared.prompt.contains("User: hello"));
assert!(prepared.prompt.ends_with("Assistant:"));
}
}