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(web_chat): remove obsolete provider error detail tests
Steven Enamakelb14b7befed2d
diff --git a/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rsindex e9dbaf3b3c..03417b785d 100644--- a/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs@@ -212,73 +212,6 @@ fn classify_inference_error_managed_insufficient_budget_400_is_budget_exhausted();}-#[test]-fn extract_provider_error_detail_pulls_openai_message() {- let raw = r#"custom_openai API error (404 Not Found): {"error":{"message":"Project `proj_X` does not have access to model `gpt-5.5`","type":"invalid_request_error","param":null,"code":"model_not_found"}}"#;- let detail = extract_provider_error_detail(raw).expect("expected JSON message");- assert!(- detail.contains("does not have access to model"),- "got: {detail}"- );- assert!(detail.contains("gpt-5.5"));-}--#[test]-fn extract_provider_error_detail_returns_none_for_transport_errors() {- // Plain transport failure — no provider JSON body to quote. Surfacing- // raw transport text would leak internal infra URLs.- let raw = "error sending request for url (https://internal-api.example.invalid/openai/v1/chat/completions)";- assert!(extract_provider_error_detail(raw).is_none());-}--#[test]-fn extract_provider_error_detail_decodes_standard_json_escapes() {- // The escaped solidus matters most in practice: provider bodies routinely- // carry URLs as `https:\/\/…`. `\r`, `\b` and `\f` complete the JSON- // standard set. Every one of them must decode — none may survive as a- // literal backslash.- let raw = r#"provider API error (400): {"error":{"message":"GET https:\/\/api.example.com\/v1\/models failed\r\nretry\tlater\b\f done"}}"#;- let detail = extract_provider_error_detail(raw).expect("expected JSON message");- assert!(- !detail.contains('\\'),- "no escape should survive decoding, got: {detail:?}"- );- assert!(- detail.contains("https://api.example.com/v1/models"),- "escaped solidus must decode, got: {detail:?}"- );- assert!(- detail.contains('\r'),- "carriage return must decode: {detail:?}"- );- assert!(detail.contains('\n'), "newline must decode: {detail:?}");- assert!(detail.contains('\t'), "tab must decode: {detail:?}");- assert!(- detail.contains('\u{8}'),- "backspace must decode: {detail:?}"- );- assert!(- detail.contains('\u{c}'),- "form feed must decode: {detail:?}"- );-}--#[test]-fn extract_provider_error_detail_preserves_unknown_escapes() {- // Genuinely unsupported sequences keep both characters — an unhandled- // `\uXXXX` is better shown to the user as visible literal text than- // silently mangled into a character nobody asked for. `\"` and `\\`- // keep their existing meaning.- let raw = r#"provider API error: {"error":{"message":"quote \" hi and slash \\ then unicode \u263A and \q \s \&"}}"#;- let detail = extract_provider_error_detail(raw).expect("expected JSON message");- assert!(detail.contains("quote \" hi"), "got: {detail:?}");- assert!(detail.contains("slash \\ then"), "got: {detail:?}");- assert!(detail.contains(r"\u263A"), "got: {detail:?}");- assert!(detail.contains(r"\q"), "got: {detail:?}");- assert!(detail.contains(r"\s"), "got: {detail:?}");- assert!(detail.contains(r"\&"), "got: {detail:?}");-}-#[test]fn classify_inference_error_quotes_model_unavailable_detail() {// A stale model pin (`model_not_found` / "does not exist or you do not