Skip to content

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

test(agent_chat): cover inference provider options and reasoning effort

Steven Enamakelb07c6484563b
diff --git a/crates/openhuman-core/src/agent_runs/agent_chat/controllers_tests.rs b/crates/openhuman-core/src/agent_runs/agent_chat/controllers_tests.rs
index 8eb16d119d..8be67378f7 100644
--- a/crates/openhuman-core/src/agent_runs/agent_chat/controllers_tests.rs
+++ b/crates/openhuman-core/src/agent_runs/agent_chat/controllers_tests.rs
@@ -64,7 +64,9 @@ fn inference_agent_chat_parses_its_route_fields() {
"agent_id": "alpha",
"inference_url": "https://example.test/v1",
"api_key": "secret",
- "inference_headers": [["x-test", "value"]]
+ "inference_headers": [["x-test", "value"]],
+ "inference_provider_options": {"reasoning": {"effort": "high"}},
+ "inference_reasoning_effort": "high"
}))
.expect("inference route params decode");
assert_eq!(params.agent_id.as_deref(), Some("alpha"));
@@ -76,6 +78,14 @@ fn inference_agent_chat_parses_its_route_fields() {
params.inference_headers,
vec![("x-test".into(), "value".into())]
);
+ assert_eq!(
+ params.inference_provider_options,
+ Some(serde_json::json!({"reasoning": {"effort": "high"}}))
+ );
+ assert_eq!(
+ params.inference_reasoning_effort.as_deref(),
+ Some("high")
+ );
}
#[test]
@@ -96,4 +106,14 @@ fn inference_agent_chat_keeps_the_optional_agent_id_schema_and_typed_route_field
invalid.is_err(),
"the inference surface still validates route fields"
);
+
+ for name in [
+ "inference_provider_options",
+ "inference_reasoning_effort",
+ ] {
+ assert!(
+ schema.inputs.iter().any(|field| field.name == name),
+ "the inference chat schema must preserve the {name} wire field"
+ );
+ }
}