Back to Onyx

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

terraform-provider-onyx/docs/resources/llm_provider_default.md

4.6.0-cloud.01.9 KB
Original Source

onyx_llm_provider_default (Resource)

The deployment-wide default LLM model — a singleton pointer at one provider + model pair (plus optional vision and chat auto-naming defaults). Managing it as its own resource lets depends_on ordering repoint the default before the provider holding it is deleted or shrunk. Onyx has no unset API for the text and vision defaults, so destroying this resource leaves them in place; the chat-naming default is cleared when managed.

Example Usage

terraform
# The deployment-wide default model. Referencing the provider's id also
# orders destroys correctly: the default is repointed/released before the
# provider holding it is deleted.
resource "onyx_llm_provider_default" "this" {
  provider_id = onyx_llm_provider.openai.id
  model_name  = "gpt-5"

  vision_provider_id = onyx_llm_provider.openai.id
  vision_model_name  = "gpt-5"
}
<!-- schema generated by tfplugindocs -->

Schema

Required

  • model_name (String) Model name within that provider, e.g. gpt-5-mini. Must be one of its visible model_configurations.
  • provider_id (String) Id of the onyx_llm_provider holding the default model.

Optional

  • chat_naming_model_name (String) Dedicated chat auto-naming model name.
  • chat_naming_provider_id (String) Provider id for the dedicated chat auto-naming model. Unset, auto-naming uses the session's model. Removing the pair clears the server value.
  • vision_model_name (String) Default vision model name.
  • vision_provider_id (String) Provider id for the default vision model.

Read-Only

  • id (String) Always "default".

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

shell
#!/bin/sh
# Singleton: the import id is always "default".
terraform import onyx_llm_provider_default.this default