.. include:: /Includes.rst.txt .. _developer-configuration-presets: ===================== Configuration presets ===================== A consuming extension can declare the ``LlmConfiguration`` records it needs as **configuration presets**. nr_llm lists declared-but-not-yet imported presets as *pending*; a backend admin imports one with a single confirmation. See :ref:`ADR-056 ` for the design rationale. A preset expresses **requirements** — model capabilities and constraints as :php:`ModelSelectionCriteria` — never a concrete provider, model, or API key. The imported record runs in criteria selection mode, so :php:`ModelSelectionService` resolves the actual model on every run against whatever the admin has configured. .. _developer-configuration-presets-declaring: Declaring presets in your extension =================================== Implement :php:`ConfigurationPresetProviderInterface`. The ``nr_llm.configuration_preset`` DI tag is applied automatically when your extension's :file:`Services.yaml` has ``autoconfigure: true`` (the TYPO3 default): .. code-block:: php `). Admins normally go through the Configurations backend module, which renders the pending presets — including each preflight result — above the configuration records and imports one through ``nrllm_preset_import`` with a single click; see :ref:`administration-configurations-presets`. .. _developer-configuration-presets-drift: Change detection ================ ``nrllm_preset_list`` additionally returns a ``drifted`` list: imported presets whose current declaration checksum no longer matches the ``preset_checksum`` stored at import time. Each entry carries ``identifier``, ``name``, and ``configurationUid``. The Configurations module flags such records with a non-blocking "Preset changed" hint. Detection only: nr_llm never updates an imported record automatically. If your extension changes a preset declaration, document what admins should adjust — the checksum-driven update flow (diff + re-confirm) is deliberately deferred (:ref:`ADR-056 `).