Skip to content

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

test(openhuman-embed): use resolved backend credential in test harness

Steven Enamakel4d20881866e1
diff --git a/crates/openhuman-embed/examples/support/mod.rs b/crates/openhuman-embed/examples/support/mod.rs
index 53f0121666..8f6d460fb2 100644
--- a/crates/openhuman-embed/examples/support/mod.rs
+++ b/crates/openhuman-embed/examples/support/mod.rs
@@ -240,9 +240,14 @@ impl PointedInference {
.or(request.default_model)
.unwrap_or("embed-test-model")
.to_string();
+ // Like the hosted provider: the acting profile's own credential
+ // rides as the bearer.
+ let token = openhuman_embed::__host::security::credentials::session_support::resolve_backend_credential(request.config)
+ .map(|credential| credential.secret().to_string())
+ .map_err(anyhow::Error::msg)?;
let wire = OpenAiModel::compatible_provider(
"EmbedTest",
- "embed-test-token".to_string(),
+ token,
base_url.clone(),
&model,
)
diff --git a/crates/openhuman-embed/tests/common/mod.rs b/crates/openhuman-embed/tests/common/mod.rs
index 72202cbbe7..0e395d61ac 100644
--- a/crates/openhuman-embed/tests/common/mod.rs
+++ b/crates/openhuman-embed/tests/common/mod.rs
@@ -245,9 +245,14 @@ impl PointedInference {
.or(request.default_model)
.unwrap_or("embed-test-model")
.to_string();
+ // Like the hosted provider: the acting profile's own credential
+ // rides as the bearer.
+ let token = openhuman_embed::__host::security::credentials::session_support::resolve_backend_credential(request.config)
+ .map(|credential| credential.secret().to_string())
+ .map_err(anyhow::Error::msg)?;
let wire = OpenAiModel::compatible_provider(
"EmbedTest",
- "embed-test-token".to_string(),
+ token,
base_url.clone(),
&model,
)