Skip to content

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

test: seed api key fixture in session routing test configs

Steven Enamakel70ae05c09b5a
diff --git a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs
index a601cfc039..f8ac8ac9bd 100644
--- a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs
+++ b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs
@@ -71,6 +71,8 @@ fn config(tmp: &tempfile::TempDir) -> Config {
config.memory.conversations.enabled = false;
config.agent.session_dual_write = false;
config.agent.session_shadow_reads = false;
+ crate::security::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
+ .expect("store relay test credential");
config
}
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
index 913640ad98..d276993517 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
@@ -110,6 +110,8 @@ fn config(tmp: &tempfile::TempDir, agent_id: Option<&str>) -> Config {
config.memory.conversations.enabled = false;
config.agent.session_dual_write = false;
config.agent.session_shadow_reads = false;
+ crate::security::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
+ .expect("store channel test credential");
if let Some(agent_id) = agent_id {
config
.agent
diff --git a/crates/openhuman-core/src/triage/routing_tests.rs b/crates/openhuman-core/src/triage/routing_tests.rs
index f6ed069fdd..c03fb535e9 100644
--- a/crates/openhuman-core/src/triage/routing_tests.rs
+++ b/crates/openhuman-core/src/triage/routing_tests.rs
@@ -2,7 +2,10 @@ use super::*;
use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};
fn test_config() -> Config {
- Config::default()
+ let config = Config::default();
+ crate::security::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
+ .expect("store triage test credential");
+ config
}
fn openai_entry(id: &str, slug: &str) -> CloudProviderCreds {
diff --git a/crates/openhuman-core/src/web_chat/session_routing_tests.rs b/crates/openhuman-core/src/web_chat/session_routing_tests.rs
index b2dfb74f6b..3c132832e7 100644
--- a/crates/openhuman-core/src/web_chat/session_routing_tests.rs
+++ b/crates/openhuman-core/src/web_chat/session_routing_tests.rs
@@ -229,6 +229,8 @@ fn selected_managed_route_constructs_with_the_picker_model() {
let _serial = crate::inference::provider::factory::test_provider_override::exclusive();
crate::agent::session_host::test_support::install_model_fixture();
let config = Config::default();
+ crate::security::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
+ .expect("store managed routing test credential");
let selection = "openrouter/author/picked-model:free";
let effective = effective_session_config(&config, Some(selection), None);
let (_, resolved_model) =
@@ -386,6 +388,8 @@ fn explicit_picker_model_keeps_its_fingerprint_when_saved_default_changes() {
fn configured_huggingface_route() -> Config {
let mut config = Config::default();
+ crate::security::credentials::api_key::store_api_key(&config, "test-session-fixture-key")
+ .expect("store routing test credential");
config.chat_provider = Some("openai:gpt-4o".to_string());
config
.cloud_providers