ZIm/crates/language_model/src
Richard Feldman cfbc2d0972
Don't spawn Anthropic telemetry event when API key is missing (#32813)
Minor refactor that I'm extracting from a branch because it can stand
alone.

- Now we no longer spawn an executor for `report_anthropic_event` if
it's just going to immediately fail due to API key being missing
- `report_anthropic_event` now takes a `String` API key instead of
`Option<String>` and the error reporting if the key is missing has been
moved to the caller.
- `report_anthropic_event` is longer coupled to `AnthropicError`,
because all it ever did was generate an `AnthropicEvent::Other`, which
in turn was then only used for `log_err` - so, can just be an
`anyhow::Result`.

Release Notes:

- N/A
2025-06-16 14:58:37 -04:00
..
model language_model: Remove CloudModel enum (#31322) 2025-05-24 02:04:51 +00:00
fake_provider.rs More resilient eval (#32257) 2025-06-09 18:07:22 +00:00
language_model.rs More resilient eval (#32257) 2025-06-09 18:07:22 +00:00
rate_limiter.rs More resilient eval (#32257) 2025-06-09 18:07:22 +00:00
registry.rs Distinguish between missing models and registries in error messages (#32678) 2025-06-13 10:31:52 +00:00
request.rs Pass up intent with completion requests (#31710) 2025-05-29 20:43:12 +00:00
role.rs language_model: Remove dependencies on individual model provider crates (#25503) 2025-02-24 16:41:35 -05:00
telemetry.rs Don't spawn Anthropic telemetry event when API key is missing (#32813) 2025-06-16 14:58:37 -04:00