litellm/litellm
Vineeth Sai 7e9e93521b fix(proxy): preserve timezone offsets when resetting multi-window budgets
_reset_expired_window dropped the parsed offset with .replace(tzinfo=None), so a
"+08:00" boundary was read as wall-clock and compared against a UTC now, delaying
every non-UTC reset by the offset. compute_budget_reset_at writes those offsets
itself whenever the configured budget timezone is not UTC.

Keep the offset via _as_utc, which only fills in a tzinfo for legacy naive rows,
and take `now` as an aware UTC datetime so the comparison is offset-aware on both
sides.

Rebased onto the current staging tip, where the surrounding job has been
restructured: the two edits are re-applied to the current file rather than
replayed, and the other three utcnow() sites belong to the key/user/team chunk
resets this PR deliberately does not touch.

Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>
2026-09-08 12:01:01 -07:00
..
a2a_protocol Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5_r4 2026-09-02 23:32:10 +00:00
anthropic_interface fix(anthropic_endpoints): return Anthropic type:error envelope for /v1/messages errors 2026-08-31 16:23:36 -07:00
assistants refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
batch_completion
batches Merge pull request #39668 from BerriAI/litellm_lit6899_vertex_batch_tuned_endpoints 2026-09-07 20:28:02 -07:00
caching fix(least-busy): count for every router, and keep the expiry through a clamp 2026-09-06 01:59:15 -07:00
completion_extras fix(bridge): carry provider metadata on streamed chats and keep served ids in spend logs 2026-09-05 19:21:40 -07:00
compression refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
containers Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5_r4 2026-09-02 23:32:10 +00:00
endpoints/speech/speech_to_completion_bridge refactor(speech): freeze httpx response header dicts (LIT002) 2026-08-31 21:12:53 -07:00
evals
experimental_mcp_client chore: merge origin/litellm_internal_staging into litellm_decrease_anys_opus5_r4 2026-09-04 18:59:35 -07:00
files refactor(typing): replace Any with proven types in 42 more backend files 2026-09-02 15:35:01 +00:00
fine_tuning refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
google_genai refactor(types): replace Any with precise types across 73 modules 2026-09-01 11:05:02 +00:00
images refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
integrations fix: skip one-shot Claude Code cache injection (#40175) 2026-09-07 18:03:43 -07:00
interactions refactor(typing): replace Any with proven types in 42 more backend files 2026-09-02 15:35:01 +00:00
litellm_core_utils fix(proxy): load db credentials in the model reconcile so a worker never serves a model before its credential (#39876) 2026-09-08 10:08:24 -07:00
llms Merge pull request #39668 from BerriAI/litellm_lit6899_vertex_batch_tuned_endpoints 2026-09-07 20:28:02 -07:00
models fix(mcp): encrypt stored static headers and stdio environment (#40164) 2026-09-07 16:03:06 -07:00
ocr test(ocr): add SDK callback E2E parity (#40061) 2026-09-07 11:23:12 -07:00
passthrough Merge origin/litellm_internal_staging into litellm_techdebt_20260901 2026-09-01 19:38:19 +00:00
proxy fix(proxy): preserve timezone offsets when resetting multi-window budgets 2026-09-08 12:01:01 -07:00
proxy_auth
rag chore: merge origin/litellm_internal_staging into litellm_decrease_anys_opus5_r4 2026-09-04 18:59:35 -07:00
realtime_api Merge pull request #39851 from BerriAI/litellm_fix_realtime_backend_close_hang 2026-09-05 09:51:15 -07:00
repositories fix(router): serialize heuristic tuning quota filters for Prisma 2026-09-07 10:08:19 -07:00
rerank_api fix(rerank): adopt declared authenticating providers in arerank instead of resolving them 2026-09-01 14:47:59 -07:00
responses merge: bring litellm_internal_staging into litellm_fix_agent_mcp_grants 2026-09-07 16:35:40 -07:00
router_strategy chore: merge litellm_internal_staging into litellm_lit_7039_least_busy_shared_counts 2026-09-08 17:11:05 +00:00
router_utils fix(router): give cooldowns their own cache so siblings see a bench in ~1s (#40025) 2026-09-08 10:11:20 -07:00
rust_bridge refactor(rust): remove per-request enablement arguments (#39928) 2026-09-07 10:43:45 -07:00
sandbox
search fix(search): forward search-tool params through the router, complete Parallel AI v1 param mapping (#37883) 2026-09-01 21:46:46 -07:00
secret_managers chore: merge origin/litellm_internal_staging into litellm_decrease_anys_opus5_r4 2026-09-04 18:59:35 -07:00
skills feat(skills): semantic search over the LiteLLM-hosted skill registry (#39401) 2026-09-07 12:28:38 -07:00
types merge: bring litellm_internal_staging into litellm_fix_agent_mcp_grants again 2026-09-07 16:36:55 -07:00
vector_store_files refactor(typing): replace Any with proven types in 42 more backend files 2026-09-02 15:35:01 +00:00
vector_stores Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_python_version_ci 2026-09-03 00:16:19 -07:00
videos refactor(videos): make video upload param keyword-only on public edit fns 2026-08-24 15:55:07 -07:00
__init__.py chore: merge litellm_internal_staging into litellm_lit_6348_fireworks_responses_api 2026-09-07 15:43:08 -07:00
_internal_context.py
_lazy_imports.py fix(lazy_imports): type import_map as Mapping to stay under the LIT001 budget 2026-09-05 16:12:45 -07:00
_lazy_imports_registry.py Revert "perf: lazy-load SDK symbols so import litellm stays under 60 MB RSS (…" 2026-09-05 16:07:09 -07:00
_logging.py fix(proxy): stop leaking internal exception details to clients (#39380) 2026-09-02 17:32:00 -07:00
_redis.py fix(redis): coerce env var string types and fix param discovery through decorator wrappers (#30644) 2026-08-31 20:51:31 -07:00
_redis_credential_provider.py refactor(typing): replace Any with proven types in 89 more backend files 2026-09-02 23:08:42 +00:00
_service_logger.py chore: merge origin/litellm_internal_staging into litellm_decrease_anys_opus5_r4 2026-09-04 18:59:35 -07:00
_uuid.py
_version.py
anthropic_beta_headers_config.json
anthropic_beta_headers_manager.py
blog_posts.json
budget_manager.py
constants.py fix(router): give cooldowns their own cache so siblings see a bench in ~1s (#40025) 2026-09-08 10:11:20 -07:00
cost.json
cost_calculator.py Merge pull request #30856 from emerzon/litellm_vertex_lyria_models 2026-09-05 23:12:25 -07:00
exceptions.py fix(bedrock): keep x-amzn-RequestId on chat error responses (#40089) 2026-09-07 17:16:47 -07:00
main.py Merge pull request #39839 from BerriAI/litellm_async_remote_image_fetch 2026-09-07 10:55:04 -07:00
model_prices_and_context_window_backup.json Merge pull request #38842 from BerriAI/litellm_fix_responses_reasoning_drop_params 2026-09-07 15:14:13 -07:00
policy_templates_backup.json
provider_endpoints_support_backup.json fix(ocr): send each provider a health-check document it accepts 2026-09-04 22:52:12 -07:00
py.typed
router.py chore: merge litellm_internal_staging into litellm_lit_7039_least_busy_shared_counts 2026-09-08 17:11:05 +00:00
scheduler.py
setup_wizard.py feat(models): add Claude Fable 5.1 across Anthropic, Bedrock, Vertex AI, and Azure AI 2026-09-01 18:07:06 +00:00
timeout.py
utils.py fix(proxy): load db credentials in the model reconcile so a worker never serves a model before its credential (#39876) 2026-09-08 10:08:24 -07:00