The models section of a Spicepod defines machine learning (ML) models and large language models (LLMs) for use with Spice. Models can be loaded from Hugging Face, OpenAI, local files, or other supported providers. The model type is automatically determined based on the source and file format.
| Field | Description |
|---|---|
name | Unique, readable name for the model within the Spicepod. |
from | Source-specific address to uniquely identify a model. |
description | Additional details about the model, useful for displaying to users. |
datasets | Datasets that the model depends on for inference. |
files | Specify additional files, or override default files needed by the model. |
params | Additional parameters to be passed to the model. |
modelsThe models section in your configuration specifies one or more models to be used with your datasets.
Example:
fromThe from field specifies both the source of the model (e.g Huggingface, or a local file), and the unique identifier of the model (relative to the source). The from value expects the following format
The <model_source> prefix of the from field indicates where the model is sourced from:
huggingface:huggingface.co - Models from Hugging Facefile: - Local file pathsopenai - OpenAI (or compatible) modelsspiceai - Spice AI modelsThe <model_id> suffix of the from field is a unique (per source) identifier for the model:
latest).
lukekim/smart/models/drive_stats:60cb80a2-d59b-45c4-9b68-0946303bdcafQwen/Qwen1.5-0.5B (no revision)meta-llama/Meta-Llama-3-8B:cd892e8f4da1043d4b01d5ea182a2e8412bf658f (with revision hash)v1/chat/completion payload.nameA unique identifier for this model component.
descriptionAdditional details about the model, useful for displaying to users
filesOptional. A list of files associated with this model. Each file has:
path: The path to the filename: Optional. A name for the filetype: Optional. The type of the file (automatically determined if not specified)File types include:
weights: Model weights
.onnx files.gguf, .ggml, .safetensors, or pytorch_model.bin filesconfig: Model configuration
config.json filetokenizer: Tokenizer file
tokenizer.json filetokenizer_config: Tokenizer configuration
tokenizer_config.json fileThe system attempts to automatically determine the file type based on the file name and extension. If the type cannot be determined automatically, you can explicitly specify it in the configuration.
paramsOptional. A map of key-value pairs for additional parameters specific to the model.
Example uses include:
ai() function.params.toolsWhich tools should be made available to the model. Supported values: auto, all, search_registry, or a comma-separated list of specific tool names. See Tool Modes.
params.tool_embedding_modelThe name of an embedding model (defined in the embeddings section) to use for searchable tool discovery. Required when tools: search_registry is set. When tools: auto is used, this model enables registry-based discovery if the tool count exceeds the auto-search threshold (20 tools). If only one embedding model is configured, it is used automatically.
params.prompt_cache_keyOptional. A stable key forwarded to the LLM provider to enable prompt/prefix caching. When set, Spice maps this key into the provider-native caching mechanism:
| Provider | Behavior |
|---|---|
| OpenAI / Azure OpenAI | Passed through on Chat and Responses API requests |
| Anthropic | Adds cache_control: { type: "ephemeral" } to the request |
| Google Gemini | Maps to cached_content.name (must be a valid cached-content resource name) |
| xAI (Grok) | Sent as the x-grok-conv-id HTTP header |
| AWS Bedrock (Converse) | Appends a native CachePoint block |
| Databricks (hosted Claude) | Adds Claude-style cache_control to the last content part |
| Local (mistral-rs) | Paged-attention scheduling is enabled automatically on supported backends (CUDA + Unix) |
params.prompt_cache_retentionOptional. Retention hint for prompt caching, applicable to the OpenAI Responses API only. For example, "24h" requests that the cached content be retained for 24 hours.
datasetsOptional. A list of dataset names that this model should be applied to. For ML models, this preselects the dataset to use for inference.
dependsOnOptional. A list of dependencies that must be loaded and available before this model.