{"record":{"id":"2cdca8e9342009d1","repo":"microsoft/graphrag","slug":"base-delay-must-be-greater-than-1-0-for-exponentia","errorCode":null,"errorMessage":"base_delay must be greater than 1.0 for Exponential Backoff retry.","messagePattern":"base_delay must be greater than 1\\.0 for Exponential Backoff retry\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/graphrag-llm/graphrag_llm/config/retry_config.py","lineNumber":50,"sourceCode":"    jitter: bool | None = Field(\n        default=None,\n        description=\"Whether to apply jitter to the delay intervals in exponential backoff.\",\n    )\n\n    max_delay: float | None = Field(\n        default=None,\n        description=\"The maximum delay in seconds between retries.\",\n    )\n\n    def _validate_exponential_backoff_config(self) -> None:\n        \"\"\"Validate Exponential Backoff retry configuration.\"\"\"\n        if self.max_retries is not None and self.max_retries <= 1:\n            msg = \"max_retries must be greater than 1 for Exponential Backoff retry.\"\n            raise ValueError(msg)\n\n        if self.base_delay is not None and self.base_delay <= 1.0:\n            msg = \"base_delay must be greater than 1.0 for Exponential Backoff retry.\"\n            raise ValueError(msg)\n\n        if self.max_delay is not None and self.max_delay <= 1:\n            msg = \"max_delay must be greater than 1 for Exponential Backoff retry.\"\n            raise ValueError(msg)\n\n    def _validate_immediate_config(self) -> None:\n        \"\"\"Validate Immediate retry configuration.\"\"\"\n        if self.max_retries is not None and self.max_retries <= 1:\n            msg = \"max_retries must be greater than 1 for Immediate retry.\"\n            raise ValueError(msg)\n\n    @model_validator(mode=\"after\")\n    def _validate_model(self):\n        \"\"\"Validate the retry configuration based on its type.\"\"\"\n        if self.type == RetryType.ExponentialBackoff:\n            self._validate_exponential_backoff_config()\n        elif self.type == RetryType.Immediate:\n            self._validate_immediate_config()","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/microsoft/graphrag/blob/f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704/packages/graphrag-llm/graphrag_llm/config/retry_config.py#L32-L68","documentation":"RetryConfig validation requires base_delay > 1.0 seconds for Exponential Backoff. Delays of 1 second or less are considered too aggressive for backoff and rejected.","triggerScenarios":"RetryConfig(type=RetryType.ExponentialBackoff, base_delay=1.0) or a sub-second value like 0.5 in settings.","commonSituations":"Porting defaults from another library (e.g. tenacity's 1.0s or 0.5s base); tuning for fast local tests without realizing the minimum is >1.0.","solutions":["Set base_delay above 1.0, e.g. 2.0 seconds","For tests, monkeypatch/mock the retry sleeper rather than shrinking base_delay below the allowed minimum"],"exampleFix":"# before\nRetryConfig(type=\"exponential_backoff\", base_delay=0.5, max_retries=3)\n# after\nRetryConfig(type=\"exponential_backoff\", base_delay=2.0, max_retries=3)","handlingStrategy":"validation","validationCode":"bd = retry_cfg.get(\"base_delay\")\nif retry_cfg.get(\"type\") == \"exponential_backoff\" and bd is not None and bd <= 1.0:\n    raise ValueError(\"base_delay must be > 1.0 seconds\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember this library's minimum is strictly >1.0s, unlike tenacity","Use base_delay=2.0 as a safe default"],"tags":["retry","config-validation","exponential-backoff"],"backgroundTag":"invalid-config-value","analyzedSha":"f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704","analyzedAt":"2026-08-27T11:16:29.677Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}