Skip to content

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

fix(test): update model context tests for new inference behavior

Steven Enamakelbe515f287094
diff --git a/crates/openhuman-core/src/inference/model_context_tests.rs b/crates/openhuman-core/src/inference/model_context_tests.rs
index 24e93685b0..571518e907 100644
--- a/crates/openhuman-core/src/inference/model_context_tests.rs
+++ b/crates/openhuman-core/src/inference/model_context_tests.rs
@@ -176,3 +176,25 @@ fn oh_tier_vision_map_is_exhaustively_pinned() {
);
}
}
+
+/// R4 regression: the media agents' new `exact` model pin
+/// (`openrouter/qwen/qwen3.7-flash`, replacing the deprecated `hint:vision`)
+/// must be reported vision-capable through both the tier-map gate and the
+/// combined `model_supports_vision` facade — the two call sites
+/// `dispatch.rs:256` and `runner.rs:1536` actually gate image/video
+/// forwarding on.
+#[test]
+fn media_agent_pinned_model_is_vision_capable() {
+ use crate::config::{Config, MODEL_MEDIA_UNDERSTANDING};
+ use crate::inference::provider::factory::oh_tier_supports_vision;
+
+ assert!(
+ oh_tier_supports_vision(MODEL_MEDIA_UNDERSTANDING),
+ "{MODEL_MEDIA_UNDERSTANDING} must be reported vision-capable"
+ );
+ let config = Config::default();
+ assert!(
+ model_supports_vision(MODEL_MEDIA_UNDERSTANDING, &config),
+ "{MODEL_MEDIA_UNDERSTANDING} must be vision-capable through the combined facade too"
+ );
+}