zylon-ai/private-gpt · error · ValueError
Unknown processor: {self._settings.web_search.processor}. Av
Error message
Unknown processor: {self._settings.web_search.processor}. Available: simple_text, scraped_content, clean_content What it means
ValueError from WebSearchService._initialize_processor when the processor string matches none of the branches. Supported branches are simple_text, scraped_content, clean_content, and best_links — note the error message itself is stale: it lists only 'simple_text, scraped_content, clean_content' and omits best_links, which is a valid Literal value and valid branch. Like the provider check, pydantic's Literal normally rejects unknown names earlier, so this fires mainly with unvalidated/hand-built Settings.
Source
Thrown at private_gpt/components/web/web_search/web_search_service.py:149
self._processor = CleanContentProcessor(
settings=self._settings,
scraper_service=self._scraper_service,
)
elif self._settings.web_search.processor == "best_links":
from private_gpt.components.web.web_search.processors.clean_content import (
CleanContentProcessor,
)
self._processor = SelectBestLinks(
settings=self._settings,
scraper_service=self._scraper_service,
llm_component=self._llm_component,
summary_builder=self._summary_builder,
)
else:
raise ValueError(
f"Unknown processor: {self._settings.web_search.processor}. "
f"Available: simple_text, scraped_content, clean_content"
)
View on GitHub (pinned to 4a030776a3)
Solutions
- Use one of the supported values: simple_text, scraped_content, clean_content, or best_links.
- Load settings via the standard loader so pydantic's Literal flags the typo at startup.
- If adding a custom processor, extend both the Literal and _initialize_processor — and update the error message to include best_links while you are there.
Example fix
# settings.yaml web_search: processor: best_links # message omits it, but it is valid # invalid: processor: summary -> Unknown processor error
Defensive patterns
Strategy: type-guard
Validate before calling
SUPPORTED_PROCESSORS = {'simple_text', 'scraped_content', 'clean_content', 'best_links'}
if settings.web_search.processor not in SUPPORTED_PROCESSORS:
raise ValueError(
f'processor must be one of {sorted(SUPPORTED_PROCESSORS)}, '
f'got {settings.web_search.processor!r}'
) Type guard
from typing import Literal
ProcessorName = Literal['simple_text', 'scraped_content', 'clean_content', 'best_links']
def is_supported_processor(name: str) -> bool:
return name in ('simple_text', 'scraped_content', 'clean_content', 'best_links') Try / catch
try:
svc = WebSearchService(settings, scraper, llm, summary_builder)
except ValueError as e:
if 'Unknown processor' in str(e):
raise SystemExit(
f'bad web_search.processor={settings.web_search.processor!r}; '
'use simple_text|scraped_content|clean_content|best_links'
) from e
raise Prevention
- Trust the settings Literal, not the error message (the message omits best_links).
- Validate config in CI with the same loader production uses.
- When adding a processor, update Literal, branch, and message atomically.
When it happens
Trigger: Hand-constructed or mutated Settings in tests with processor='summary'; config from a version that had a processor name this build removed; programmatic Settings(web_search=WebSearchParams(processor='foo')) without validation.
Common situations: Test fixtures; forks renaming processors; copy-pasted config from docs describing a processor that this deployment's build does not include.
Related errors
- Web fetching is not properly initialized or it is disabled.
- Web fetching is not properly initialized or it is disabled.
- Unsupported web search provider: {self._settings.web_search.
- TOOL_NAME_CONFLICT
- LLM mode '{mode}' is not supported. Available: {available}
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/81e984c53d65fd58.
Report an issue: GitHub.