§22 S6: per-collection enabled_models — the §22.12 model-universe chain
A collection's .collection.yaml may carry an enabled_models list that NARROWS its project's universe, which narrows the deployment ENABLED_MODELS. Resolution (extending §6.6/§6.7): funder ∩ per-entry models ∩ collection ∩ project, with the operator providers as the ceiling. - migration 031: additive collections.config_json (parallels projects.config_json). - registry.parse_collection_manifest: read enabled_models into CollectionEntry.config (absent = inherit, present incl. [] = narrow; [] opts the collection out of AI); reject a non-list. _upsert_named_collection persists config_json. The default collection (from projects.yaml) leaves it NULL — it inherits the project. - models_resolver: _scope_narrowed_universe narrows the operator universe by the entry's project then collection enabled_models; the funder universe is bounded by it too. A collection cannot widen its project (narrowing from the ceiling). - collections.get_collection surfaces enabled_models; GET /api/projects/:id/collections/:cid returns it. - test_s6_collection_models_vertical.py: 9 cases (parse, the narrowing chain incl. opt-out + cannot-widen, API surfacing). Backend: 525 passed. Per SPEC §22.12. Releases as part of v0.45.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- §22.12 S6 — per-collection model universe.
|
||||
--
|
||||
-- A collection's `.collection.yaml` may carry an `enabled_models` list that
|
||||
-- NARROWS its project's universe (which narrows the deployment ENABLED_MODELS).
|
||||
-- Mirrored into a `config_json` blob on the collection row, paralleling
|
||||
-- `projects.config_json` (which already holds the project's enabled_models +
|
||||
-- theme). Additive only — no rebuild. NULL means "no per-collection narrowing;
|
||||
-- inherit the project's universe."
|
||||
ALTER TABLE collections ADD COLUMN config_json TEXT;
|
||||
Reference in New Issue
Block a user