Skip to content

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

feat(core): migrate model hints from `{hint}-v1` to `hint:{hint}` alias scheme

Steven Enamakel82aaddd3b9bb
diff --git a/crates/openhuman-core/src/agent/harness/definition/execution_spec.rs b/crates/openhuman-core/src/agent/harness/definition/execution_spec.rs
index 546b132254..1a39cb5916 100644
--- a/crates/openhuman-core/src/agent/harness/definition/execution_spec.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/execution_spec.rs
@@ -22,16 +22,16 @@ impl ModelSpec {
/// Resolve this spec into the model name string the provider expects.
/// `parent_model` is the model the parent agent is using right now.
///
- /// Hints are resolved to `{hint}-v1` (e.g. `"agentic"` → `"agentic-v1"`)
- /// which matches the backend's standard model naming convention. When
- /// a `RouterProvider` is present its route table takes priority over
- /// this default; when no router is configured (empty `model_routes`)
- /// the resolved name goes directly to the backend.
+ /// Hints are resolved to the `hint:{hint}` role alias (e.g. `"agentic"` →
+ /// `"hint:agentic"`), which the inference factory translates to the role's
+ /// configured route — the managed default model, or the BYOK/local model
+ /// routed to that workload. When a `RouterProvider` is present its route
+ /// table takes priority over this default.
pub fn resolve(&self, parent_model: &str) -> String {
match self {
Self::Inherit => parent_model.to_string(),
Self::Exact(name) => name.clone(),
- Self::Hint(hint) => format!("{hint}-v1"),
+ Self::Hint(hint) => format!("hint:{hint}"),
}
}
}
diff --git a/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs b/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs
index bafa320204..651214c276 100644
--- a/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs
+++ b/crates/openhuman-core/src/agent/learning/linkedin_enrichment/profile_markdown.rs
@@ -63,7 +63,7 @@ Rules:\n\
- Keep the entire output under 400 words.\n\
- Do not invent information — only use what is in the input.";
- let model = "summarization-v1";
+ let model = "hint:summarization";
tracing::debug!(
model = model,
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
index 960408e12d..ee85743d5c 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
@@ -404,7 +404,7 @@ fn declared_subagent_ids(def: &HostAgentDefinition) -> Vec<String> {
/// [`ModelSpec::Inherit`] becomes `None`, which is precisely the crate's "no
/// preference, the session default applies". `Hint` is resolved through
/// [`ModelSpec::resolve`] (whose `parent_model` argument is unused for the hint
-/// arm) so the `{hint}-v1` naming convention has one implementation.
+/// arm) so the `hint:{hint}` alias spelling has one implementation.
fn model_for(spec: &ModelSpec) -> Option<String> {
match spec {
ModelSpec::Inherit => None,
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
index 3eb5e56041..5e245868e3 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/model_resolver.rs
@@ -113,23 +113,17 @@ const LEAD_DEFAULT_ROLE: &str = "chat";
/// The role a non-lead agent takes when the caller supplied none.
///
-/// `chat` is the core's own default workload (`DEFAULT_MODEL` is `chat-v1`), so
+/// `chat` is the core's own default workload, so
/// an unannotated delegate lands exactly where an unconfigured OpenHuman turn
/// already lands.
const SUBAGENT_DEFAULT_ROLE: &str = "chat";
-/// Whether `lowered` is a model-tier spelling `role_for_model_tier` recognises,
-/// rather than merely something that ends in `-v1`.
-///
-/// Checks the stem against [`CHAT_WORKLOAD_ROLES`] instead of restating the
-/// factory's tier table, so the two cannot drift. `reasoning-quick-v1` is the
-/// one tier whose stem is not itself a workload role (it rides the chat model),
-/// so it is named explicitly.
+/// Whether `lowered` is a retired tier slug (`reasoning-v1`, …) that
+/// `role_for_model_tier` still recognises as its role, rather than merely
+/// something that ends in `-v1`. Delegates to the config's own legacy table so
+/// this adapter never restates it.
fn is_known_model_tier(lowered: &str) -> bool {
- let Some(stem) = lowered.strip_suffix("-v1") else {
- return false;
- };
- stem == "reasoning-quick" || CHAT_WORKLOAD_ROLES.contains(&stem)
+ crate::config::is_legacy_tier_model(lowered)
}
/// Maps one [`ModelResolveRequest`] onto an OpenHuman workload role.
diff --git a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs
index 7af1fb1a96..54e784ea07 100644
--- a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs
+++ b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs
@@ -96,7 +96,7 @@ pub(super) fn seed_cloud_providers(config: &mut Config, stats: &mut MigrationSta
.default_model
.clone()
.filter(|s| !s.trim().is_empty())
- .unwrap_or_else(|| "reasoning-v1".to_string());
+ .unwrap_or_else(|| crate::config::MODEL_MANAGED_DEFAULT.to_string());
config.cloud_providers.push(CloudProviderCreds {
id: generate_provider_id("openhuman"),
slug: "openhuman".to_string(),
diff --git a/crates/openhuman-core/src/config/schemas/schema_defs/inference.rs b/crates/openhuman-core/src/config/schemas/schema_defs/inference.rs
index b7cedbdaa9..6cfc704295 100644
--- a/crates/openhuman-core/src/config/schemas/schema_defs/inference.rs
+++ b/crates/openhuman-core/src/config/schemas/schema_defs/inference.rs
@@ -94,7 +94,7 @@ pub(super) fn lookup(function: &str) -> Option<ControllerSchema> {
optional_string("reasoning_provider", "Provider string for the main reasoning workload (e.g. 'cloud', 'ollama:llama3.1:8b', 'openai:gpt-4o')."),
optional_string("agentic_provider", "Provider string for sub-agent / tool-loop workloads."),
optional_string("coding_provider", "Provider string for code-generation workloads."),
- optional_string("vision_provider", "Provider string for the vision / multimodal workload (managed default: vision-v1)."),
+ optional_string("vision_provider", "Provider string for the vision / multimodal workload (managed default: the default model)."),
optional_string("memory_provider", "Provider string for memory-tree extract + summarise."),
optional_string("embeddings_provider", "Provider string for embedding generation."),
optional_string("heartbeat_provider", "Provider string for the heartbeat background-reasoning loop."),
diff --git a/crates/openhuman-core/src/inference/schemas/catalog.rs b/crates/openhuman-core/src/inference/schemas/catalog.rs
index 2284d8d1be..c0baf0d720 100644
--- a/crates/openhuman-core/src/inference/schemas/catalog.rs
+++ b/crates/openhuman-core/src/inference/schemas/catalog.rs
@@ -9,7 +9,7 @@ pub fn schemas(function: &str) -> ControllerSchema {
namespace: "inference",
function: "resolve_model",
description: "Resolve a model hint or tier name to the concrete model the provider router would use.",
- inputs: vec![required_string("hint", "Model hint (e.g. hint:reasoning) or tier name (e.g. reasoning-v1).")],
+ inputs: vec![required_string("hint", "Model hint (e.g. hint:reasoning) or a concrete model id.")],
outputs: vec![
json_output("model", "Resolved concrete model id."),
json_output(
diff --git a/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs b/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs
index b04dd465a0..492da38743 100644
--- a/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs
+++ b/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs
@@ -154,7 +154,7 @@ Capability {
name: "Vision Sub-agent",
domain: "agent",
category: CapabilityCategory::Intelligence,
- description: "Delegate image / screenshot understanding to a dedicated vision sub-agent — describe, OCR, read charts/diagrams, compare images, or locate UI elements. Rides the multimodal `vision-v1` tier so attached images are always analyzed.",
+ description: "Delegate image / screenshot understanding to a dedicated vision sub-agent — describe, OCR, read charts/diagrams, compare images, or locate UI elements. Rides the vision workload route so attached images are always analyzed.",
how_to: "Attach an image in chat, or ask the assistant to look at a screenshot / image file",
status: CapabilityStatus::Beta,
privacy: IMAGE_TO_BACKEND,
diff --git a/crates/openhuman-core/src/voice/realtime_harness/agent.rs b/crates/openhuman-core/src/voice/realtime_harness/agent.rs
index d6e899a97f..058645bfb4 100644
--- a/crates/openhuman-core/src/voice/realtime_harness/agent.rs
+++ b/crates/openhuman-core/src/voice/realtime_harness/agent.rs
@@ -47,7 +47,7 @@ const VOICE_AGENT_NAME: &str = "voice";
/// model pin in `agent/session_host/turn/core.rs`), so tool turns keep working
/// while spoken replies start in ~1s instead of ~6s. Reasoning models are the
/// wrong tool for a latency-capped realtime channel.
-const VOICE_MODEL: &str = "chat-v1";
+const VOICE_MODEL: &str = "hint:chat";
/// Spoken-output directive appended to the orchestrator profile so replies read
/// naturally through TTS instead of as markdown.
diff --git a/crates/openhuman-core/src/web_chat/session.rs b/crates/openhuman-core/src/web_chat/session.rs
index 6a4b731428..eb45d07937 100644
--- a/crates/openhuman-core/src/web_chat/session.rs
+++ b/crates/openhuman-core/src/web_chat/session.rs
@@ -32,11 +32,15 @@ pub(crate) fn normalize_model_override(model_override: Option<String>) -> Option
}
pub(crate) fn provider_role_for_model_override(model_override: Option<&str>) -> &'static str {
+ // A role alias (`hint:coding`) or a retired tier slug (`coding-v1`) picks
+ // that workload's route; a concrete model id rides the chat route.
match model_override.map(str::trim) {
- Some("hint:agentic") | Some("agentic-v1") => "agentic",
- Some("hint:coding") | Some("coding-v1") => "coding",
- Some("hint:summarization") | Some("summarization-v1") => "summarization",
- Some("hint:reasoning") | Some("reasoning-v1") => "reasoning",
+ Some(value) if value.starts_with("hint:") || crate::config::is_legacy_tier_model(value) => {
+ match crate::inference::provider::factory::role_for_model_tier(value) {
+ role @ ("agentic" | "coding" | "summarization" | "reasoning") => role,
+ _ => "chat",
+ }
+ }
_ => "chat",
}
}