---
title: "Configuration"
manual: "AI Content Quality Assistant"
version: "main"
permalink: "https://docs.typo3.org/permalink/woit/t3-content-quality:configuration@main"
source: "Configuration/Index.rst"
rendered: "2026-09-29T16:45:18+00:00"
---

# Configuration {#configuration}

-   [Extension configuration](https://docs.typo3.org/permalink/woit/t3-content-quality:extension-configuration@main)
-   [AI button in the rich-text editor](https://docs.typo3.org/permalink/woit/t3-content-quality:ai-button-in-the-rich-text-editor@main)
-   [Page field: schema type](https://docs.typo3.org/permalink/woit/t3-content-quality:page-field-schema-type@main)
-   [Frontend JSON-LD middleware](https://docs.typo3.org/permalink/woit/t3-content-quality:frontend-json-ld-middleware@main)

## Extension configuration {#configuration-extension}

Open **System > Settings > Extension Configuration** and select
`t3_content_quality`. The settings are stored in
`config/system/settings.php` under
`$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3_content_quality']`.

### General {#configuration-provider}

-   **aiProvider**

    -   *Type:* options
    -   *Default:* `ollama`

    The AI provider used by all AI features. Possible values:

    -   **`anthropic`**

        Anthropic Claude. Requires [anthropicApiKey](https://docs.typo3.org/permalink/woit/t3-content-quality:confval-t3cq-anthropicapikey@main).

    -   **`openai`**

        OpenAI. Requires [openaiApiKey](https://docs.typo3.org/permalink/woit/t3-content-quality:confval-t3cq-openaiapikey@main).

    -   **`ollama`**

        A local Ollama server, no API key needed.
        See [Ollama](https://docs.typo3.org/permalink/woit/t3-content-quality:admin-ollama@main).

-   **enableAiAnalysis**

    -   *Type:* boolean
    -   *Default:* `1`

    Uses the AI during page analysis for improvement suggestions and
    internal link suggestions, and enables AI schema detection.

    When disabled, the page analysis is rule-based only. The on-demand AI
    features (**Fix** buttons, text generator, image metadata) are
    not affected by this switch; they only need a configured provider.

-   **maxTokens**

    -   *Type:* positive integer
    -   *Default:* `16000`

    Upper limit of tokens per AI response for Anthropic and OpenAI. For
    current Claude models the limit also covers the model's thinking, so do
    not set it too low; you only pay for tokens actually generated. If the
    limit is reached before an answer is written, the log shows
    "Anthropic response hit maxTokens before producing text".
    Ollama ignores this setting.

### Anthropic {#configuration-anthropic}

-   **anthropicApiKey**

    -   *Type:* string
    -   *Default:* (empty)

    API key from the [Anthropic Console](https://console.anthropic.com/).
    Required when [aiProvider](https://docs.typo3.org/permalink/woit/t3-content-quality:confval-t3cq-aiprovider@main) is `anthropic`.

-   **anthropicModel**

    -   *Type:* string
    -   *Default:* `claude-sonnet-5-5`

    Model ID sent to the Anthropic Messages API, for example
    `claude-sonnet-5-5` (default), `claude-opus-5-5` (higher quality,
    higher cost) or `claude-haiku-4-5` (lower cost). All three accept
    images, which the [file list metadata button](https://docs.typo3.org/permalink/woit/t3-content-quality:filelist-ai-metadata@main)
    needs. See the
    [list of Anthropic models](https://docs.anthropic.com/en/docs/about-claude/models)
    for current model IDs, as older models are retired over time.

-   **anthropicEffort**

    -   *Type:* options
    -   *Default:* `low`

    How much the model thinks before answering: `low`, `medium`,
    `high` or `off`. The extension's tasks are short, so `low` keeps
    cost and response time down. The value is sent as
    `output_config.effort`. It is not sent for `claude-haiku-*` and
    `claude-3*` models, which do not support it; `off` never sends it.

-   **anthropicFallback**

    -   *Type:* boolean
    -   *Default:* `1`

    If the model declines a request (`stop_reason: refusal`), Anthropic
    can retry it on another model server-side (`fallbacks: "default"`,
    beta header `server-side-fallback-2026-07-01`). Only sent for models
    that support it (`claude-sonnet-5-5`, `claude-opus-5-5`,
    `claude-opus-5`, `claude-fable-5-1`). Declined requests that are not
    retried are logged with their refusal category.

### OpenAI {#configuration-openai}

-   **openaiApiKey**

    -   *Type:* string
    -   *Default:* (empty)

    API key from the OpenAI platform. Required when
    [aiProvider](https://docs.typo3.org/permalink/woit/t3-content-quality:confval-t3cq-aiprovider@main) is `openai`.

-   **openaiModel**

    -   *Type:* string
    -   *Default:* `gpt-4o-mini`

    Model ID sent to the OpenAI Chat Completions API. For image metadata the
    model must support image input (`gpt-4o-mini` does).

### Ollama {#configuration-ollama}

-   **ollamaModel**

    -   *Type:* string
    -   *Default:* `llama3.2`

    Name of an Ollama model that has been pulled on the Ollama server, for
    example `llama3.2`, `phi3` or `mistral`.

    For the [file list metadata button](https://docs.typo3.org/permalink/woit/t3-content-quality:filelist-ai-metadata@main) the
    model must support images, for example `llava` or
    `llama3.2-vision`. Text-only models ignore the image.

-   **ollamaUrl**

    -   *Type:* string
    -   *Default:* `http://ollama:11434`

    Base URL of the Ollama server, without `/api`. The default is the
    host name of an `ollama` container in a Docker Compose or DDEV setup.
    For a local installation use `http://localhost:11434`.

### Keep API keys out of version control {#configuration-api-keys-env}

`config/system/settings.php` is usually committed to Git. Do not store
API keys there. Set them from an environment variable in
`config/system/additional.php` instead:

**config/system/additional.php**

```php
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3_content_quality']['aiProvider'] = 'openai';
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3_content_quality']['openaiApiKey']
    = (string)getenv('OPENAI_API_KEY');
```

Values set in `additional.php` override the values from the backend
settings form.

## AI button in the rich-text editor {#configuration-ckeditor}

The **✦ AI** button needs the system extension `rte_ckeditor`.
The extension does not change existing editor presets. Use one of these
three ways to add the button:

### Option 1: Use the preset of the extension {#configuration-ckeditor-preset}

The extension registers the RTE preset `t3_content_quality` in
`ext_localconf.php`. It is the TYPO3 core default preset plus the AI
button at the end of the toolbar. Activate it in page TSconfig:

**EXT:my_sitepackage/Configuration/page.tsconfig**

```typoscript
RTE.default.preset = t3_content_quality
```

### Option 2: Import the plugin into your own preset {#configuration-ckeditor-import}

Import `EXT:t3_content_quality/Configuration/RTE/Plugin.yaml` in your
own preset:

**EXT:my_sitepackage/Configuration/RTE/Default.yaml**

```yaml
imports:
  - { resource: 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml' }
  - { resource: 'EXT:t3_content_quality/Configuration/RTE/Plugin.yaml' }
```

The TYPO3 YAML loader appends list entries in the order the files are
loaded: imported files first, then the preset's own content. If your preset
defines its own `toolbar.items`, the AI button therefore appears at the
**start** of the toolbar. Use option 3 to place it elsewhere.

### Option 3: Add the button manually {#configuration-ckeditor-manual}

Add the module and the toolbar item to your preset where you want them:

**EXT:my_sitepackage/Configuration/RTE/Default.yaml**

```yaml
editor:
  config:
    importModules:
      - { module: '@woit/t3-content-quality/CKEditor/ai-text-generator.js', exports: ['AiTextGenerator'] }
    toolbar:
      items:
        # … your existing toolbar items …
        - '|'
        - aiTextGenerator
```

See [Configuration](https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/Configuration/Index.html#configuration) for details on RTE presets.

## Page field: schema type {#configuration-page-field}

The extension adds the field **Schema Type (Structured Data)**
(`tx_t3contentquality_schema_type`) to the **Meta Tags** palette
on the **Metadata** tab of the page properties. It overrides the
automatic schema.org type detection.

Options: *(Auto-detect)*, `Event`, `NewsArticle`, `TouristAttraction`,
`LocalBusiness`, `Organization`, `FAQPage`, `JobPosting`,
`Product`.

## Frontend JSON-LD middleware {#configuration-middleware}

The PSR-15 middleware `woit/t3-content-quality/json-ld-injector` is
registered automatically for the frontend. It runs after
`typo3/cms-frontend/output-compression` and before
`typo3/cms-frontend/send-response`.

For every HTML response it looks up an approved schema for the current page
and language in `tx_t3contentquality_schema`. If one exists, it inserts

```html
<script type="application/ld+json">…</script>
```

directly before `</head>`. No TypoScript is needed. Pages without an
approved schema are not changed.
