Skip to content

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

test: add assertions for config override behaviour in context window tests

Steven Enamakel46154498f033
diff --git a/crates/openhuman-core/src/inference/context_window_tests.rs b/crates/openhuman-core/src/inference/context_window_tests.rs
index 94941595c6..fbe7ec1fb8 100644
--- a/crates/openhuman-core/src/inference/context_window_tests.rs
+++ b/crates/openhuman-core/src/inference/context_window_tests.rs
@@ -166,6 +166,15 @@ async fn config_override_wins_over_provider() {
assert_eq!(resolved.window, Some(64_000));
assert_eq!(resolved.source, WindowSource::ConfigOverride);
assert_eq!(fetcher.call_count(), 0, "an override skips discovery");
+ assert_eq!(remembered_window("openrouter", model), None);
+ assert_eq!(
+ crate::inference::model_context::context_window_for_route(
+ &format!("openrouter:{model}"),
+ model,
+ &config,
+ ),
+ Some(64_000)
+ );
}
#[tokio::test]