Skip to content

Standardize models_anthropic() credentials handling to match other providers#917

Open
jcrodriguez1989 wants to merge 1 commit intotidyverse:mainfrom
jcrodriguez1989:refactor/standardize-models-anthropic-credentials
Open

Standardize models_anthropic() credentials handling to match other providers#917
jcrodriguez1989 wants to merge 1 commit intotidyverse:mainfrom
jcrodriguez1989:refactor/standardize-models-anthropic-credentials

Conversation

@jcrodriguez1989
Copy link
Copy Markdown

Summary

Refactors models_claude() and models_anthropic() to use the same credential handling pattern as the other models_* functions (models_openai(), models_google_gemini(), etc.).

Changes

  • Added credentials = NULL parameter to function signature
  • Changed api_key parameter default from anthropic_key() to NULL
  • Used as_credentials() helper for consistent credential resolution

@hadley
Copy link
Copy Markdown
Member

hadley commented Jan 22, 2026

This makes me wonder if it's worth extracting out credentials_anthropic() to reduce the duplication still further. (And similarly for for the other providers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants