Skip to main content

scrub_secret_patterns

Function scrub_secret_patterns 

pub fn scrub_secret_patterns(input: &str) -> String
Expand description

Scrub known secret-like token prefixes from model_provider error strings. Provider API-key prefixes come from the same canonical table used for credential-family validation; non-provider prefixes cover Slack, GitHub, and Google/Gemini credentials. Complete query strings and fragments are removed from embedded HTTP(S) URLs because either suffix may carry credentials under provider-specific names.