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(provider_tests): add test that debug output redacts bearer token
Steven Enamakel303030a50d71
diff --git a/src/embed/harness/provider_tests.rs b/src/embed/harness/provider_tests.rsindex 0a019b5ad1..92f65b4219 100644--- a/src/embed/harness/provider_tests.rs+++ b/src/embed/harness/provider_tests.rs@@ -32,3 +32,19 @@ fn a_blank_model_is_not_a_model() {fn the_default_provider_inherits() {assert_eq!(Provider::default(), Provider::inherit());}++#[test]+fn debug_redacts_the_provider_bearer() {+ // `Provider` wraps `Route`, whose derived Debug would print the api_key.+ // Formatting a provider (e.g. in a log) must never expose the bearer.+ let provider =+ Provider::openai_compatible("https://api.example/v1", "sk-super-secret").model("gpt-5");+ let debug = format!("{provider:?}");++ assert!(debug.contains("api.example"), "base_url stays readable");+ assert!(+ !debug.contains("sk-super-secret"),+ "bearer leaked into Debug: {debug}"+ );+ assert!(debug.contains("redacted"));+}