Skip to content

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

test(doctor): cover model targets from configured cloud providers

Steven Enamakeld2ce5299ecfe
diff --git a/crates/openhuman-core/src/platform/doctor/core_tests.rs b/crates/openhuman-core/src/platform/doctor/core_tests.rs
index 5740871f7f..063abcf07d 100644
--- a/crates/openhuman-core/src/platform/doctor/core_tests.rs
+++ b/crates/openhuman-core/src/platform/doctor/core_tests.rs
@@ -8,6 +8,27 @@ fn test_config_in(tmp: &TempDir) -> Config {
cfg
}
+#[test]
+fn model_targets_come_from_the_callers_configured_cloud_providers() {
+ let config = Config {
+ cloud_providers: vec![crate::config::schema::CloudProviderCreds {
+ id: "p_custom_test".into(),
+ slug: "custom-test".into(),
+ label: "Custom Test Provider".into(),
+ endpoint: "https://inference.example.test/v1".into(),
+ auth_style: crate::config::schema::AuthStyle::None,
+ default_model: None,
+ }],
+ ..Config::default()
+ };
+
+ let report = run_models(&config, false).expect("doctor model listing should succeed");
+
+ assert_eq!(report.entries.len(), 1);
+ assert_eq!(report.entries[0].provider, "custom-test");
+ assert_eq!(report.entries[0].outcome, ModelProbeOutcome::Skipped);
+}
+
#[test]
fn config_validation_warns_no_channels() {
let config = Config::default();