Trim API key when submitting requests to LLM providers (#37082)
This prevents the common footgun of copy/pasting an API key
starting/ending with extra newlines, which would lead to a "bad request"
error.
Closes #37038
Release Notes:
- agent: Support pasting language model API keys that contain newlines.
39d86eeb7fAntonio Scandurra committed on 8/28/2025, 12:00:44 PM· committed by GitHubparent4981c33