NorthStar treats every prompt edit as an immutable append. When you save a change to a prompt in the dashboard, the existing version is never modified — instead, a newDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sidmanale643/northstar/llms.txt
Use this file to discover all available pages before exploring further.
PromptVersion record is created with an incremented version_number, a fresh content_hash, and a reference to its parent_version_id. This means the full edit history of any prompt is always available, old versions can be re-deployed by moving a label, and you can always determine exactly which content was active at the time a trace was recorded.
PromptVersion fields
Each version is a Pydantic model with the following fields:The unique identifier for this specific version. Referenced by
CompiledPrompt.prompt_version_id and stored in prompt links attached to
model call spans.The UUID of the parent
Prompt this version belongs to. Stable across all
versions of the same prompt.A monotonically increasing integer assigned by the server. Version 1 is the
first version; each subsequent edit increments this by one. Useful for
quick comparisons and for pinning to a specific revision.
The raw template string stored for this version. May contain
{{ jinja }}
and/or {python} variable placeholders. This is the value rendered at
compile time.An optional model identifier hint (e.g.
"gpt-4o-mini") stored alongside
the template. When present, CompiledPrompt inherits this value so your
calling code can read the intended model from the compiled prompt rather than
hardcoding it.An optional sampling temperature hint stored with the version. Inherited by
CompiledPrompt.temperature.An optional maximum token limit hint. Inherited by
CompiledPrompt.max_tokens.A list of variable descriptors auto-extracted from If this field arrives empty from the server, the SDK re-derives it locally
by running
content at version
creation time. Each entry has the shape:variables_schema(content) via a model validator. All detected
variables are marked required: True and type: "string" by default.The
id of the version this version was branched from. None for the
first version of a prompt. Forms a linked list that the dashboard uses to
render the version history timeline.An optional free-text note recorded at version creation time describing what
changed. Displayed in the dashboard history view alongside the diff.
A SHA-256 hash of the version’s
content, prefixed with "sha256:". Used
to detect whether the prompt content active at trace time differs from the
content of the version currently stored — for example, if a label was moved
to a different version between runs.Immutability and the version chain
Once aPromptVersion is created, its content field never changes. Every edit you make in the dashboard creates a brand-new version record. The chain looks like this:
prompt_version_id at the time of compilation, you can always reconstruct the exact template that was active for any historical trace — even after the "production" label has been moved to v4 or v5.
The SDK never mutates a version received from the server. If the
variables
list arrives empty, a Pydantic model validator re-derives it locally from the
content field using variables_schema(), but this does not create a new
server-side version.Labels: named pointers to versions
A label is a string key in thePrompt.labels dict that maps to a version UUID. Labels let you decouple deployment decisions from code changes — your code always asks for label="production", and you control which version that resolves to entirely from the dashboard.
| Label | Convention |
|---|---|
"production" | The version currently serving live traffic |
"staging" | A candidate version under pre-release validation |
"canary" | A version receiving a small fraction of traffic |
Resolving a specific version by number
If you need to pin to an exact version number rather than a label — for example in a deterministic eval run — passversion to pull_prompt:
Using content_hash for drift detection
Thecontent_hash field lets you detect whether the prompt content seen at trace time matches the version you expect. If a label is moved from v3 to v4 between two runs, the content_hash on the prompt links in those traces will differ, making it easy to group and compare results by actual content rather than version number alone.
Variable auto-extraction
Variables are extracted from the template content automatically when a version is created. NorthStar scans the content for both{{ jinja }} and {python} placeholders and stores the result in variables. This means you never have to declare your variable schema manually — the schema is always in sync with the actual template content.