datarobot_genai.drmcp.core.runtime_identity
runtime_identity
The module is intentionally standalone: drmcp does not depend on
datarobot_genai.core or on dragent, so the few env var names and URL
patterns are restated here rather than shared. Keeping the MCP and agent trees
independently evolvable is worth more than removing this much duplication.
GatewayType
Bases: Enum
It is the gateway behind which MCP is deployed.
Source code in datarobot_genai/drmcp/core/runtime_identity.py
get_deployment_id
Return the platform-injected deployment id, or None when not on a deployment.
get_workload_id
resolve_datarobot_endpoint
Return the externally reachable DataRobot API endpoint, or None when unset.
Prefers DATAROBOT_PUBLIC_API_ENDPOINT over DATAROBOT_ENDPOINT; see
the module docstring for why that order matters and why there is no default.
Source code in datarobot_genai/drmcp/core/runtime_identity.py
build_deployment_url
{endpoint}/deployments/{deployment_id}/directAccess/{path}.
Source code in datarobot_genai/drmcp/core/runtime_identity.py
build_workload_url
{endpoint}/endpoints/workloads/{workload_id}/{path}.