list_models {chatLLM} | R Documentation |
List Available Models for Supported Providers
Description
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 |
... |
Additional arguments passed to the per - provider helper
(e.g. |
github_api_version |
Character. Header value for
|
anthropic_api_version |
Character. Header value for
|
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.
See Also
Examples
## Not run:
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")
## End(Not run)