{"record":{"id":"d4c0f79816b84dbe","repo":"headroomlabs-ai/headroom","slug":"worker-processes-must-be-1","errorCode":null,"errorMessage":"worker_processes must be >= 1","messagePattern":"worker_processes must be >= 1","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"headroom/proxy/models.py","lineNumber":518,"sourceCode":"    # ``HeadroomProxy._run_compression_in_executor``.\n    compression_max_workers: int | None = None\n\n    # Number of built-in uvicorn worker processes sharing this listen socket.\n    # Kept at the end to avoid shifting existing positional constructor fields.\n    # Process-local runtime hot reload is unsafe above one worker because only\n    # the worker receiving the admin request would observe the update.\n    worker_processes: int = 1\n\n    def __post_init__(self, smart_routing: bool | None = None) -> None:\n        if self.rollout is None:\n            self.rollout = resolve_rollout()\n        # ``read_maturation`` remains a concrete, already-resolved runtime\n        # setting for programmatic/config-file callers.  The CLI composition\n        # root derives it from this same snapshot before constructing the\n        # config; rewriting it here would resolve policy a second time and\n        # break explicit non-CLI configuration.\n        if self.worker_processes < 1:\n            raise ValueError(\"worker_processes must be >= 1\")\n        if self.retry_enabled and self.retry_max_attempts < 1:\n            raise ValueError(\"retry_max_attempts must be >= 1 when retry_enabled=True\")\n        # A 0 (or negative) requests-per-minute limit divides by zero in the\n        # token-bucket wait computation (rate_limit_policy.consume_from_bucket),\n        # 500-ing every request. The CLI already guards this with IntRange(min=1);\n        # fail fast here too so the JSON/programmatic config paths can't produce a\n        # limiter that crashes at request time. Only matters when limiting is on.\n        if self.rate_limit_enabled and self.rate_limit_requests_per_minute < 1:\n            raise ValueError(\n                \"rate_limit_requests_per_minute must be >= 1 when rate_limit_enabled=True\"\n            )\n\n    @property\n    def provider_api_overrides(self) -> ProviderApiOverrides:\n        \"\"\"Return provider API URL overrides as a dedicated provider config object.\"\"\"\n        return ProviderApiOverrides(\n            anthropic=self.anthropic_api_url,\n            openai=self.openai_api_url,","sourceCodeStart":500,"sourceCodeEnd":536,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/proxy/models.py#L500-L536","documentation":"Error \"worker_processes must be >= 1\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised during proxy config validation when worker_processes is set to zero or a negative value.","commonSituations":"See trigger scenarios.","solutions":["Set worker_processes to an integer >= 1 in the proxy config","Remove the worker_processes override to use the default"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}