Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
feat(api): serve the architecture capability table
Alexander Eichhornf357dec8a933
diff --git a/invokeai/app/api/routers/model_manager.py b/invokeai/app/api/routers/model_manager.pyindex 3fe863c2d3..7870595d5e 100644--- a/invokeai/app/api/routers/model_manager.py+++ b/invokeai/app/api/routers/model_manager.py@@ -33,6 +33,7 @@ from invokeai.app.services.model_records import (from invokeai.app.services.orphaned_models import OrphanedModelInfofrom invokeai.app.services.shared.sqlite.sqlite_common import SQLiteDirectionfrom invokeai.app.util.suppress_output import SuppressOutput+from invokeai.backend.architectures import ArchitectureCapabilities, architecture_capabilitiesfrom invokeai.backend.model_manager.configs.external_api import ExternalApiModelConfigfrom invokeai.backend.model_manager.configs.factory import AnyModelConfig, ModelConfigFactoryfrom invokeai.backend.model_manager.configs.main import (@@ -157,6 +158,25 @@ example_model_input = {##############################################################################+@model_manager_router.get(+ "/capabilities",+ operation_id="list_architecture_capabilities",+ responses={200: {"description": "What each model architecture supports"}},+)+async def list_architecture_capabilities() -> list[ArchitectureCapabilities]:+ """What each model architecture can generate, and which generation features it supports.++ A static table, the same for every install and every user, derived from what the architectures+ declare under `invokeai/backend/architectures/defs/`. Fetch it once and join it against model+ records locally: look up `(base, variant)`, fall back to `(base, null)`.++ Deliberately not a field on the model records themselves — it is the same for every model of an+ architecture, and putting it there would add these fields to all 115 config schemas. No auth+ dependency for the same reason: there is nothing user- or install-specific in it.+ """+ return architecture_capabilities()++@model_manager_router.get("/",operation_id="list_model_records",diff --git a/invokeai/backend/architectures/__init__.py b/invokeai/backend/architectures/__init__.pyindex 409f921d0e..6e5e1f11d7 100644--- a/invokeai/backend/architectures/__init__.py+++ b/invokeai/backend/architectures/__init__.py@@ -6,6 +6,13 @@ Import this package to use the registry; importing it fills the registry as a sifrom invokeai.backend.architectures import defs as defs # noqa: F401 (imported for side effects)from invokeai.backend.architectures import facets as facets # noqa: F401 (imported for side effects)+from invokeai.backend.architectures.capabilities import (+ ArchitectureCapabilities,+ ArchitectureFeatures,+ ArchitectureModality,+ NegativePromptPolicy,+ architecture_capabilities,+)from invokeai.backend.architectures.facet import Facetfrom invokeai.backend.architectures.facets.conditioning import ConditioningFacet, conditioning_infosfrom invokeai.backend.architectures.facets.default_settings import (@@ -39,6 +46,11 @@ from invokeai.backend.architectures.registry import ()__all__ = [+ "ArchitectureCapabilities",+ "ArchitectureFeatures",+ "ArchitectureModality",+ "NegativePromptPolicy",+ "architecture_capabilities","ArchitectureError","ConditioningFacet","DefaultSettingsFacet",diff --git a/invokeai/backend/architectures/capabilities.py b/invokeai/backend/architectures/capabilities.pynew file mode 100644index 0000000000..a10b65c2af--- /dev/null+++ b/invokeai/backend/architectures/capabilities.py@@ -0,0 +1,169 @@+"""The architecture table, in the shape a client fetches it.++One row per architecture, plus a row per variant that answers differently. A client fetches this+once and joins it against model records locally: look up `(base, variant)`, fall back to+`(base, None)`.++This is not `ExternalModelCapabilities`, and deliberately not a subclass of it. That describes one+external provider's model — aspect ratios, resolution presets, mask format, per-request image+limits — and is stored on each such record. This describes an architecture, is the same for every+model of that architecture, and is not stored anywhere. Merging them would put fifteen irrelevant+fields on a schema webv2 already consumes.++Also deliberately not a computed field on `AnyModelConfig`: that would add these fields to all 115+config schemas and risk them being persisted into model records.+"""++from pydantic import BaseModel, ConfigDict, Field++from invokeai.backend.architectures.facets.default_settings import DefaultSettingsFacet+from invokeai.backend.architectures.facets.features import (+ ControlKind,+ FeaturesFacet,+ NegativePromptUsage,+ SchedulerSet,+)+from invokeai.backend.architectures.facets.latent_space import LatentSpaceFacet+from invokeai.backend.architectures.facets.modality import GenerationModeKind, ModalityFacet+from invokeai.backend.architectures.registry import generative_bases, get+from invokeai.backend.model_manager.configs.default_settings import MainModelDefaultSettings+from invokeai.backend.model_manager.taxonomy import BaseModelType+++class NegativePromptPolicy(BaseModel):+ visible: bool = Field(description="Whether to show a negative prompt field at all.")+ usage: NegativePromptUsage = Field(+ description="'always', 'cfg-gated' (only above CFG 1), or 'never'.",+ )++ model_config = ConfigDict(extra="forbid")+++class ArchitectureModality(BaseModel):+ """What this architecture can produce, and what it calls it in image metadata."""++ modes: list[GenerationModeKind] = Field(description="Sorted. Empty means it generates nothing on its own.")+ metadata_slug: str | None = Field(+ default=None,+ description="Prefix its mode strings carry in image metadata; null means unprefixed.",+ )++ model_config = ConfigDict(extra="forbid")+++class ArchitectureFeatures(BaseModel):+ """What a UI may offer for this architecture."""++ negative_prompt: NegativePromptPolicy+ dimension_grid: int = Field(description="Width and height must be a multiple of this.")+ spatial_compression: int = Field(description="How much smaller a latent is than the image, per side.")+ guidance_label: str = Field(description="What to call the guidance slider: 'CFG' or 'Guidance'.")+ scheduler_set: SchedulerSet | None = Field(+ default=None, description="Which scheduler family to offer; null means no choice."+ )+ scheduler_applies_to_graph: bool = False+ control_kinds: list[ControlKind] = Field(default_factory=list, description="Sorted.")+ max_reference_images: int = 0+ reference_images_require_variant: str | None = Field(+ default=None,+ description="If set, reference images are only accepted for models of this variant.",+ )+ supports_regional_guidance: bool = False+ regional_negative: bool = False+ clip_skip_max: int | None = None+ supports_seamless: bool = False+ supports_cfg_rescale: bool = False+ sd_vae_override: bool = False+ color_compensation: bool = False+ vae_precision: bool = False++ model_config = ConfigDict(extra="forbid")+++class ArchitectureCapabilities(BaseModel):+ """One row of the table."""++ base: BaseModelType+ variant: str | None = Field(+ default=None,+ description="Null for the architecture's own row. A variant row overrides it.",+ )+ modality: ArchitectureModality+ features: ArchitectureFeatures+ defaults: MainModelDefaultSettings | None = Field(+ default=None, description="Recommended generation parameters, if the architecture has any."+ )++ model_config = ConfigDict(extra="forbid")+++def _features_of(facet: FeaturesFacet, spatial_compression: int) -> ArchitectureFeatures:+ return ArchitectureFeatures(+ negative_prompt=NegativePromptPolicy(+ visible=facet.negative_prompt.visible,+ usage=facet.negative_prompt.usage,+ ),+ dimension_grid=facet.dimension_grid,+ spatial_compression=spatial_compression,+ guidance_label=facet.guidance_label,+ scheduler_set=facet.scheduler_set,+ scheduler_applies_to_graph=facet.scheduler_applies_to_graph,+ control_kinds=sorted(facet.control_kinds),+ max_reference_images=facet.max_reference_images,+ reference_images_require_variant=facet.reference_images_require_variant,+ supports_regional_guidance=facet.supports_regional_guidance,+ regional_negative=facet.regional_negative,+ clip_skip_max=facet.clip_skip_max,+ supports_seamless=facet.supports_seamless,+ supports_cfg_rescale=facet.supports_cfg_rescale,+ sd_vae_override=facet.sd_vae_override,+ color_compensation=facet.color_compensation,+ vae_precision=facet.vae_precision,+ )+++def architecture_capabilities() -> list[ArchitectureCapabilities]:+ """Every row, base rows first, then the variant rows that override them.++ A variant gets its own row only where something actually differs — today that is the five+ architectures whose recommended parameters depend on the variant. Feature differences that hang+ on a variant are expressed on the base row instead, by+ `features.reference_images_require_variant`; Qwen-Image is the only one, and inventing a row for+ it would mean inventing which fields a variant row is allowed to omit.++ Sorted by base value, then variant, so the response is stable and diffable.+ """+ rows: list[ArchitectureCapabilities] = []+ for base in sorted(generative_bases(), key=lambda b: b.value):+ modality = get(base, ModalityFacet)+ features = get(base, FeaturesFacet)+ latent_space = get(base, LatentSpaceFacet)+ defaults = get(base, DefaultSettingsFacet)+ # All four are REQUIRED, so `validate()` has already refused to start without them.+ assert modality is not None and features is not None and latent_space is not None+ assert defaults is not None++ rendered = ArchitectureModality(modes=sorted(modality.modes), metadata_slug=modality.metadata_slug)+ rendered_features = _features_of(features, latent_space.primary.spatial_compression)++ rows.append(+ ArchitectureCapabilities(+ base=base,+ modality=rendered,+ features=rendered_features,+ defaults=defaults.resolve(),+ )+ )+ for variant in sorted(v for v in defaults.by_variant if v is not None):+ rows.append(+ ArchitectureCapabilities(+ base=base,+ # `.value`, not `str()`: these are `str`-mixin enums, and `str()` on one yields+ # "FluxVariantType.DevFill" rather than the "dev_fill" a client stores and sends.+ variant=variant.value,+ modality=rendered,+ features=rendered_features,+ defaults=defaults.by_variant[variant],+ )+ )+ return rowsdiff --git a/invokeai/frontend/web/openapi.json b/invokeai/frontend/web/openapi.jsonindex e5f418d205..a111b8f1d0 100644--- a/invokeai/frontend/web/openapi.json+++ b/invokeai/frontend/web/openapi.json@@ -604,6 +604,30 @@]}},+ "/api/v2/models/capabilities": {+ "get": {+ "tags": ["model_manager"],+ "summary": "List Architecture Capabilities",+ "description": "What each model architecture can generate, and which generation features it supports.\n\nA static table, the same for every install and every user, derived from what the architectures\ndeclare under `invokeai/backend/architectures/defs/`. Fetch it once and join it against model\nrecords locally: look up `(base, variant)`, fall back to `(base, null)`.\n\nDeliberately not a field on the model records themselves \u2014 it is the same for every model of an\narchitecture, and putting it there would add these fields to all 115 config schemas. No auth\ndependency for the same reason: there is nothing user- or install-specific in it.",+ "operationId": "list_architecture_capabilities",+ "responses": {+ "200": {+ "description": "What each model architecture supports",+ "content": {+ "application/json": {+ "schema": {+ "items": {+ "$ref": "#/components/schemas/ArchitectureCapabilities"+ },+ "type": "array",+ "title": "Response List Architecture Capabilities"+ }+ }+ }+ }+ }+ }+ },"/api/v2/models/": {"get": {"tags": ["model_manager"],@@ -16009,6 +16033,194 @@"$ref": "#/components/schemas/ImageOutput"}},+ "ArchitectureCapabilities": {+ "properties": {+ "base": {+ "$ref": "#/components/schemas/BaseModelType"+ },+ "variant": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Variant",+ "description": "Null for the architecture's own row. A variant row overrides it."+ },+ "modality": {+ "$ref": "#/components/schemas/ArchitectureModality"+ },+ "features": {+ "$ref": "#/components/schemas/ArchitectureFeatures"+ },+ "defaults": {+ "anyOf": [+ {+ "$ref": "#/components/schemas/MainModelDefaultSettings"+ },+ {+ "type": "null"+ }+ ],+ "description": "Recommended generation parameters, if the architecture has any."+ }+ },+ "additionalProperties": false,+ "type": "object",+ "required": ["base", "modality", "features"],+ "title": "ArchitectureCapabilities",+ "description": "One row of the table."+ },+ "ArchitectureFeatures": {+ "properties": {+ "negative_prompt": {+ "$ref": "#/components/schemas/NegativePromptPolicy"+ },+ "dimension_grid": {+ "type": "integer",+ "title": "Dimension Grid",+ "description": "Width and height must be a multiple of this."+ },+ "spatial_compression": {+ "type": "integer",+ "title": "Spatial Compression",+ "description": "How much smaller a latent is than the image, per side."+ },+ "guidance_label": {+ "type": "string",+ "title": "Guidance Label",+ "description": "What to call the guidance slider: 'CFG' or 'Guidance'."+ },+ "scheduler_set": {+ "anyOf": [+ {+ "type": "string",+ "enum": ["standard", "flow", "anima"]+ },+ {+ "type": "null"+ }+ ],+ "title": "Scheduler Set",+ "description": "Which scheduler family to offer; null means no choice."+ },+ "scheduler_applies_to_graph": {+ "type": "boolean",+ "title": "Scheduler Applies To Graph",+ "default": false+ },+ "control_kinds": {+ "items": {+ "type": "string",+ "enum": ["controlnet", "t2i_adapter", "control_lora", "z_image_control"]+ },+ "type": "array",+ "title": "Control Kinds",+ "description": "Sorted."+ },+ "max_reference_images": {+ "type": "integer",+ "title": "Max Reference Images",+ "default": 0+ },+ "reference_images_require_variant": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Reference Images Require Variant",+ "description": "If set, reference images are only accepted for models of this variant."+ },+ "supports_regional_guidance": {+ "type": "boolean",+ "title": "Supports Regional Guidance",+ "default": false+ },+ "regional_negative": {+ "type": "boolean",+ "title": "Regional Negative",+ "default": false+ },+ "clip_skip_max": {+ "anyOf": [+ {+ "type": "integer"+ },+ {+ "type": "null"+ }+ ],+ "title": "Clip Skip Max"+ },+ "supports_seamless": {+ "type": "boolean",+ "title": "Supports Seamless",+ "default": false+ },+ "supports_cfg_rescale": {+ "type": "boolean",+ "title": "Supports Cfg Rescale",+ "default": false+ },+ "sd_vae_override": {+ "type": "boolean",+ "title": "Sd Vae Override",+ "default": false+ },+ "color_compensation": {+ "type": "boolean",+ "title": "Color Compensation",+ "default": false+ },+ "vae_precision": {+ "type": "boolean",+ "title": "Vae Precision",+ "default": false+ }+ },+ "additionalProperties": false,+ "type": "object",+ "required": ["negative_prompt", "dimension_grid", "spatial_compression", "guidance_label"],+ "title": "ArchitectureFeatures",+ "description": "What a UI may offer for this architecture."+ },+ "ArchitectureModality": {+ "properties": {+ "modes": {+ "items": {+ "type": "string",+ "enum": ["txt2img", "img2img", "inpaint", "outpaint", "t2v", "i2v"]+ },+ "type": "array",+ "title": "Modes",+ "description": "Sorted. Empty means it generates nothing on its own."+ },+ "metadata_slug": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "title": "Metadata Slug",+ "description": "Prefix its mode strings carry in image metadata; null means unprefixed."+ }+ },+ "additionalProperties": false,+ "type": "object",+ "required": ["modes"],+ "title": "ArchitectureModality",+ "description": "What this architecture can produce, and what it calls it in image metadata."+ },"BaseMetadata": {"properties": {"name": {@@ -73450,6 +73662,25 @@"$ref": "#/components/schemas/IntegerOutput"}},+ "NegativePromptPolicy": {+ "properties": {+ "visible": {+ "type": "boolean",+ "title": "Visible",+ "description": "Whether to show a negative prompt field at all."+ },+ "usage": {+ "type": "string",+ "enum": ["always", "cfg-gated", "never"],+ "title": "Usage",+ "description": "'always', 'cfg-gated' (only above CFG 1), or 'never'."+ }+ },+ "additionalProperties": false,+ "type": "object",+ "required": ["visible", "usage"],+ "title": "NegativePromptPolicy"+ },"NodeFieldValue": {"properties": {"node_path": {diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.tsindex a7b094c67d..aeb89c6b66 100644--- a/invokeai/frontend/web/src/services/api/schema.ts+++ b/invokeai/frontend/web/src/services/api/schema.ts@@ -384,6 +384,34 @@ export type paths = {patch?: never;trace?: never;};+ "/api/v2/models/capabilities": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * List Architecture Capabilities+ * @description What each model architecture can generate, and which generation features it supports.+ *+ * A static table, the same for every install and every user, derived from what the architectures+ * declare under `invokeai/backend/architectures/defs/`. Fetch it once and join it against model+ * records locally: look up `(base, variant)`, fall back to `(base, null)`.+ *+ * Deliberately not a field on the model records themselves — it is the same for every model of an+ * architecture, and putting it there would add these fields to all 115 config schemas. No auth+ * dependency for the same reason: there is nothing user- or install-specific in it.+ */+ get: operations["list_architecture_capabilities"];+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };"/api/v2/models/": {parameters: {query?: never;@@ -4610,6 +4638,122 @@ export type components = {*/type: "apply_mask_to_image";};+ /**+ * ArchitectureCapabilities+ * @description One row of the table.+ */+ ArchitectureCapabilities: {+ base: components["schemas"]["BaseModelType"];+ /**+ * Variant+ * @description Null for the architecture's own row. A variant row overrides it.+ */+ variant?: string | null;+ modality: components["schemas"]["ArchitectureModality"];+ features: components["schemas"]["ArchitectureFeatures"];+ /** @description Recommended generation parameters, if the architecture has any. */+ defaults?: components["schemas"]["MainModelDefaultSettings"] | null;+ };+ /**+ * ArchitectureFeatures+ * @description What a UI may offer for this architecture.+ */+ ArchitectureFeatures: {+ negative_prompt: components["schemas"]["NegativePromptPolicy"];+ /**+ * Dimension Grid+ * @description Width and height must be a multiple of this.+ */+ dimension_grid: number;+ /**+ * Spatial Compression+ * @description How much smaller a latent is than the image, per side.+ */+ spatial_compression: number;+ /**+ * Guidance Label+ * @description What to call the guidance slider: 'CFG' or 'Guidance'.+ */+ guidance_label: string;+ /**+ * Scheduler Set+ * @description Which scheduler family to offer; null means no choice.+ */+ scheduler_set?: ("standard" | "flow" | "anima") | null;+ /**+ * Scheduler Applies To Graph+ * @default false+ */+ scheduler_applies_to_graph?: boolean;+ /**+ * Control Kinds+ * @description Sorted.+ */+ control_kinds?: ("controlnet" | "t2i_adapter" | "control_lora" | "z_image_control")[];+ /**+ * Max Reference Images+ * @default 0+ */+ max_reference_images?: number;+ /**+ * Reference Images Require Variant+ * @description If set, reference images are only accepted for models of this variant.+ */+ reference_images_require_variant?: string | null;+ /**+ * Supports Regional Guidance+ * @default false+ */+ supports_regional_guidance?: boolean;+ /**+ * Regional Negative+ * @default false+ */+ regional_negative?: boolean;+ /** Clip Skip Max */+ clip_skip_max?: number | null;+ /**+ * Supports Seamless+ * @default false+ */+ supports_seamless?: boolean;+ /**+ * Supports Cfg Rescale+ * @default false+ */+ supports_cfg_rescale?: boolean;+ /**+ * Sd Vae Override+ * @default false+ */+ sd_vae_override?: boolean;+ /**+ * Color Compensation+ * @default false+ */+ color_compensation?: boolean;+ /**+ * Vae Precision+ * @default false+ */+ vae_precision?: boolean;+ };+ /**+ * ArchitectureModality+ * @description What this architecture can produce, and what it calls it in image metadata.+ */+ ArchitectureModality: {+ /**+ * Modes+ * @description Sorted. Empty means it generates nothing on its own.+ */+ modes: ("txt2img" | "img2img" | "inpaint" | "outpaint" | "t2v" | "i2v")[];+ /**+ * Metadata Slug+ * @description Prefix its mode strings carry in image metadata; null means unprefixed.+ */+ metadata_slug?: string | null;+ };/*** BaseMetadata* @description Adds typing data for discriminated union.@@ -30682,6 +30826,20 @@ export type components = {*/type: "mul";};+ /** NegativePromptPolicy */+ NegativePromptPolicy: {+ /**+ * Visible+ * @description Whether to show a negative prompt field at all.+ */+ visible: boolean;+ /**+ * Usage+ * @description 'always', 'cfg-gated' (only above CFG 1), or 'never'.+ * @enum {string}+ */+ usage: "always" | "cfg-gated" | "never";+ };/** NodeFieldValue */NodeFieldValue: {/**@@ -44509,6 +44667,26 @@ export interface operations {};};};+ list_architecture_capabilities: {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description What each model architecture supports */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["ArchitectureCapabilities"][];+ };+ };+ };+ };list_model_records: {parameters: {query?: {diff --git a/tests/app/routers/test_architecture_capabilities.py b/tests/app/routers/test_architecture_capabilities.pynew file mode 100644index 0000000000..372f14f177--- /dev/null+++ b/tests/app/routers/test_architecture_capabilities.py@@ -0,0 +1,61 @@+"""GET /api/v2/models/capabilities — the static architecture table.++It touches no service and no database: the rows come from what the architectures declare at import+time. That is what lets this test use a bare client, and it is also the property worth pinning —+a later version that reaches for `ApiDependencies.invoker` would fail here rather than in production.+"""++from fastapi.testclient import TestClient++from invokeai.app.api_app import app+from invokeai.backend.architectures import architecture_capabilities, generative_bases++client = TestClient(app)+URL = "/api/v2/models/capabilities"+++def test_it_serves_a_row_for_every_architecture() -> None:+ response = client.get(URL)+ assert response.status_code == 200++ rows = response.json()+ base_rows = [r for r in rows if r["variant"] is None]+ assert {r["base"] for r in base_rows} == {b.value for b in generative_bases()}+ assert len(base_rows) == len(generative_bases()), "one row per architecture, no duplicates"+++def test_variant_rows_override_their_base_row() -> None:+ """FLUX is the clearest case: three variants, three genuinely different answers."""+ rows = client.get(URL).json()+ flux = {r["variant"]: r for r in rows if r["base"] == "flux"}++ assert set(flux) == {None, "schnell", "dev_fill"}+ assert flux["schnell"]["defaults"]["steps"] == 4+ assert flux["dev_fill"]["defaults"]["guidance"] == 30.0+ assert flux[None]["defaults"]["steps"] == 28, "the base row is dev"+++def test_the_variant_is_the_value_a_client_holds() -> None:+ """Not `str(enum)`, which would serialize as `FluxVariantType.DevFill`."""+ variants = {r["variant"] for r in client.get(URL).json() if r["variant"] is not None}+ assert all("." not in v for v in variants), variants+ assert "dev_fill" in variants+++def test_it_needs_no_services() -> None:+ """No auth, no invoker, no database — the same table for every install and every user."""+ assert client.get(URL).status_code == 200+++def test_the_response_matches_what_the_registry_renders() -> None:+ """The route is a pass-through; anything it added would be a second source of truth."""+ served = client.get(URL).json()+ rendered = [row.model_dump(mode="json") for row in architecture_capabilities()]+ assert served == rendered+++def test_the_rows_are_ordered_stably() -> None:+ """Sorted by base, so a client diffing two responses sees only real changes."""+ rows = client.get(URL).json()+ bases = [r["base"] for r in rows]+ assert bases == sorted(bases)diff --git a/tests/backend/architectures/test_layering.py b/tests/backend/architectures/test_layering.pyindex b9cfc95cad..91efce8540 100644--- a/tests/backend/architectures/test_layering.py+++ b/tests/backend/architectures/test_layering.py@@ -53,6 +53,14 @@ def _allowed_for(path: str) -> tuple[str, frozenset[str], tuple[str, ...]] | Nonreturn "facet-is-a-leaf", frozenset(), ()if path == f"{ARCH_DIR}/registry.py":return "registry-is-a-leaf", frozenset({f"{ARCH}.facet", TAXONOMY}), ()+ if path == f"{ARCH_DIR}/capabilities.py":+ # The one module that reads across facets: it renders the table the API serves. It may+ # name every facet, but still not the aggregate — it is imported by it.+ return (+ "capabilities-allowlist",+ frozenset({f"{ARCH}.facet", f"{ARCH}.facets", f"{ARCH}.registry", TAXONOMY, DEFAULT_SETTINGS}),+ (f"{ARCH}.facets.",),+ )if path == f"{ARCH_DIR}/__init__.py":return "aggregate-is-a-facade", frozenset({ARCH}), (f"{ARCH}.",)if path.startswith(f"{ARCH_DIR}/facets/"):