mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-12 20:19:51 +08:00
Fix reasoning model directive response identity
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user