Skip to content

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

refactor(inference): update context window testing structure

Steven Enamakele388ed629fc1
diff --git a/crates/openhuman-core/src/inference/context_window.rs b/crates/openhuman-core/src/inference/context_window.rs
index 3fd6bc5ce4..bdedd3f975 100644
--- a/crates/openhuman-core/src/inference/context_window.rs
+++ b/crates/openhuman-core/src/inference/context_window.rs
@@ -406,3 +406,7 @@ fn model_limits_client_with(
#[cfg(test)]
#[path = "context_window_tests.rs"]
mod tests;
+
+#[cfg(test)]
+#[path = "context_window_discovery_tests.rs"]
+mod discovery_tests;
diff --git a/crates/openhuman-core/src/inference/context_window_discovery_tests.rs b/crates/openhuman-core/src/inference/context_window_discovery_tests.rs
index 04fb0b1733..1d0d59b18b 100644
--- a/crates/openhuman-core/src/inference/context_window_discovery_tests.rs
+++ b/crates/openhuman-core/src/inference/context_window_discovery_tests.rs
@@ -1,5 +1,9 @@
use super::*;
-use crate::config::schema::cloud_providers::CloudProviderCreds;
+use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
+use crate::inference::provider::factory::{
+ BYOK_INCOMPLETE_SENTINEL, CLAUDE_AGENT_SDK_PROVIDER,
+};
+use crate::security::credentials::AuthService;
use tempfile::TempDir;
fn entry(slug: &str, endpoint: &str, auth_style: AuthStyle) -> CloudProviderCreds {
diff --git a/crates/openhuman-core/src/inference/provider/factory.rs b/crates/openhuman-core/src/inference/provider/factory.rs
index edee170dac..d2ba2c388b 100644
--- a/crates/openhuman-core/src/inference/provider/factory.rs
+++ b/crates/openhuman-core/src/inference/provider/factory.rs
@@ -17,7 +17,6 @@ mod chat_model;
mod cloud_slug;
mod cloud_spec;
mod credentials;
-mod discovery;
mod local_runtime;
mod managed_backend;
mod routing;
@@ -32,7 +31,8 @@ pub use credentials::{auth_key_for_slug, lookup_key_for_slug};
pub(crate) use credentials::{
openai_bearer_is_oauth, redact_endpoint_origin, resolve_codex_routing,
};
-pub(crate) use discovery::{model_limits_request, model_limits_request_for};
+pub(crate) use cloud_slug::resolve_cloud_slug_for;
+pub(crate) use cloud_spec::{cloud_provider_spec, CloudCredentialResolver};
pub(crate) use local_runtime::create_local_chat_model_from_string;
pub(crate) use managed_backend::make_openhuman_backend_model;
pub(crate) use routing::role_uses_implicit_cloud_fallback;