datarobot_genai.core.config
config
LLMConfig
Bases: BaseModel
Pure LLM connection parameters — no env-var machinery, no NAT base class.
Used as a base for Config (adds env reading) and
DataRobotLLMComponentModelConfig (adds NAT schema), and as the
primary/fallback type accepted by the router so core has no NAT
dependency.
Source code in datarobot_genai/core/config.py
to_litellm_params
Return a litellm_params dict suitable for litellm.Router's model_list.
Falls back to env-loaded Config values for endpoint and api_key
when they are not set on this instance directly.
Source code in datarobot_genai/core/config.py
Config
Bases: LLMConfig, DataRobotAppFrameworkBaseSettings
Finds variables in the priority order of: env variables (including Runtime Parameters), .env, file_secrets, then Pulumi output variables.
Source code in datarobot_genai/core/config.py
get_max_history_messages_default
Return the default maximum number of history messages.
This can be overridden globally via the
DATAROBOT_GENAI_MAX_HISTORY_MESSAGES environment variable.
Invalid values fall back to the built-in default. Negative values are
treated as 0 (disable history).
Source code in datarobot_genai/core/config.py
default_response_model
Return the configured model to report in OpenAI chat/completions responses.
dragent agents ignore the request's model and run the LLM configured in
workflow.yaml / env, so the response should report that actual model — not
echo the caller's string (which need not be sent at all) nor NAT's
"unknown-model" placeholder. Resolves the same way the LLM client does
(:meth:LLMConfig.to_litellm_params): LLM_DEFAULT_MODEL env, else the
deployed-LLM default; always datarobot/-prefixed and never None so the
response can never regress to "unknown-model". (A per-LLM model_name set
inline in workflow.yaml is not reflected here — env/global config only.)