litellm/terraform/provider/docs/data-sources/model.md
Shivam Rawat 3653e5893f
feat(terraform): resource and data source parity with the community provider (#38158)
* feat(terraform): close key/team schema gaps, fix team read envelope, add import support

* feat(terraform): add fallback resource/data source and key/team block resources

* feat(terraform): add access group and unified access group resources and data sources

* feat(terraform): add guardrail and prompt resources and data sources

* feat(terraform): add agent and search tool resources and data sources

* feat(terraform): add user and budget resources and data sources

* feat(terraform): add tag and project resources and data sources

* docs(terraform): changelog and readme for parity additions

* feat(terraform): add data sources for keys, teams, models, organizations, and mcp servers

* fix(terraform): key update 400 on empty budget_duration, key info envelope, config-supplied key

* fix(terraform): hash raw keys to SHA-256 tokens in key lookup URLs and block resource IDs
2026-08-28 16:55:40 -07:00

50 lines
1.8 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "litellm_model Data Source - terraform-provider-litellm"
subcategory: ""
description: |-
Retrieves information about a model deployment on the LiteLLM proxy.
---
# litellm_model (Data Source)
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.
## Example Usage
```terraform
data "litellm_model" "gpt4o" {
model_id = "0e5x74fab24a7a5245d2ced3536dd8f5"
}
output "gpt4o_provider" {
value = data.litellm_model.gpt4o.custom_llm_provider
}
```
## Argument Reference
The following arguments are supported:
* `model_id` - (Required) LiteLLM model ID (the `x-litellm-model-id` response header value).
## Attributes Reference
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).
## Security Note
Credential material inside `litellm_params` (such as `api_key`, `aws_secret_access_key`, and `vertex_credentials`) is never exported by this data source.