Skip to content

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

test(chat): keep retry guidance for empty replies

Steven Enamakel0888e7e306a0
diff --git a/crates/openhuman-core/src/cron/scheduler_classifier_and_delivery_tests.rs b/crates/openhuman-core/src/cron/scheduler_classifier_and_delivery_tests.rs
index 184ee5d3dc..1f4f792d0c 100644
--- a/crates/openhuman-core/src/cron/scheduler_classifier_and_delivery_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler_classifier_and_delivery_tests.rs
@@ -153,6 +153,10 @@ fn agent_error_to_user_message_does_not_infer_credits_from_empty_response() {
msg.contains("another model"),
"must keep the model-switch remedy: {msg}"
);
+ assert!(
+ msg.to_ascii_lowercase().contains("retry"),
+ "must keep the retry remedy: {msg}"
+ );
assert!(
msg.contains("Connections \u{2192} API keys \u{2192} LLM"),
"must keep the provider-config deep link: {msg}"
diff --git a/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs
index c9c63391d2..beeedb98fa 100644
--- a/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs
+++ b/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs
@@ -8,6 +8,11 @@ fn classify_inference_error_empty_response_does_not_claim_credit_exhaustion() {
error=The model returned an empty response. Please try again.";
let classified = classify_inference_error(raw);
assert_eq!(classified.error_type, "empty_response");
+ assert!(
+ classified.message.contains("Please retry"),
+ "must keep the retry guidance: {}",
+ classified.message
+ );
assert!(
!classified.message.to_ascii_lowercase().contains("credit")
&& !classified.message.to_ascii_lowercase().contains("billing"),