Skip to main content
Deploys a Truss model to Baseten. Parameters:
NameTypeDescription
target_directorystrPath to the Truss directory to push.
remoteOptional[str]Name of the remote in .trussrc to push to.
model_nameOptional[str]Temporarily override the model name for this deployment without updating config.yaml.
publishboolDeploy as published. If no production deployment exists, promote it to production.
promoteboolDeploy as published and promote to production, even if a production deployment exists.
preserve_previous_production_deploymentboolPreserve the previous production deployment’s autoscaling settings (only with promote).
trustedOptional[bool]Deprecated. All models are trusted by default. This parameter is ignored.
disable_truss_downloadboolDisable downloading of the Truss directory from the UI.
deployment_nameOptional[str]Custom deployment name (alphanumeric, ., -, or _ only). Requires publish or promote.
environmentOptional[str]Name of a stable environment to deploy to.
include_git_infoboolAttach git versioning info (sha, branch, tag) to deployments made from within a git repo. Defaults to False.
preserve_env_instance_typeboolWhen deploying to an environment, whether to resolve the instance type from the Truss config’s resources (False) or preserve the instance type already configured on the environment. Defaults to True.
deploy_timeout_minutesOptional[int]Timeout in minutes for the deployment operation.
labelsOptional[Dict[str, Any]]JSON-serializable dictionary of label key-value pairs to attach to the deployment.
teamOptional[str]Name of the team to push the model to.