diff --git a/R/provider-claude.R b/R/provider-claude.R index e73bd1ea0..637c852fd 100644 --- a/R/provider-claude.R +++ b/R/provider-claude.R @@ -670,13 +670,21 @@ method(batch_result_turn, ProviderAnthropic) <- function( #' @rdname chat_anthropic models_claude <- function( base_url = "https://api.anthropic.com/v1", - api_key = anthropic_key() + api_key = NULL, + credentials = NULL ) { + credentials <- as_credentials( + "models_anthropic", + function() anthropic_key(), + credentials = credentials, + api_key = api_key + ) + provider <- ProviderAnthropic( name = "Anthropic", model = "", base_url = base_url, - credentials = function() api_key, + credentials = credentials, cache = "none" ) diff --git a/man/chat_anthropic.Rd b/man/chat_anthropic.Rd index 66cc5738a..c16e1a17b 100644 --- a/man/chat_anthropic.Rd +++ b/man/chat_anthropic.Rd @@ -37,12 +37,14 @@ chat_claude( models_claude( base_url = "https://api.anthropic.com/v1", - api_key = anthropic_key() + api_key = NULL, + credentials = NULL ) models_anthropic( base_url = "https://api.anthropic.com/v1", - api_key = anthropic_key() + api_key = NULL, + credentials = NULL ) } \arguments{