datarobot_genai.drmcpbase.dynamic_tools.deployment.config
config
Pure configuration assembly for DataRobot deployment tools.
All functions in this module are pure: they take explicit arguments and do not call request_user_dr_client or access any request context.
get_deployment_base_url
Compute the prediction base URL for a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
datarobot_endpoint
|
str
|
The DataRobot API endpoint (e.g. https://app.datarobot.com). |
required |
Returns
Deployment-scoped prediction URL.
Raises
ValueError: If prediction server cannot be determined.
Source code in datarobot_genai/drmcpbase/dynamic_tools/deployment/config.py
build_deployment_auth_headers
Build authentication headers for a deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
token
|
str
|
The bearer token to use for authentication. |
required |
Returns
Dictionary of authentication headers.
Source code in datarobot_genai/drmcpbase/dynamic_tools/deployment/config.py
assemble_deployment_tool_config
assemble_deployment_tool_config(deployment: Deployment, metadata: MetadataBase, base_url: str, auth_headers: dict[str, str]) -> ExternalToolRegistrationConfig
Assemble an ExternalToolRegistrationConfig from pre-computed parts.
This is the pure counterpart to create_deployment_tool_config in drmcp. All expensive lookups (URL, auth, metadata) are done by the caller and passed in as plain arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
metadata
|
MetadataBase
|
Resolved MetadataBase adapter. |
required |
base_url
|
str
|
Pre-computed prediction base URL. |
required |
auth_headers
|
dict[str, str]
|
Pre-computed authentication headers. |
required |
Returns
ExternalToolRegistrationConfig ready for tool creation.