terraform/provider/docs/data-sources/model.md
Retrieves information about a single model deployment via /v1/model/info. Sensitive litellm_params fields (API keys and other credentials) are never exposed; only safe routing metadata is exported.
data "litellm_model" "gpt4o" {
model_id = "0e5x74fab24a7a5245d2ced3536dd8f5"
}
output "gpt4o_provider" {
value = data.litellm_model.gpt4o.custom_llm_provider
}
The following arguments are supported:
model_id - (Required) LiteLLM model ID (the x-litellm-model-id response header value).In addition to all arguments above, the following attributes are exported:
model_name - Public model name used for routing.model - The underlying litellm_params model, e.g. openai/gpt-4o.custom_llm_provider - Provider for the model.model_api_base - API base URL, if configured.api_version - API version, if configured.tpm - Tokens per minute limit for the deployment.rpm - Requests per minute limit for the deployment.base_model - Base model used for pricing and capabilities.tier - Model tier (free or paid).mode - Model mode, e.g. chat or embedding.team_id - Team the deployment is scoped to, if any.db_model - Whether the deployment is stored in the database (as opposed to config).Credential material inside litellm_params (such as api_key, aws_secret_access_key, and vertex_credentials) is never exported by this data source.