@basetenlabs/client - v0.2.0
    Preparing search index...

    Interface ModelConfig

    Configuration for a Truss model deployment.

    interface ModelConfig {
        apply_library_patches?: boolean;
        base_image?: BaseImage | null;
        bdn?: BDNConfig;
        bis_llm?: BISLLM | null;
        build?: Build;
        build_commands?: string[];
        bundled_packages_dir?: string;
        cache_internal?: CacheInternal;
        data_dir?: string;
        description?: string | null;
        docker_server?: DockerServer | null;
        environment_variables?: { [k: string]: string };
        examples_filename?: string;
        external_data?: ExternalData | null;
        external_package_dirs?: string[];
        input_type?: string;
        live_reload?: boolean;
        model_cache?: ModelCache;
        model_class_filename?: string;
        model_class_name?: string;
        model_framework?: string;
        model_metadata?: {
            example_model_input?: { [k: string]: unknown };
            [k: string]: unknown;
        };
        model_module_dir?: string;
        model_name?: string
        | null;
        model_type?: string;
        python_version?: string;
        requirements?: string[];
        requirements_file?: string | null;
        resources?: Resources;
        runtime?: Runtime;
        secrets?: { [k: string]: string | null };
        spec_version?: string;
        system_packages?: string[];
        training_checkpoints?: CheckpointList | null;
        trt_llm?: TRTLLMConfiguration | null;
        use_local_src?: boolean;
        weights?: Weights;
        [k: string]: unknown;
    }

    Indexable

    • [k: string]: unknown
    Index
    apply_library_patches?: boolean

    Whether to apply library patches for improved compatibility.

    base_image?: BaseImage | null

    Use a custom Docker base image instead of the default Truss image.

    bdn?: BDNConfig
    bis_llm?: BISLLM | null

    Configuration options for BIS LLM deployments. This field may change in the future.

    build?: Build
    build_commands?: string[]

    A list of shell commands to run during Docker build. These commands execute after system packages and Python requirements are installed.

    bundled_packages_dir?: string

    The folder for custom packages in your Truss.

    cache_internal?: CacheInternal
    data_dir?: string

    The folder for data files in your Truss.

    description?: string | null

    A description of your model.

    docker_server?: DockerServer | null

    Deploy a custom Docker image that has its own HTTP server, without writing a Model class.

    environment_variables?: { [k: string]: string }

    Key-value pairs exposed to the environment that the model executes in. Do not store secret values here.

    examples_filename?: string

    Path to a file containing example model inputs.

    external_data?: ExternalData | null

    External data to be downloaded and made available under the data directory at serving time.

    external_package_dirs?: string[]

    Use external_package_dirs to access custom packages located outside your Truss. This lets multiple Trusses share the same package.

    input_type?: string
    live_reload?: boolean

    If true, changes to your model code are automatically reloaded without restarting the server.

    model_cache?: ModelCache
    model_class_filename?: string
    model_class_name?: string

    The name of the class that defines your Truss model. This class must implement at least a predict method.

    model_framework?: string
    model_metadata?: {
        example_model_input?: { [k: string]: unknown };
        [k: string]: unknown;
    }

    A flexible field for additional metadata. The entire config file is available to your model at runtime.

    Type Declaration

    • [k: string]: unknown
    • Optionalexample_model_input?: { [k: string]: unknown }

      Sample input that populates the Baseten playground.

    model_module_dir?: string

    The folder containing your model class.

    model_name?: string | null

    The name of your model. This is displayed in the model details page in the Baseten UI.

    model_type?: string
    python_version?: string

    The Python version to use.

    requirements?: string[]

    A list of Python dependencies in pip requirements file format. Mutually exclusive with 'requirements_file'.

    requirements_file?: string | null

    Path to a dependency file. Supports requirements.txt, pyproject.toml, and uv.lock. Mutually exclusive with 'requirements'.

    resources?: Resources
    runtime?: Runtime
    secrets?: { [k: string]: string | null }

    Declare secrets your model needs at runtime, such as API keys or access tokens. Use null as a placeholder; store actual values in your organization settings.

    spec_version?: string
    system_packages?: string[]

    System packages that you would typically install using apt on a Debian operating system.

    training_checkpoints?: CheckpointList | null

    Configuration for deploying from training checkpoints.

    trt_llm?: TRTLLMConfiguration | null

    TensorRT-LLM configuration for optimized LLM inference.

    use_local_src?: boolean
    weights?: Weights