Skip to content

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

fix(core): adjust backend error classification for observability

Steven Enamakel363b96c0673e
diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rs
index d56fddb2ca..d156582f94 100644
--- a/crates/openhuman-core/src/core/observability.rs
+++ b/crates/openhuman-core/src/core/observability.rs
@@ -2318,7 +2318,7 @@ fn report_expected_message(kind: ExpectedErrorKind, message: &str, domain: &str,
// The FE surfaces actionable copy via `classify_inference_error`;
// Sentry must not double-report (F2/F4). Demote at `warn!` so the
// breadcrumb retains the code for triage without spawning an event.
- let code = crate::inference::registry::classify_backend_error(message)
+ let code = crate::inference::registry::classify_backend_error(None, message)
.as_ref()
.and_then(|classification| classification.token.as_deref())
.unwrap_or_default();
diff --git a/crates/openhuman-tinyhumans/src/inference/tiers_tests.rs b/crates/openhuman-tinyhumans/src/inference/tiers_tests.rs
index d8fce1d624..102fecd3bd 100644
--- a/crates/openhuman-tinyhumans/src/inference/tiers_tests.rs
+++ b/crates/openhuman-tinyhumans/src/inference/tiers_tests.rs
@@ -45,3 +45,37 @@ fn managed_tier_vocabulary_maps_aliases_and_leaves_concrete_ids_raw() {
assert!(is_raw_model("vendor/concrete-model"));
assert!(!is_raw_model("hint:unknown"));
}
+
+#[test]
+fn hosted_vision_capabilities_cover_managed_aliases_and_media_models() {
+ for model in [
+ MODEL_MANAGED_DEFAULT,
+ "reasoning-v1",
+ "hint:reasoning",
+ "vision-v1",
+ "hint:vision",
+ MODEL_MEDIA_UNDERSTANDING,
+ MODEL_IMAGE_GENERATION_AGENT,
+ MODEL_VIDEO_GENERATION_AGENT,
+ ] {
+ assert!(supports_vision(model), "{model} should accept images");
+ }
+
+ for model in [
+ "chat-v1",
+ "hint:chat",
+ "reasoning-quick-v1",
+ "agentic-v1",
+ "hint:agentic",
+ "burst-v1",
+ "hint:burst",
+ "coding-v1",
+ "hint:coding",
+ "summarization-v1",
+ "hint:summarization",
+ "vendor/custom-text-model",
+ "",
+ ] {
+ assert!(!supports_vision(model), "{model} should remain text-only");
+ }
+}