Skip to content

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

refactor(config): clean up model ID exports

Steven Enamakeleeb97006777d
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index b58926774d..e35e89de3f 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -31,8 +31,8 @@ pub use ops::*;
pub use schema::{
action_dir_env_override, active_user_marker_path, active_workspace_dir,
active_workspace_dir_cached, active_workspace_snapshot, clear_active_user, default_action_dir,
- default_files_dir, default_projects_dir, default_root_openhuman_dir, is_legacy_tier_model,
- legacy_tier_role, pre_login_user_dir, read_active_user_id, resolve_action_dir,
+ default_files_dir, default_projects_dir, default_root_openhuman_dir,
+ pre_login_user_dir, read_active_user_id, resolve_action_dir,
resolve_files_dir, user_openhuman_dir, write_active_user_id, PRE_LOGIN_USER_ID, WORKLOAD_ROLES,
};
pub use workspace_handle::workspace_handle;
@@ -62,9 +62,7 @@ pub use schema::{
SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StreamMode, SttEngine,
TeamModelConfig, TelegramConfig, TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig,
UpdateRestartStrategy, VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig,
- DEFAULT_MODEL, LEGACY_TIER_MODELS, MANAGED_MULTIMODAL_MODELS, MANAGED_SEARCH_PROVIDERS,
- MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT, MODEL_MEDIA_UNDERSTANDING,
- MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
+ MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA,
SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY,
SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,
};
diff --git a/crates/openhuman-core/src/config/schema/types.rs b/crates/openhuman-core/src/config/schema/types.rs
index 63825e06b0..ff18f98aa6 100644
--- a/crates/openhuman-core/src/config/schema/types.rs
+++ b/crates/openhuman-core/src/config/schema/types.rs
@@ -13,11 +13,7 @@ mod time_zone;
pub(crate) use config::ConfigDocumentSnapshot;
pub use config::{Config, ConfigRuntimeState, CustomEmbeddingsConfig, ModelRegistryEntry};
-pub use model_ids::{
- is_legacy_tier_model, legacy_tier_role, DEFAULT_MODEL, LEGACY_TIER_MODELS,
- MANAGED_MULTIMODAL_MODELS, MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT,
- MODEL_MEDIA_UNDERSTANDING, MODEL_VIDEO_GENERATION_AGENT, WORKLOAD_ROLES,
-};
+pub use model_ids::WORKLOAD_ROLES;
pub use output_language::{normalize_output_language, output_language_directive};
pub use time_zone::{device_time_zone, normalize_time_zone};
diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rs
index c629f3d76d..2a5ee32940 100644
--- a/crates/openhuman-core/src/config/schema/types/defaults.rs
+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs
@@ -6,7 +6,6 @@ use std::path::PathBuf;
use super::config::default_temperature_unsupported_models;
use super::config::DEFAULT_TEMPERATURE;
-use super::model_ids::DEFAULT_MODEL;
use crate::config::schema::*;
impl Default for Config {
@@ -41,7 +40,9 @@ impl Default for Config {
inference_url: None,
ephemeral_route: None,
resolved_endpoints: Default::default(),
- default_model: Some(DEFAULT_MODEL.to_string()),
+ default_model: crate::inference::registry::provider_default_model(
+ crate::inference::provider::factory::PROVIDER_OPENHUMAN,
+ ),
default_temperature: DEFAULT_TEMPERATURE,
output_language: None,
user_timezone: None,