{"record":{"id":"64f31ebb9f88043b","repo":"zylon-ai/private-gpt","slug":"unsupported-scheduler-tools-mode-self-scheduler-t","errorCode":null,"errorMessage":"Unsupported scheduler.tools.mode={self.scheduler.tools.mode!r}. Supported tool scheduler modes are 'local' and 'celery'.","messagePattern":"Unsupported scheduler\\.tools\\.mode=(.+?)\\. Supported tool scheduler modes are 'local' and 'celery'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"private_gpt/settings/settings.py","lineNumber":1872,"sourceCode":"    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\":\n            return self\n\n        if self.stream.broker != \"redis\":\n            raise ValueError(\n                f\"scheduler.chat.mode={self.scheduler.chat.mode!r} requires stream.broker=redis \"\n                \"because API and chat worker processes must share stream state.\"","sourceCodeStart":1854,"sourceCodeEnd":1890,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/settings/settings.py#L1854-L1890","documentation":"Startup-time ValueError from the root Settings model_validator: scheduler.tools.mode must be 'local' or 'celery'. The tools scheduler decides whether tool executions run in-process or are dispatched through Celery; any other value (including chat-side values like 'arq') fails settings validation at boot.","triggerScenarios":"settings.yaml with scheduler.tools.mode: arq (wrong side — arq belongs to chat), 'redis', or a typo; env var override left from a previous schema; mirroring the chat mode value into tools because they 'should match'.","commonSituations":"Operators assuming one scheduler mode for everything; version upgrades that split a single scheduler key into chat/tools; helm values or dotenv overlays not updated alongside the main YAML.","solutions":["Set scheduler.tools.mode to 'local' or 'celery' as intended.","If you configured 'arq' for tools, that is chat-only — choose 'celery' for distributed tool execution (and set chat mode to 'arq').","Sweep every config source (profile YAMLs, env vars, deployment overlays) for the key.","Restart after fixing; validation runs at import/startup time."],"exampleFix":"# before\nscheduler:\n  tools:\n    mode: arq\n# after\nscheduler:\n  tools:\n    mode: celery\n  # remember: tools=celery requires chat mode 'arq'","handlingStrategy":"validation","validationCode":"mode = cfg.get('scheduler', {}).get('tools', {}).get('mode')\nassert mode in {'local', 'celery'}, f'bad scheduler.tools.mode: {mode!r}'","typeGuard":"const isToolsMode = (m: unknown): m is 'local' | 'celery' => m === 'local' || m === 'celery';","tryCatchPattern":null,"preventionTips":["Lint tools mode against {local, celery} in pre-deploy checks.","Do not mirror chat mode into tools mode.","Keep an up-to-date example settings.yaml per deployment topology."],"tags":["configuration","settings","scheduler","celery","startup"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}