{"record":{"id":"78f16a030a775fc8","repo":"zylon-ai/private-gpt","slug":"unsupported-scheduler-chat-mode-self-scheduler-ch","errorCode":null,"errorMessage":"Unsupported scheduler.chat.mode={self.scheduler.chat.mode!r}. Supported chat scheduler modes are 'local' and 'arq'.","messagePattern":"Unsupported scheduler\\.chat\\.mode=(.+?)\\. Supported chat scheduler modes are 'local' and 'arq'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"private_gpt/settings/settings.py","lineNumber":1866,"sourceCode":"    sandbox: SandboxSettings\n    bash: BashSettings\n    code_execution: CodeExecutionSettings\n    web_fetch: WebFetchSettings\n    web_search: WebSearchSettings\n    database_query: DatabaseQuerySettings\n    brave: BraveSearchSettings\n    skills: SkillSettings\n    transformation: TransformationSettings\n    semaphore: SemaphoreSettings\n    scheduler: SchedulerConfig = Field(\n        default_factory=SchedulerConfig,\n        description=\"Scheduler configuration for chat and tool workers.\",\n    )\n\n    @model_validator(mode=\"after\")\n    def validate_chat_scheduler_configuration(self) -> \"Settings\":\n        if self.scheduler.chat.mode not in {\"local\", \"arq\"}:\n            raise ValueError(\n                f\"Unsupported scheduler.chat.mode={self.scheduler.chat.mode!r}. \"\n                \"Supported chat scheduler modes are 'local' and 'arq'.\"\n            )\n\n        if self.scheduler.tools.mode not in {\"local\", \"celery\"}:\n            raise ValueError(\n                f\"Unsupported scheduler.tools.mode={self.scheduler.tools.mode!r}. \"\n                \"Supported tool scheduler modes are 'local' and 'celery'.\"\n            )\n\n        if self.scheduler.tools.mode == \"celery\" and self.scheduler.chat.mode != \"arq\":\n            raise ValueError(\n                f\"scheduler.tools.mode={self.scheduler.tools.mode!r} requires \"\n                \"scheduler.chat.mode='arq' so tool callbacks can resume shared \"\n                \"chat state.\"\n            )\n\n        if self.scheduler.chat.mode == \"local\":","sourceCodeStart":1848,"sourceCodeEnd":1884,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/settings/settings.py#L1848-L1884","documentation":"Startup-time ValueError from the root Settings model_validator: scheduler.chat.mode must be 'local' or 'arq'. The chat scheduler selects whether chat requests run in-process ('local') or are dispatched to an ARQ Redis worker ('arq'); any other value aborts settings loading and the app fails to boot.","triggerScenarios":"settings.yaml with scheduler.chat.mode: celery (the classic mistake — celery is valid only for tools), 'redis', 'k8s', or a typo like 'lokal'; env var override with a stale value from an older config schema; empty string after a templating step removed the value.","commonSituations":"Copy-pasting scheduler config from docs for the tools worker into the chat section; upgrading versions where the mode key was renamed and old values linger; per-environment overlays not updated after the arq migration.","solutions":["Set scheduler.chat.mode to 'local' for in-process execution or 'arq' for the Redis-backed chat worker.","Search all config layers (settings.yaml, settings-<profile>.yaml, env vars) for the key and remove stale duplicates.","If you meant Celery for tools, put it under scheduler.tools.mode and pair it with chat mode 'arq'.","Re-run startup and check the earliest log line — settings validation fails before serving."],"exampleFix":"# before\nscheduler:\n  chat:\n    mode: celery\n# after\nscheduler:\n  chat:\n    mode: arq","handlingStrategy":"validation","validationCode":"mode = cfg.get('scheduler', {}).get('chat', {}).get('mode')\nassert mode in {'local', 'arq'}, f'bad scheduler.chat.mode: {mode!r}'","typeGuard":"const isChatMode = (m: unknown): m is 'local' | 'arq' => m === 'local' || m === 'arq';","tryCatchPattern":null,"preventionTips":["Use a JSON schema / enum lint for scheduler modes in config reviews.","Remember: chat modes are local|arq; tools modes are local|celery — never copy one into the other.","Boot the app (or just import Settings) in CI to catch config errors pre-deploy."],"tags":["configuration","settings","scheduler","arq","startup"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}