Skip to content

datarobot_genai.dragent.plugins.llm_providers

llm_providers

DataRobotReasoningMixin

Bases: BaseModel

Shared reasoning toggle for all DataRobot LLM provider configs.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotReasoningMixin(BaseModel):
    """Shared ``reasoning`` toggle for all DataRobot LLM provider configs."""

    reasoning: bool = Field(
        default=False,
        description=(
            "Whether to enable LLM extended reasoning/thinking. When false (default), "
            "reasoning is explicitly disabled via ``extra_body``. When true and no "
            "``extra_body`` is set, a default extended-thinking configuration is applied."
        ),
    )

DataRobotLLMComponentModelConfig

Bases: DataRobotReasoningMixin, LLMConfig, OpenAIModelConfig

A DataRobot LLM provider to be used with an LLM client.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotLLMComponentModelConfig(
    DataRobotReasoningMixin, LLMConfig, OpenAIModelConfig, name="datarobot-llm-component"
):  # type: ignore[call-arg]
    """A DataRobot LLM provider to be used with an LLM client."""

    model_name: str | None = Field(
        validation_alias=AliasChoices("model_name", "model"),
        serialization_alias="model",
        description=(
            "The model name (required for gateway, NIM, and external; optional for deployment)."
        ),
        default=None,
    )
    use_datarobot_llm_gateway: bool = Field(
        default_factory=default_use_datarobot_llm_gateway,
        description="Whether to use the DataRobot LLM gateway.",
    )
    llm_deployment_id: str | None = Field(
        description="The LLM deployment ID.",
        default_factory=default_llm_deployment_id,
    )
    nim_deployment_id: str | None = Field(
        description="The NIM deployment ID.",
        default_factory=default_nim_deployment_id,
    )
    headers: dict[str, str] | None = Field(
        description="Additional headers send to LLM deployment.",
        default=None,
    )

DataRobotLLMGatewayModelConfig

Bases: DataRobotReasoningMixin, OpenAIModelConfig

A DataRobot LLM provider to be used with an LLM client.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotLLMGatewayModelConfig(
    DataRobotReasoningMixin, OpenAIModelConfig, name="datarobot-llm-gateway"
):  # type: ignore[call-arg]
    """A DataRobot LLM provider to be used with an LLM client."""

DataRobotLLMDeploymentModelConfig

Bases: DataRobotReasoningMixin, OpenAIModelConfig

A DataRobot LLM provider to be used with an LLM client.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotLLMDeploymentModelConfig(
    DataRobotReasoningMixin, OpenAIModelConfig, name="datarobot-llm-deployment"
):  # type: ignore[call-arg]
    """A DataRobot LLM provider to be used with an LLM client."""

    model_name: str = Field(
        validation_alias=AliasChoices("model_name", "model"),
        serialization_alias="model",
        description="The model name to pass through to the deployment.",
        default=DEFAULT_MODEL_NAME_FOR_DEPLOYED_LLM,
    )
    llm_deployment_id: str = Field(
        description="The LLM deployment ID.",
        default_factory=default_llm_deployment_id,
    )
    headers: dict[str, str] | None = Field(
        description="Additional headers send to LLM deployment.",
        default=None,
    )

DataRobotNIMModelConfig

Bases: DataRobotReasoningMixin, NIMModelConfig

A DataRobot NIM LLM provider to be used with an LLM client.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotNIMModelConfig(DataRobotReasoningMixin, NIMModelConfig, name="datarobot-nim"):  # type: ignore[call-arg]
    """A DataRobot NIM LLM provider to be used with an LLM client."""

    model_name: str | None = Field(
        validation_alias=AliasChoices("model_name", "model"),
        serialization_alias="model",
        description="The model name to pass through to the NIM deployment.",
        default=None,
    )
    nim_deployment_id: str = Field(
        description="The LLM deployment ID.",
        default_factory=default_nim_deployment_id,
    )

DataRobotLitellmConfig

Bases: DataRobotReasoningMixin, LiteLlmModelConfig

A DataRobot Litellm provider to be used with an LLM client.

Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotLitellmConfig(DataRobotReasoningMixin, LiteLlmModelConfig, name="datarobot-litellm"):  # type: ignore[call-arg]
    """A DataRobot Litellm provider to be used with an LLM client."""

    model_name: str | None = Field(
        validation_alias=AliasChoices("model_name", "model"),
        serialization_alias="model",
        description="The model name.",
        default=None,
    )

DataRobotLLMRouterConfig

Bases: OpenAIModelConfig

Primary + one-or-more fallback LLMs with automatic failover via LiteLLM Router.

Example workflow YAML::

datarobot_llm:
  _type: datarobot-llm-router
  primary:
    llm_deployment_id: "abc123"
    use_datarobot_llm_gateway: false
  fallbacks:
    - llm_deployment_id: "def456"
      use_datarobot_llm_gateway: false
  num_retries: 3
Source code in datarobot_genai/dragent/plugins/llm_providers.py
class DataRobotLLMRouterConfig(OpenAIModelConfig, name="datarobot-llm-router"):  # type: ignore[call-arg]
    """Primary + one-or-more fallback LLMs with automatic failover via LiteLLM Router.

    Example workflow YAML::

        datarobot_llm:
          _type: datarobot-llm-router
          primary:
            llm_deployment_id: "abc123"
            use_datarobot_llm_gateway: false
          fallbacks:
            - llm_deployment_id: "def456"
              use_datarobot_llm_gateway: false
          num_retries: 3
    """

    model_name: str = Field(
        validation_alias=AliasChoices("model_name", "model"),
        serialization_alias="model",
        description="Placeholder model name (not used for routing; each sub-config has its own).",
        default="datarobot-router",
    )
    primary: LLMConfig = Field(description="Primary LLM configuration.")
    fallbacks: list[LLMConfig] = Field(
        description="Ordered list of fallback LLM configurations (at least one required).",
        min_length=1,
    )
    num_retries: int = Field(
        default=3,
        description="Number of retries for a request before the router surfaces a failure.",
    )