Skip to content

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

test(inference): cover flattened owner errors keeping backend code ownership

Steven Enamakel0625a4378694
diff --git a/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs b/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs
index 0ccd21743a..0ee49d80b5 100644
--- a/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs
+++ b/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs
@@ -85,6 +85,16 @@ fn owner_and_legacy_managed_provider_labels_keep_error_codes_provider_owned() {
);
}
+#[test]
+fn flattened_owner_errors_keep_backend_code_ownership() {
+ let error = r#"tinyhumans API error: {"errorCode":"RATE_LIMITED"}"#;
+ assert!(is_managed_backend_envelope(error));
+ assert_eq!(
+ classify(None, error).kind,
+ Some(BackendErrorKind::RateLimited)
+ );
+}
+
#[test]
fn extraction_is_case_insensitive_on_key_and_normalises_value() {
let body = r#"{"ErrorCode":"rate_limited"}"#;