Commit graph

30580 commits

Author SHA1 Message Date
Alexsander Hamir
4157e514f2 fix: add type annotation for items_to_process to satisfy mypy 2026-01-19 10:34:08 -08:00
Alexsander Hamir
1600f86e40 fix: inline queue get operation to avoid memory violation detector flag 2026-01-19 10:32:00 -08:00
Alexsander Hamir
f64cffc23a feat: Add GCS_USE_BATCHED_LOGGING flag to toggle batching mechanism
- Add GCS_DEFAULT_USE_BATCHED_LOGGING constant (default: True)
- Add GCS_USE_BATCHED_LOGGING environment variable to enable/disable batching
- When disabled, sends logs individually as separate GCS objects (legacy behavior)
- When enabled (default), uses new batched NDJSON format for improved throughput
- Document the new environment variable in config_settings.md
- Implement sequential log sending for legacy mode (matching original behavior)
2026-01-19 10:21:31 -08:00
Alexsander Hamir
8b464dc78a refactor: Clean up GCS bucket logging code
- Remove redundant comments that don't add value
- Remove maxsize queue limit (queue is now unbounded)
- Restore original verbose logging patterns from before branch
- Simplify code while maintaining functionality
2026-01-19 10:16:59 -08:00
Alexsander Hamir
29c6b8ca52 fix: Replace List with asyncio.Queue and implement true payload batching for GCS bucket logging
- Replace List with asyncio.Queue for thread-safe concurrent access
- Implement true payload batching: combine multiple logs into NDJSON format, upload as single GCS object
- Add bounded queue with configurable GCS_QUEUE_MAXSIZE for backpressure management
- Add config grouping to handle mixed GCS configurations (bucket/credentials) within batches
- Add observability: queue size monitoring via print statements
- Sanitize sensitive config keys in logs using hash-based identifiers
- Dramatically reduce API calls (e.g., 100 logs = 1 API call instead of 100)
- Prevents OOM errors when background job falls behind during high-traffic periods
2026-01-19 10:02:49 -08:00
Alexsander Hamir
15d6a3ddf8 Optimize GCS bucket logging with true payload batching and bounded queue
- Implement true payload batching: combine multiple logs into single NDJSON object
  - Reduces API calls from N per batch to 1 per batch
  - Dramatically improves throughput and reduces latency
  - Uses newline-delimited JSON (NDJSON) format for standard log processing

- Add bounded queue to prevent OOM
  - Queue maxsize defaults to 10x batch_size (configurable via GCS_QUEUE_MAXSIZE)
  - Provides backpressure when queue is full
  - Warns when queue exceeds 80% capacity

- Update object naming for batched logs
  - Format: {date}/batch-{timestamp}-{uuid}.ndjson
  - Maintains backward compatibility with existing structure

- Add observability improvements
  - Queue size warnings when approaching capacity
  - Enhanced print statements for batch processing
  - Better error handling for batch uploads

This addresses performance issues where queue size grew to 2500+ items
by reducing upload overhead from N sequential requests to 1 batched request.
2026-01-19 09:14:36 -08:00
Alexsander Hamir
21d837130b Merge branch 'main' of https://github.com/BerriAI/litellm into litellm_specific_oom_issue 2026-01-19 08:49:10 -08:00
Alexsander Hamir
eba2b6ce91 Add observability print statements to GCS bucket logger
- Add print statement on logger initialization with config details
- Add print statements when success/failure events are queued with queue size
- Add print statements for batch processing start/completion with metrics
- Add print statements for individual log sends to GCS bucket
- Add print statements for error handling during queueing and sending
- Use print() instead of verbose_logger for direct visibility
2026-01-19 08:46:10 -08:00
Alexsander Hamir
185495dbdb Merge branch 'main' into litellm_specific_oom_issue 2026-01-19 08:39:37 -08:00
Alexsander Hamir
0cd7763d5f
Add health check scripts and parallel execution support (#19295)
- Add health_check_client.py for monitoring model availability
- Add health_check_client_README.md with usage documentation
- Add health_check_requirements.txt for dependencies
- Add run_parallel_health_checks.ps1 (PowerShell version)
- Add run_parallel_health_checks.sh (Bash version)
- Organize all scripts under scripts/health_check/ directory
2026-01-19 08:38:38 -08:00
Krish Dholakia
0862373b38
docs: add note about no limits on users/keys/teams in LiteLLM OSS (#19367)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-01-19 08:22:18 -08:00
Sameer Kankute
bb67f9267a
Merge pull request #19354 from BerriAI/litellm_fix_streaming_test
Fix : test_responses_streaming_failure_triggers_failure_handlers
2026-01-19 21:22:53 +05:30
superpoussin22
1be7e87783
Fix HTML entity in survey description text (#19307) 2026-01-19 06:20:08 -08:00
Cesar Garcia
4d6a430adc
docs: update UI contributing guide (#19353)
* docs: update UI contributing guide with correct commands

- Replace outdated proxy_cli.py command with poetry run litellm
- Add config.yaml example with required settings
- Clarify that UI comes pre-built in the repo
- Add two development options: Build Mode and Dev Mode (hot reload)
- Note about redirect issues in Dev Mode

* docs: add hot reload login flow and PR submission section

- Document the 3000 -> 4000 -> 3000 login flow for hot reload
- Reorder: Hot Reload as Option A, Build Mode as Option B
- Add section 4 on submitting PRs
- Add note that UI changes don't require tests

* Update login flow navigation URL in contributing.md
2026-01-19 06:18:45 -08:00
Sameer Kankute
9e405ce6cc
Merge pull request #19323 from BerriAI/litellm_fix_stability_issues12
[Fix] Bedrock stability model usage issues
2026-01-19 19:43:32 +05:30
Sameer Kankute
ff7bb59824
Merge branch 'main' into litellm_fix_streaming_test 2026-01-19 19:43:16 +05:30
Sameer Kankute
c9de4776bc Fix test_process_chunk_exception_calls_handle_failure_once 2026-01-19 19:39:12 +05:30
Sameer Kankute
d6baa9a4ba
Merge pull request #19234 from BerriAI/litellm_staging_01_16_2026
Litellm staging 01 16 2026
2026-01-19 19:34:53 +05:30
Sameer Kankute
ac24696556 Remove runtime error 2026-01-19 19:19:16 +05:30
Cesar Garcia
b49f0a91e4
fix(responses): resolve deepcopy error with tool_choice ValidatorIterator (#17192) (#17205)
Replace copy.deepcopy with model_dump + model_validate in streaming
iterator logging to handle Pydantic ValidatorIterator objects that
cannot be pickled when tool_choice uses allowed_tools mode.

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-01-19 05:44:20 -08:00
Sameer Kankute
daf70f7221
Merge pull request #19329 from BerriAI/litellm_vector_store_sync
Fix: vector store sync issues
2026-01-19 19:11:48 +05:30
Sameer Kankute
e126e98a7f Fix azure image mypy issues 2026-01-19 19:10:43 +05:30
Sameer Kankute
42175a411d Fix streaming tests 2026-01-19 19:04:52 +05:30
Sameer Kankute
443b888d84
Merge pull request #19352 from BerriAI/revert-19158-main
Revert "Fix audio cost per second override"
2026-01-19 18:52:08 +05:30
Sameer Kankute
574391c118
Revert "Fix audio cost per second override (#19158)"
This reverts commit 2a0f87bde0.
2026-01-19 18:51:08 +05:30
Sameer Kankute
6eb3f579d7 Fix module import for opentelemetry 2026-01-19 18:50:18 +05:30
Sameer Kankute
2e6ce1469e Fix module import for opentelemetry 2026-01-19 18:47:28 +05:30
Sameer Kankute
75932e08da
Merge pull request #19349 from BerriAI/litellm_doc_update_05
Fix: update the doc
2026-01-19 18:25:43 +05:30
Sameer Kankute
351f921561
Merge pull request #19347 from BerriAI/litellm_fix_replicate_output
Fix Output None for replicate handler
2026-01-19 18:25:25 +05:30
Sameer Kankute
480fa13b1d
Merge pull request #19343 from BerriAI/litellm_anthropic_header_fix_19_jan
Fix: anthropic-beta is getting overriden and set to anthropic-beta
2026-01-19 18:24:46 +05:30
Sameer Kankute
a9475be06d
Merge pull request #19338 from BerriAI/litellm_fix_managed_load_balancing_batches
Add managed files support when load_balancing is True
2026-01-19 18:24:21 +05:30
Sameer Kankute
a8883a45bf
Merge pull request #19327 from BerriAI/litellm_vertex_ai_file_upload
Fix: upload pdfs for file endpoint
2026-01-19 18:23:41 +05:30
Sameer Kankute
68294228c2
Merge pull request #19326 from BerriAI/litellm_handle_failer_2_times
Fix: _handle_failure method getting called 2 times
2026-01-19 18:22:44 +05:30
Sameer Kankute
896d1a7dad Fix Error: Found packages that need verification: 2026-01-19 18:18:24 +05:30
Sameer Kankute
c5a8d4e34e
Merge branch 'main' into litellm_staging_01_16_2026 2026-01-19 18:11:21 +05:30
Sameer Kankute
d5293af053 Fix: update the doc 2026-01-19 17:57:00 +05:30
Sameer Kankute
58daf3eabf Fix Output None for replicate handler 2026-01-19 17:22:06 +05:30
Sameer Kankute
d7b103158a Fix: anthropic-beta is getting overriden and set to anthropic-beta': 'structured-outputs-2025-11-13', 2026-01-19 16:43:27 +05:30
Sameer Kankute
eea24978b9 Add managed files support when load_balancing is True 2026-01-19 15:54:04 +05:30
Sameer Kankute
514ebb0d96 Fix: vector store sync issues 2026-01-19 13:17:08 +05:30
Sameer Kankute
480cb9c0d8 Fix: upload pdfs for file endpoint 2026-01-19 11:58:32 +05:30
YutaSaito
bb7aad9de1
Merge pull request #19319 from BerriAI/litellm_test_mcp_integration
[test] mcp integration test
2026-01-19 14:38:02 +09:00
Yuta Saito
44a166a792 fix: ci mcp version up 2026-01-19 14:27:00 +09:00
Yuta Saito
a141aa6026 test: temporary skip 2026-01-19 13:57:40 +09:00
Sameer Kankute
fbf2d83375 Fix: _handle_failure method getting called 2 times 2026-01-19 10:19:31 +05:30
Sameer Kankute
e1b73310ca Fix: llms/bedrock/image_edit/stability_transformation.py:153:9: PLR0915 Too many statements (55 > 50) 2026-01-19 09:16:12 +05:30
Sameer Kankute
49b2886ef0 Add None as default image value 2026-01-19 09:08:38 +05:30
Sameer Kankute
0a15f1b66a Fix: stability image optional para 2026-01-19 09:05:52 +05:30
Yuta Saito
1fbbe0a983 test: restore global MCP server manager after access-group test 2026-01-19 12:29:37 +09:00
Yuta Saito
30c4a38179 test: const 2026-01-19 12:03:26 +09:00