tilo-model-client 0.5.0

Authenticated, host-scoped model capabilities for Tilo applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use serde_json::Value;

/// Read provider-authored reasoning metadata for same-conversation replay.
/// This is separate from user-visible final content; absent/null stays absent.
/// # Errors
/// Rejects non-string reasoning content rather than guessing or coercing it.
pub fn reasoning_content(message: &Value) -> Result<Option<&str>, String> {
    match message.get("reasoning_content") {
        None | Some(Value::Null) => Ok(None),
        Some(Value::String(text)) => Ok(Some(text)),
        Some(_) => Err("the model's reasoning_content was not a string".into()),
    }
}