nr-llm wiring: providers, models, Configurations
nr_repurpose never talks to an AI provider directly and never picks one itself. It names nr-llm Configuration records (use cases) and lets nr-llm resolve the model, the provider, the API key, the system prompt, and the usage/cost attribution. Set everything up in nr-llm's backend module (Admin Tools > LLM Management):
- Create a Provider whose API key references the key identifier nr-llm issued during installation (see Hand the provider key to nr-llm).
- Create the Models you want to use (or fetch them via nr-llm's model discovery), including the specialized ones (image, text-to-speech).
- Import the Configuration records nr_repurpose declares as presets. nr_repurpose ships the three records below as configuration presets (nr-llm ADR-056): open nr-llm's Configurations module and each appears as a pending preset with its required capabilities. Import each preset. The text preset can select a chat model by its criteria. To select a specific image or speech model, assign an active, supported model directly on the corresponding configuration. Without that assignment, these services consult the model registry and then use the defaults below. You can also create records with these identifiers by hand.
| Configuration identifier | Used for | Model choice |
|---|---|---|
nr_ | Analysis and copy: the brief, the podcast script, the diagram body, the story copy. If the worker cannot resolve this record, the site and instance settings determine routing (see A site's own LLM configuration). | Any chat model of any nr-llm provider — OpenAI, Anthropic Claude, Google Gemini, Groq, Mistral, Ollama, OpenRouter. |
nr_ | AI imagery (Schaubild backgrounds and full images, story backgrounds). | A model supported by the bundled OpenAI image adapter. Without a
usable configured model, nr-llm checks the model registry before
using gpt-. The record's system prompt
acts as a style preamble for every image prompt. |
nr_ | Podcast speech synthesis. | Any model of nr-llm's text-to-speech service (currently OpenAI tts-
/ tts-). Without a usable configured model, nr-llm checks
the model registry before using tts-. |
Swapping a model — or, for text, the provider — is a backend-only change: edit the Configuration record, no code or deployment involved. Per-model and per-configuration usage and cost appear in nr-llm's analytics module.
The bundled image and speech adapters use OpenAI endpoints by default. To
use an endpoint that supports the same image or speech API, set
image. or speech. in the nr-llm extension
configuration. For a service using a different protocol, supply an adapter
for Image or Speech and
update the corresponding alias in Configuration/.
Keys are always referenced by identifier: both the chat providers and the specialized services let nr-llm resolve and inject the key — no plaintext key is ever set here. See ADR-003: Provider Credentials Delegated to nr-llm.
A site's own LLM configuration
A site can name the LLM configuration its AI calls run on, in nr-llm's site
setting nrllm. (see the nr-llm manual, chapter "Site
settings"). A job whose source is a page of that site names the site on every
text call: the analysis, the podcast script, the diagram body, the story copy
and the text and document formats. The site is stored with the job when it is
created, so the worker and a later retry use it.
- While the
nr_record exists, is active and is not restricted to backend groups, the text calls run on it. nr-llm treats an extension's own configuration as an explicit choice that wins over the site. The site then only selects the term lists bound to it.repurpose_ text - Without that record, the text calls take the instance default, and nr-llm replaces it with the configuration the site names. A site that names a configuration that does not exist, is disabled or is restricted to backend groups fails the job; there is no fallback to the default.
- A job from a URL or a PDF has no site override. When the worker cannot
resolve
nr_, the job uses the instance default.repurpose_ text - Images (
nr_), speech (repurpose_ image nr_) and the OCR of PDF pages do not use the site's configuration.repurpose_ tts - A page tree whose pages belong to several sites uses the site of the first page the job reads.
To let the sites' configurations answer, nr_ has to go:
first mark another configuration as the instance default, one with a model
assigned directly (not chosen by criteria) and without a backend-group
restriction, because nr-llm does not use any other configuration as the
default. Then delete or deactivate nr_. If it is the instance default when it goes,
the installation has none, and URL and PDF jobs, and page jobs of a site that
names no configuration, fail at the analysis.
A running worker keeps what it read: changes to nr_ and to a
site's nrllm. reach it only after it restarts.
ADR-012: A Page Job Names Its Site records the decisions.
Prompt snippets
The New job form's audience, tone of voice, persona, layout and
style selectors are populated from nr-llm's prompt-snippet library (snippets
tagged audience, tone_, persona, layout, style).
Editors maintain them in nr-llm's backend module; each snippet's description is
shown in the form so the choice is informed. A layout snippet may carry an
image metadata key ("WIDTHx) that sets the AI-image
dimensions for that channel — e.g. skyscraper 768x2160, wide 2160x768.
The starter pack
A fresh installation has no snippets, so all five selectors read (none). The
Content Repurpose Starter use-case pack installs a small library to start
from: two audiences, two tones of voice, three podcast personas with their own
voice, three layouts with their image, and three visual styles.
Install it in nr-llm's Use Case Packs module, or from a provisioning script:
vendor/bin/typo3 nrllm:usecasepack:install content-repurpose-starter
The records it creates are ordinary snippets — rename them, rewrite them, deactivate the ones you do not want. Installing again creates only what is missing and leaves your edits alone.
The text pipeline needs room for its answers. nr-llm stores 1,000 output tokens
on a configuration unless somebody changes the value, and a reasoning model
counts its thinking against that limit, so the brief of a page tree can come back
empty. The extension therefore asks for at least 16,000 tokens per call when the
nr_ record holds a lower value, whichever configuration answers.
nr-llm caps that at the model's output limit where the model states one. 0 on
the record leaves the choice to the model. An instance whose model has a smaller
limit and does not state it has to enter that limit on the model record.
The pack's snippets are not linked to the nr_
configuration by tag, and that is deliberate. This extension resolves the five
families per job, from the selection in the form. Linking them would make
nr-llm compose every active persona, layout and style into every completion as
well — three speakers the job did not choose, and two contradictory image
sizes. See nr-llm's ADR-186.