pub fn parse_credential_document(
document: Option<&str>,
) -> BTreeMap<String, String>Expand description
Parse a stored credential document back into a typed field map.
A JSON object of string values (Bedrock/MAI multi-field documents) parses
into its fields. Anything else — a raw API key, or a legacy non-JSON
credential — is treated as the api_key field, so existing single-key
providers keep resolving without re-encryption.