{"record":{"id":"81e984c53d65fd58","repo":"zylon-ai/private-gpt","slug":"unknown-processor-self-settings-web-search-proc","errorCode":null,"errorMessage":"Unknown processor: {self._settings.web_search.processor}. Available: simple_text, scraped_content, clean_content","messagePattern":"Unknown processor: (.+?)\\. Available: simple_text, scraped_content, clean_content","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/web/web_search/web_search_service.py","lineNumber":149,"sourceCode":"\n            self._processor = CleanContentProcessor(\n                settings=self._settings,\n                scraper_service=self._scraper_service,\n            )\n        elif self._settings.web_search.processor == \"best_links\":\n            from private_gpt.components.web.web_search.processors.clean_content import (\n                CleanContentProcessor,\n            )\n\n            self._processor = SelectBestLinks(\n                settings=self._settings,\n                scraper_service=self._scraper_service,\n                llm_component=self._llm_component,\n                summary_builder=self._summary_builder,\n            )\n\n        else:\n            raise ValueError(\n                f\"Unknown processor: {self._settings.web_search.processor}. \"\n                f\"Available: simple_text, scraped_content, clean_content\"\n            )\n","sourceCodeStart":131,"sourceCodeEnd":153,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/web/web_search/web_search_service.py#L131-L153","documentation":"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.","triggerScenarios":"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.","commonSituations":"Test fixtures; forks renaming processors; copy-pasted config from docs describing a processor that this deployment's build does not include.","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."],"exampleFix":"# settings.yaml\nweb_search:\n  processor: best_links   # message omits it, but it is valid\n# invalid: processor: summary  -> Unknown processor error","handlingStrategy":"type-guard","validationCode":"SUPPORTED_PROCESSORS = {'simple_text', 'scraped_content', 'clean_content', 'best_links'}\nif settings.web_search.processor not in SUPPORTED_PROCESSORS:\n    raise ValueError(\n        f'processor must be one of {sorted(SUPPORTED_PROCESSORS)}, '\n        f'got {settings.web_search.processor!r}'\n    )","typeGuard":"from typing import Literal\n\nProcessorName = Literal['simple_text', 'scraped_content', 'clean_content', 'best_links']\n\ndef is_supported_processor(name: str) -> bool:\n    return name in ('simple_text', 'scraped_content', 'clean_content', 'best_links')","tryCatchPattern":"try:\n    svc = WebSearchService(settings, scraper, llm, summary_builder)\nexcept ValueError as e:\n    if 'Unknown processor' in str(e):\n        raise SystemExit(\n            f'bad web_search.processor={settings.web_search.processor!r}; '\n            'use simple_text|scraped_content|clean_content|best_links'\n        ) from e\n    raise","preventionTips":["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."],"tags":["configuration","web-search","processor","validation"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}