anthropic: Refactor a bit (#32685)

This PR applies some refactorings made in our other repos to this
version of the `anthropic` crate.

Release Notes:

- N/A
cb9beb86bfMarshall Bowers committed on 6/13/2025, 1:34:23 PM· committed by GitHubparent29f3e62
1 file changedLine totals unavailable