Model config
The model object stored with a version — provider, model id, and sampling parameters — plus the provider-specific rules enforced on save and how you read it back to call your provider.
The model object stores which model to call and how, versioned atomically with the content — so a model swap or a temperature change ships as a new version, no code deploy. In the dashboard it's edited as raw JSON on the model panel.
Shape
Every field is optional:
{
"provider": "anthropic",
"model": "claude-opus-4-8",
"temperature": 0.2,
"max_tokens": 1024,
"top_p": 1,
"top_k": 40,
"stop": ["\n\nHuman:"],
"base_url": "https://my-gateway.example.com/v1",
"credential_id": "cred_abc123"
}| Field | Notes |
|---|---|
provider | One of the supported providers below. Optional — a version may leave it unset. |
model | The model id, e.g. gpt-4o or claude-opus-4-8. Optional — a version may leave it unset. |
temperature | Sampling temperature. |
max_tokens | Max output tokens. Required for some providers (see below). |
top_p | Nucleus sampling. |
top_k | Top-k sampling. Rejected by the OpenAI-schema providers (see below). |
stop | Stop sequences. |
base_url | Custom endpoint. Required for openai_compat. |
credential_id | The stored credential to authenticate the call with. |
Both provider and model are optional. A version may leave them unset — the caller reads them back empty and supplies its own. That's why your calling code should treat them as possibly-absent (model.model ?? 'gpt-4o').
Providers
openai, anthropic, gemini, mistral, groq, deepseek, xai, fireworks, openai_compat, azure_openai, vertex_ai, bedrock.
Provider-specific rules
These are validated at save time — an invalid combination is rejected with a specific message rather than accepted and silently ignored:
anthropicandbedrockrequiremax_tokens. They reject a call without it, so the version must carry one.openai,azure_openai, andopenai_compatrejecttop_k. It isn't part of their schema.openai_compatrequiresbase_url. There's no default endpoint to infer.
Reading it back
compile() passes model through unchanged — it never calls a model. Read the fields off prompt.model (or compiled.model) and pass them to your provider client yourself.
const { messages, model } = prompt.compile({ question: 'refund status?' });
const answer = await openai.chat.completions.create({
model: model.model ?? 'gpt-4o',
temperature: model.temperature ?? 0.2,
max_tokens: model.max_tokens,
messages,
});compiled = prompt.compile(question="refund status?")
answer = openai.chat.completions.create(
model=compiled.model.get("model", "gpt-4o"),
temperature=compiled.model.get("temperature", 0.2),
max_tokens=compiled.model.get("max_tokens"),
messages=compiled.messages,
)The model config is a versioned recommendation, not a hosted call. Trodo stores it and hands it back; you route it to whichever provider client you already use.
Variables & templating
Declared variables with optional defaults, message-list placeholders, and the strict Mustache-subset syntax that fills them. Compile always succeeds with whatever you pass; a missing value falls back to the default, or empty.
Model config
The model object stored with a version — provider, model id, and sampling parameters — plus the provider-specific rules enforced on save and how you read it back to call your provider.