use serde_json::Value;
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()),
}
}