language_model: Return `AuthenticateError`s from `LanguageModelProvider::authenticate` (#25126)

This PR updates the `LanguageModelProvider::authenticate` method to
return an `AuthenticateError` instead of an `anyhow::Error`.

This allows us to model the "credentials not found" state explicitly as
`AuthenticateError::CredentialsNotFound`, which enables the caller to
check for this state and act accordingly.

Planning to use this in #25123 to silence errors about missing
credentials when authenticating providers in the background.

Release Notes:

- N/A
7a6b652ebcMarshall Bowers committed on 2/19/2025, 12:01:48 AM· committed by GitHubparent2627a5f
14 files changedLine totals unavailable