Skip to content

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

feat(provider): add tier-based provider selection for inference

Steven Enamakel19d30ff91017
diff --git a/crates/openhuman-core/src/inference/provider/factory/tiers.rs b/crates/openhuman-core/src/inference/provider/factory/tiers.rs
index a3c1191c71..9941c4221e 100644
--- a/crates/openhuman-core/src/inference/provider/factory/tiers.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/tiers.rs
@@ -134,12 +134,18 @@ pub(crate) fn is_raw_passthrough_model(model: &str) -> bool {
/// The managed backend does not advertise per-model capabilities, so the core
/// owns this. [`MODEL_MANAGED_DEFAULT`] (DeepSeek V4 Flash on the managed
/// backend) accepts images, as do the `vision` and `reasoning` role aliases
-/// (and their retired tier slugs) that always ran a multimodal model. Any other
-/// pinned catalog id is covered by the user's `model_registry.vision` flag
+/// (and their retired tier slugs) that always ran a multimodal model, and
+/// every exact id in [`MANAGED_MULTIMODAL_MODELS`] — the OpenRouter
+/// passthrough models the media agents (`vision_agent`, `image_agent`,
+/// `video_agent`) are pinned to now that `hint:vision` / `vision-v1` is
+/// deprecated (regression R4: the retired hint silently fell back to the
+/// chat default on managed routes, so an agent still pinned to it lost image
+/// forwarding with no error). Any other pinned catalog id is covered by the
+/// user's `model_registry.vision` flag
/// ([`crate::inference::model_context::model_vision_enabled`]).
pub(crate) fn oh_tier_supports_vision(model: &str) -> bool {
let trimmed = model.trim();
- if trimmed == MODEL_MANAGED_DEFAULT {
+ if trimmed == MODEL_MANAGED_DEFAULT || MANAGED_MULTIMODAL_MODELS.contains(&trimmed) {
return true;
}
matches!(