The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(cron): assert provider options and reasoning effort reach the request
Steven Enamakel66e7720891b6
diff --git a/crates/openhuman-embed/tests/cron_agents.rs b/crates/openhuman-embed/tests/cron_agents.rsindex a5c9aafb60..fe6e096790 100644--- a/crates/openhuman-embed/tests/cron_agents.rs+++ b/crates/openhuman-embed/tests/cron_agents.rs@@ -14,7 +14,7 @@ use std::time::Duration;use common::{chat_completion, chat_requests, offline_config, runtime, stub_backend};use openhuman_embed::{AgentDefinitionSpec, AgentSpec, AgentTurnOrigin, CronError, HostTurnTools, JobSchedule,- JobSpec, JobTarget, Provider, Runtime, RuntimeError, RuntimeEventKind,+ JobSpec, JobTarget, Provider, ReasoningEffort, Runtime, RuntimeError, RuntimeEventKind,RuntimeEvents, ServiceSet, Tool, ToolScopeSpec, TrustedAutomationSource, Workspace,};use wiremock::matchers::{method, path};@@ -122,6 +122,8 @@ fn a_scheduled_job_runs_a_runtime_agent_with_its_host_tool_as_cron() {"sk-fixture",).model("fixture")+ .provider_options(serde_json::json!({"provider": {"sort": "latency"}}))+ .reasoning_effort(ReasoningEffort::High),).definition(AgentDefinitionSpec::new()@@ -182,6 +184,12 @@ fn a_scheduled_job_runs_a_runtime_agent_with_its_host_tool_as_cron() {let requests = chat_requests(&provider).await;let first_request = String::from_utf8_lossy(&requests[0].body).to_string();assert!(first_request.contains("TEENY_CRON_PROMPT"));+ let first_body: serde_json::Value = serde_json::from_slice(&requests[0].body).unwrap();+ assert_eq!(+ first_body["provider"],+ serde_json::json!({"sort": "latency"})+ );+ assert_eq!(first_body["reasoning_effort"], "high");assert!(common::tool_names(&requests[0]).contains(&"teeny_ping".to_string()));assert_eq!(cron.runs("teeny-hourly", 10).unwrap()[0].status, "ok");