Fix reasoning model directive response identity

This commit is contained in:
fawney19
2026-05-11 23:03:11 +08:00
parent 7ae38b6c43
commit 0fa97595bf
9 changed files with 465 additions and 25 deletions
@@ -98,6 +98,21 @@ pub fn model_directive_base_model(model: &str) -> Option<String> {
parse_model_directive(model).map(|directive| directive.base_model)
}
pub(crate) fn model_directive_display_model(model: &str) -> Option<String> {
let model = model.trim();
parse_model_directive(model)?;
Some(model.to_string())
}
pub(crate) fn model_directive_display_model_from_report_context(
report_context: &Value,
) -> Option<String> {
report_context
.get("model")
.and_then(Value::as_str)
.and_then(model_directive_display_model)
}
pub fn normalize_model_directive_model(model: &str) -> String {
parse_model_directive(model)
.map(|directive| directive.base_model)