Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(inference): update model building error handling

Steven Enamakeldeeae77d33ea
diff --git a/crates/openhuman-tinyhumans/src/inference/mod.rs b/crates/openhuman-tinyhumans/src/inference/mod.rs
index 8bc05ac45a..c35e926098 100644
--- a/crates/openhuman-tinyhumans/src/inference/mod.rs
+++ b/crates/openhuman-tinyhumans/src/inference/mod.rs
@@ -60,8 +60,7 @@ pub(crate) fn build_chat_model(
.filter(|model| !model.is_empty())
.map(str::to_string)
.or_else(tiers::default_model)
- .expect("TinyHumans registers its managed default")
- ;
+ .ok_or_else(|| anyhow::anyhow!("TinyHumans managed inference has no configured model"))?;
let default_model = request
.default_model
.map(str::trim)