Skip to content

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

chore: files changed crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs,crates/openh

Steven Enamakele453b05f9e0f
diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs
index 9eaf690043..37af775568 100644
--- a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs
@@ -143,7 +143,7 @@ pub(super) fn resolve_cloud_slug<'a>(
entry.auth_style.as_str(),
implicit_fallback
);
- super::fallback_diagnostics::missing_provider_credentials_message(role, slug, local_chat)
+ fallback_diagnostics::missing_provider_credentials_message(role, slug, local_chat)
};
let key = lookup_key_for_slug(slug, config)
@@ -314,7 +314,7 @@ pub(super) fn try_create_cloud_slug_chat_model_from_string_with_native_tools(
// tools) is only implemented on the Chat Completions adapter, so
// that rare case keeps the compat path.
if native_tool_calling
- && super::crate_anthropic::endpoint_is_anthropic_messages(&endpoint)
+ && crate_anthropic::endpoint_is_anthropic_messages(&endpoint)
{
crate::security::egress::emit_external_transfer(
crate::security::egress::EgressDescriptor::inference(
@@ -323,8 +323,8 @@ pub(super) fn try_create_cloud_slug_chat_model_from_string_with_native_tools(
true,
),
);
- let chat = super::crate_anthropic::build_crate_anthropic_model(
- super::crate_anthropic::CrateAnthropicConfig {
+ let chat = crate_anthropic::build_crate_anthropic_model(
+ crate_anthropic::CrateAnthropicConfig {
endpoint: endpoint.as_str(),
api_key: key.as_str(),
model: effective_model.as_str(),
@@ -394,7 +394,7 @@ pub(super) fn try_create_cloud_slug_chat_model_from_string_with_native_tools(
let unsupported = config.temperature_unsupported_models.clone();
let chat =
- super::crate_openai::build_crate_openai_model(super::crate_openai::CrateOpenAiConfig {
+ crate_openai::build_crate_openai_model(crate_openai::CrateOpenAiConfig {
provider_name: slug.as_str(),
endpoint: endpoint.as_str(),
api_key: key.as_str(),
@@ -417,7 +417,7 @@ pub(super) fn try_create_cloud_slug_chat_model_from_string_with_native_tools(
// and Gemini, which cache nothing through a Chat Completions relay
// without them; hosted OpenAI rejects unknown part fields, so the
// flag is keyed on the relay, not on by default.
- explicit_cache_control: super::crate_openai::endpoint_is_openrouter(&endpoint),
+ explicit_cache_control: crate_openai::endpoint_is_openrouter(&endpoint),
});
Some(Ok((chat, effective_model)))
}
diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
index 3f882832d1..6cd053064c 100644
--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs
@@ -105,7 +105,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
let base_url = crate::inference::local::ollama_base_url_from_config(config);
let normalized = base_url.trim_end_matches('/').trim_end_matches("/v1");
let endpoint = format!("{normalized}/v1");
- let chat = super::crate_openai::make_crate_local_runtime_chat_model(
+ let chat = crate_openai::make_crate_local_runtime_chat_model(
"ollama",
&endpoint,
"",
@@ -124,7 +124,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
}
let endpoint = crate::inference::local::lm_studio::lm_studio_base_url(config);
let (api_key, auth) = keyed_auth();
- let chat = super::crate_openai::make_crate_local_runtime_chat_model(
+ let chat = crate_openai::make_crate_local_runtime_chat_model(
"lmstudio",
&endpoint,
&api_key,
@@ -142,7 +142,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
return Some(Err(empty_model_err(&p, "mlx:<model-id>")));
}
let endpoint = env_or_config_url("MLX_SERVER_URL", MLX_PROFILE.default_base_url);
- let chat = super::crate_openai::make_crate_local_runtime_chat_model(
+ let chat = crate_openai::make_crate_local_runtime_chat_model(
"mlx",
&endpoint,
"",
@@ -161,7 +161,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
}
let endpoint = env_or_config_url("OMLX_SERVER_URL", OMLX_PROFILE.default_base_url);
let (api_key, auth) = keyed_auth();
- let chat = super::crate_openai::make_crate_local_runtime_chat_model(
+ let chat = crate_openai::make_crate_local_runtime_chat_model(
"omlx",
&endpoint,
&api_key,
@@ -180,7 +180,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(
}
let endpoint = env_or_config_url("LOCAL_OPENAI_URL", LOCAL_OPENAI_PROFILE.default_base_url);
let (api_key, auth) = keyed_auth();
- let chat = super::crate_openai::make_crate_local_runtime_chat_model(
+ let chat = crate_openai::make_crate_local_runtime_chat_model(
"local-openai",
&endpoint,
&api_key,
diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rs
index c866aed336..519a374023 100644
--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs
@@ -47,7 +47,7 @@ pub(super) fn configured_route_for_role<'a>(role: &str, config: &'a Config) -> O
/// fallback, so a credential failure there must not be explained as "your local
/// chat model cannot do this".
pub(crate) fn role_uses_implicit_cloud_fallback(role: &str, config: &Config) -> bool {
- if !super::fallback_diagnostics::role_falls_back_to_cloud(role) {
+ if !fallback_diagnostics::role_falls_back_to_cloud(role) {
return false;
}
let route = configured_route_for_role(role, config).unwrap_or("").trim();
@@ -101,13 +101,13 @@ pub fn provider_for_role(role: &str, config: &Config) -> String {
// error naming a provider they never configured. Emit the same
// user-facing sentence the error path uses, so the routing decision is
// visible in logs and support transcripts before anything goes wrong.
- if super::fallback_diagnostics::role_falls_back_to_cloud(role) {
+ if fallback_diagnostics::role_falls_back_to_cloud(role) {
if let Some(chat) = config.chat_provider.as_deref() {
if crate::inference::local::profile::is_local_provider_string(chat) {
log::info!(
"[providers][local-fallback] role={} {}",
role,
- super::fallback_diagnostics::cloud_fallback_notice(role, chat, &resolved)
+ fallback_diagnostics::cloud_fallback_notice(role, chat, &resolved)
);
}
}