Skip to content

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

feat(config): replace abstract tier slugs with concrete managed model id

Steven Enamakel8daf1191decc
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index c16d14c2b5..7338bc40be 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -56,9 +56,8 @@ pub use schema::{
StorageProviderConfig, StorageProviderSection, StreamMode, SttEngine, TeamModelConfig,
TelegramConfig, TokenjuiceConfig, UpdateConfig, UpdateRestartStrategy, VoiceActivationMode,
VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig, DEFAULT_CLOUD_LLM_MODEL,
- DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL, MEMORY_SYNC_INTERVAL_PRESETS_SECS,
- MODEL_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_QUICK_V1,
- MODEL_REASONING_V1, MODEL_SUMMARIZATION_V1, MODEL_VISION_V1, SEARCH_ENGINE_BRAVE,
+ DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL, LEGACY_TIER_MODELS,
+ MEMORY_SYNC_INTERVAL_PRESETS_SECS, MODEL_MANAGED_DEFAULT, SEARCH_ENGINE_BRAVE,
SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,
SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
};
diff --git a/crates/openhuman-core/src/config/schema/types.rs b/crates/openhuman-core/src/config/schema/types.rs
index f3aa906de7..315e745f81 100644
--- a/crates/openhuman-core/src/config/schema/types.rs
+++ b/crates/openhuman-core/src/config/schema/types.rs
@@ -11,9 +11,8 @@ mod resolvers;
pub use config::{Config, CustomEmbeddingsConfig, ModelRegistryEntry};
pub use model_ids::{
- DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL, MEMORY_SYNC_INTERVAL_PRESETS_SECS,
- MODEL_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_QUICK_V1,
- MODEL_REASONING_V1, MODEL_SUMMARIZATION_V1, MODEL_VISION_V1,
+ is_legacy_tier_model, legacy_tier_role, DEFAULT_MEMORY_SYNC_INTERVAL_SECS, DEFAULT_MODEL,
+ LEGACY_TIER_MODELS, MEMORY_SYNC_INTERVAL_PRESETS_SECS, MODEL_MANAGED_DEFAULT, WORKLOAD_ROLES,
};
pub use output_language::{normalize_output_language, output_language_directive};
diff --git a/crates/openhuman-core/src/config/schema/types/model_ids.rs b/crates/openhuman-core/src/config/schema/types/model_ids.rs
index 0c581fb488..1588e4338b 100644
--- a/crates/openhuman-core/src/config/schema/types/model_ids.rs
+++ b/crates/openhuman-core/src/config/schema/types/model_ids.rs
@@ -1,28 +1,68 @@
//! Standard model-tier identifiers and memory-sync cadence constants.
-/// Standard model identifiers matching the backend model registry.
-pub const MODEL_AGENTIC_V1: &str = "agentic-v1";
-pub const MODEL_REASONING_V1: &str = "reasoning-v1";
-/// Low-latency conversational tier.
-pub const MODEL_CHAT_V1: &str = "chat-v1";
-/// Legacy low-latency chat tier slug retained for older persisted configs.
-pub const MODEL_REASONING_QUICK_V1: &str = "reasoning-quick-v1";
-pub const MODEL_CODING_V1: &str = "coding-v1";
-/// High-throughput "burst" tier served by the managed backend. Cheap, fast,
-/// non-reasoning, text-only, 128k context, no prompt cache; used by fast
-/// high-fanout workers. Managed-backend only (no BYOK knob).
-pub const MODEL_BURST_V1: &str = "burst-v1";
-pub const MODEL_SUMMARIZATION_V1: &str = "summarization-v1";
-/// Multimodal (image-input) tier. Managed backend serves this with the vision
-/// flag enabled; the vision sub-agent rides this tier via `hint:vision`.
-pub const MODEL_VISION_V1: &str = "vision-v1";
-/// Default model used when no explicit model is configured.
+/// The managed backend's default model: DeepSeek V4 Flash through the
+/// OpenRouter passthrough. Every managed workload runs on it unless the user
+/// pins another catalog model (Settings → Routing → Default model, or a
+/// per-agent / per-node pin).
///
-/// Set to `chat-v1`, the backend's low-latency conversational tier. The
-/// orchestrator (user-facing front-line agent) rides on this tier by default
-/// via `hint:chat`; reach for the slower `reasoning-v1` only when deep
-/// reasoning is needed.
-pub const DEFAULT_MODEL: &str = MODEL_CHAT_V1;
+/// This replaced the abstract `chat-v1` / `agentic-v1` / … tier slugs: the
+/// backend no longer serves tier endpoints, only OpenRouter model ids. Workload
+/// *roles* (`chat`, `reasoning`, `coding`, …) remain the internal vocabulary —
+/// they choose the provider route and drive fallback and cost attribution —
+/// but on the managed backend they all resolve to a concrete catalog id.
+pub const MODEL_MANAGED_DEFAULT: &str = "openrouter/deepseek/deepseek-v4-flash";
+
+/// Default model used when no explicit model is configured.
+pub const DEFAULT_MODEL: &str = MODEL_MANAGED_DEFAULT;
+
+/// The retired managed tier slugs, in the order they were introduced. Older
+/// builds persisted them in `default_model`, the `*_provider` routes, agent
+/// manifests and flow nodes; the config migration rewrites them to
+/// [`MODEL_MANAGED_DEFAULT`], and the routing layer keeps accepting them as
+/// aliases of their workload role so an un-migrated caller still routes.
+pub const LEGACY_TIER_MODELS: [&str; 8] = [
+ "chat-v1",
+ "reasoning-v1",
+ "reasoning-quick-v1",
+ "agentic-v1",
+ "coding-v1",
+ "burst-v1",
+ "summarization-v1",
+ "vision-v1",
+];
+
+/// Whether `model` is one of the retired tier slugs ([`LEGACY_TIER_MODELS`]).
+pub fn is_legacy_tier_model(model: &str) -> bool {
+ legacy_tier_role(model).is_some()
+}
+
+/// The workload role a retired tier slug stood for, so a legacy value still
+/// routes through the right `*_provider` field.
+pub fn legacy_tier_role(model: &str) -> Option<&'static str> {
+ match model.trim() {
+ "chat-v1" | "reasoning-quick-v1" => Some("chat"),
+ "reasoning-v1" => Some("reasoning"),
+ "agentic-v1" => Some("agentic"),
+ "coding-v1" => Some("coding"),
+ "burst-v1" => Some("burst"),
+ "summarization-v1" => Some("summarization"),
+ "vision-v1" => Some("vision"),
+ _ => None,
+ }
+}
+
+/// Every workload role the managed backend routes, each with its `hint:*`
+/// alias accepted wherever a model id is taken.
+pub const WORKLOAD_ROLES: [&str; 8] = [
+ "chat",
+ "reasoning",
+ "agentic",
+ "coding",
+ "burst",
+ "summarization",
+ "vision",
+ "subconscious",
+];
/// Effective default global memory-sync cadence (seconds) used when
/// [`Config::memory_sync_interval_secs`] is `None` — i.e. the user has not