Back to Litellm

generated by https://github.com/hashicorp/terraform-plugin-docs

terraform/provider/docs/data-sources/model.md

1.101.0-dev.11.5 KB
Original Source

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.