pub fn parse_prompt_too_long_token_counts(
raw_message: &str,
) -> (Option<u64>, Option<u64>)Expand description
Parse actual/limit token counts from a raw prompt-too-long API error message like “prompt is too long: 137500 tokens > 135000 maximum”. The raw string may be wrapped in SDK prefixes or JSON envelopes, or have different casing (Vertex), so this is intentionally lenient.