Retrieve the catalog of available model IDs for one or all supported chat - completion providers. Useful for discovering active models and avoiding typos or deprecated defaults.
Supported providers:
"openai"- OpenAI Chat Completions API"groq"- Groq OpenAI - compatible endpoint"anthropic"- Anthropic Claude API"deepseek"- DeepSeek chat API"dashscope"- Alibaba DashScope compatible API"github"- GitHub Models OpenAI - compatible API"all"- Fetch catalogs for all of the above
Arguments
- provider
Character. One of
"github","openai","groq","anthropic","deepseek","dashscope"or"all". Case - insensitive.- ...
Additional arguments passed to the per - provider helper (e.g.
limitfor Anthropic, orapi_versionfor GitHub).- github_api_version
Character. Header value for
X - GitHub - Api - Version(GitHub Models). Default"2022 - 11 - 28".- anthropic_api_version
Character. Header value for
anthropic - version(Anthropic). Default"2023 - 06 - 01".
Value
If provider != "all", a character vector of model IDs for that
single provider. If provider == "all", a named list of character
vectors, one per provider.
Examples
if (FALSE) { # \dontrun{
Sys.setenv(OPENAI_API_KEY = "sk-...")
openai_models <- list_models("openai")
head(openai_models)
Sys.setenv(ANTHROPIC_API_KEY = "sk-...")
anthro_models <- list_models("anthropic", anthropic_api_version = "2023-06-01")
Sys.setenv(GH_MODELS_TOKEN = "ghp-...")
github_models <- list_models("github", github_api_version = "2022-11-28")
} # }