Skip to main content

Settings and configuration

Domain behavior is data, not code. A project keeps its own configuration in its configs index, and the API reads and writes it. This page covers the project settings document, the config store behind it, the vocabulary route that lists every model choice, and cloning settings between projects.

API=http://localhost:4603 and project cars are assumed.

Concepts​

  • Config store. A per-project set of versioned documents: prompt packs, region profiles, the keymap, and one activation document per axis. Every save makes a new numbered revision. Activating a document points the project at one revision. See Prompt packs, Region profiles and Keymaps.
  • Three activation axes. prompt_pack, detection_profile and vlm. The VLM axis names an endpoint from the global registry; see VLM selection. A new activation is checked as a set: the pack, the profile and the VLM must agree with each other.
  • Settings document. One shared document per project. It holds default strategy ids for UI-facing axes. It is not the place for secrets or deployment values.
  • Deployment configuration. Values in .env, such as the ingest detectors and the segmenter service. They change only with a restart.

Read and write settings​

curl -s "$API/curation/projects/cars/settings"
{
"defaults": {"prompt_pack": "vehicle_wheel", "detection_profile": "vehicle_wheel", "vlm": "env"},
"updated_at": null,
"updated_by": null
}

defaults is an open map from axis id to a strategy id. No document yet means defaults is empty. prompt_pack, detection_profile and vlm are read from the config store's activations, not from the settings document. updated_by is always null: there is no user-account system.

Update with a partial body. Only the axes present are changed:

curl -s -X PUT "$API/curation/projects/cars/settings" \
-H 'Content-Type: application/json' \
-d '{"defaults": {"sort": "uncertainty", "detection_profile": "vehicle_wheel"}}'

A null value clears that axis. Settable axes are cluster, sort, prompt_pack, detection_profile and vlm. For cluster and sort, each id must be currently listed by GET /curation/projects/{project}/methods, and an id that orders by a field no item has is refused. For prompt_pack and detection_profile, the id must be a known pack or profile (detection_profile also accepts off). null deactivates the axis. A combined body that changes several config-store axes is checked as one set and applied only if every part passes, so a PUT is never half applied.

Errors:

StatuserrorWhen
422(plain message)Unsettable axis, id not advertised, or a sort field with no coverage
422unknown_vlmThe vlm default names an endpoint that does not exist
422unknown_pack, unknown_profileThe pack or profile id does not exist; valid_ids is returned
422validation_failedThe activation gate refused the pack, profile and VLM combination; report lists the issues
409active_conflictAnother writer changed the activation first
409project_archivedThe project is archived

Vocabulary​

The vocabulary route returns every choice a configuration form needs in one call.

curl -s "$API/curation/projects/cars/config/vocabulary"
curl -s "$API/curation/projects/cars/config/vocabulary?include_other_projects=true"

The response contains:

FieldContent
detectorsDetector models in Triton and promoted models, with ready and source
segmentersConfigured segmenter services with endpoint, status, masks, default score
vlmactive endpoint and every registered endpoint with locality and status
ocrOCR detection, recognition and pipeline models
text_reader_modesValid text reader modes, and whether each needs OCR or a VLM
prompt_pack_callsThe VLM call ids a prompt pack must cover
registry_classesActive (not deprecated) classes of this project
model_choicesThe table below

include_other_projects=true adds detector models other projects have opted to share.

What can be set, and where​

Each row of model_choices has role, scope, current, settable, settable_via and, when not settable, reason.

RoleScopeSettableHow
detect_modelper requestyesmodel_name query parameter on the detect routes
item_detectordeploymentnoOP_INGEST_PRIMARY_DETECTOR_MODEL, then restart
secondary_classifierdeploymentnoOP_INGEST_SECONDARY_DETECTOR_MODEL, then restart
region_detectorregion profileyesdetector_model in the region profile
region_segmenterdeploymentnoOP_SEGMENTER_URL or OP_SEGMENTER_URLS; the prompt is per profile
region_ocrregion profileyesOCR model fields in the region profile
vlmconfig storeyesActivate an endpoint, or pass vlm per run
local_vlm_modeldeploymentonly with an in-compose VLMSelect a catalog entry, then run the host command
item_embedding, search_embeddingdeploymentnoChanging them changes vector size and needs a re-index (future work)
face_modelsdeploymentnoFixed pipeline
training_sizeper runyesmodel_size when starting a training run

Clone settings between projects​

Copy configuration from one project into an existing active project that has nothing in the way. A clone is a starting point, never a merge:

curl -s -X POST "$API/curation/projects/cars/clone_settings" \
-H 'Content-Type: application/json' \
-d '{"from": "default", "axes": ["classes", "prompt_packs", "keymap"], "expected_revision": 2}'

axes is optional. Valid axes are settings_defaults, classes, activations, keymap, prompt_packs and vlm_activation. Omitted or empty means all of them. The response is the project lifecycle envelope. If a copied keymap action collides with a class hotkey in the target, the whole keymap is skipped (the target's keymap is left unchanged) and each colliding action is listed in keymap_clone_conflicts (action_id, combo, class_id, class_name). Nothing is unbound silently. The same options exist at create time through clone_settings_from and clone_axes; see Projects.

Errors:

StatuserrorWhen
404project_not_foundTarget or source unknown
409clone_source_not_readySource is not active or archived
409target_not_emptyclasses: target already has items. prompt_packs: target has stored packs. activations: target already has an active pack or profile, or a stored one with the same name
409revision_conflictexpected_revision is stale
422combine_invalidUnknown axis, or source equals target
422validation_failedA copied activation fails its gate in the target

Values that decide where per-project data lives are OP_PROJECTS_DATA_ROOT, OP_PROJECT_INDEX_PREFIX and OP_STATE_DIR. VLM policy values are OP_VLM_EXTERNAL_POLICY, OP_VLM_SECRETS_DIR and OP_LOCAL_VLM_ENDPOINT. See Basic configuration and Advanced configuration.

Cropwright​

Deployment defaults: active prompt pack, VLM and the other settable values (captured from Cropwright against the public COCO sample projects)
The model choices table with settable and read-only rows (captured from Cropwright against the public COCO sample projects)

See also​