{"record":{"id":"cca8d3700cd1f4f5","repo":"BerriAI/litellm","slug":"monthly-resets-currently-only-support-1-month-inte","errorCode":null,"errorMessage":"Monthly resets currently only support 1 month intervals","messagePattern":"Monthly resets currently only support 1 month intervals","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/litellm_core_utils/duration_parser.py","lineNumber":375,"sourceCode":"    base_midnight: datetime,\n    value: int,\n    reset_time_of_day: time,\n) -> datetime:\n    \"\"\"\n    Handle monthly reset times. Resets land on the 1st at `reset_time_of_day`; if the\n    1st of the current month at that time has already passed, roll to the 1st of next month.\n\n    Args:\n        current_time: Current datetime\n        base_midnight: Midnight of current day\n        value: Number of months (currently only supports 1 month resets)\n        reset_time_of_day: Wall-clock time the reset lands on\n\n    Returns:\n        datetime: First day of the next reset month at `reset_time_of_day`\n    \"\"\"\n    if value != 1:\n        raise ValueError(\"Monthly resets currently only support 1 month intervals\")\n\n    first_of_this_month: Final = base_midnight.replace(day=1)\n    candidate: Final = _apply_time_of_day(first_of_this_month, reset_time_of_day)\n    if candidate <= current_time:\n        return _apply_time_of_day(_first_of_next_month(first_of_this_month), reset_time_of_day)\n    return candidate\n","sourceCodeStart":357,"sourceCodeEnd":382,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/litellm_core_utils/duration_parser.py#L357-L382","documentation":"Guard in the monthly reset-time handler: monthly resets are only implemented for value==1 (a reset on the 1st of the next month); any other monthly interval (e.g. '2mo') cannot be honored, so the caller is told it is unsupported.","triggerScenarios":"Thrown at litellm/litellm_core_utils/duration_parser.py:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a 1-month interval for monthly resets (e.g. '1mo').","Split multi-month budgets into separate monthly resets or use a different reset period."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}