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
fix(inference): accept OpenHuman provider label when classifying errors
Steven Enamakel2f8d230bfcbd
diff --git a/crates/openhuman-tinyhumans/src/inference/backend_error_code.rs b/crates/openhuman-tinyhumans/src/inference/backend_error_code.rsindex 06524db929..febe3ae1d4 100644--- a/crates/openhuman-tinyhumans/src/inference/backend_error_code.rs+++ b/crates/openhuman-tinyhumans/src/inference/backend_error_code.rs@@ -139,7 +139,7 @@ pub fn body_flags_malformed(err: &str) -> bool {pub(crate) fn classify(provider: Option<&str>, err: &str) -> BackendErrorClassification {let provider_owned = provider.map_or_else(|| is_managed_backend_envelope(err),- |provider| provider == PROVIDER_LABEL,+ |provider| matches!(provider, PROVIDER_LABEL | "OpenHuman"),);let token = provider_owned.then(|| extract_backend_error_code_token(err))diff --git a/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs b/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rsindex b756aaf1f4..0ccd21743a 100644--- a/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs+++ b/crates/openhuman-tinyhumans/src/inference/backend_error_code_tests.rs@@ -67,6 +67,24 @@ fn every_known_wire_token_maps_to_its_provider_neutral_kind() {}}+#[test]+fn owner_and_legacy_managed_provider_labels_keep_error_codes_provider_owned() {+ let error = r#"OpenHuman API error: {"errorCode":"RATE_LIMITED"}"#;+ assert_eq!(+ classify(Some("tinyhumans"), error).kind,+ Some(BackendErrorKind::RateLimited)+ );+ assert_eq!(+ classify(Some("OpenHuman"), error).kind,+ Some(BackendErrorKind::RateLimited)+ );+ assert_eq!(+ classify(Some("custom_openai"), error).kind,+ None,+ "an arbitrary provider must not inherit managed-backend ownership"+ );+}+#[test]fn extraction_is_case_insensitive_on_key_and_normalises_value() {let body = r#"{"ErrorCode":"rate_limited"}"#;