litellm/litellm
Alexsander Hamir 9b440caac2
Lazy load ImageEditRequestUtils in images/main.py to avoid heavy import (#18074)
- Remove direct import of ImageEditRequestUtils from images.utils
- Add __getattr__ handler to lazy load ImageEditRequestUtils when accessed
- Create _get_ImageEditRequestUtils() helper function with caching
- Use importlib instead of sys to avoid importing sys inside functions
- Update image_edit() to use helper function for accessing ImageEditRequestUtils
- Add TYPE_CHECKING import for proper type hints

This defers the heavy import from images.utils until ImageEditRequestUtils is actually needed, improving import time when from .images.main import * is executed.
2025-12-16 12:28:33 -08:00
..
a2a_protocol [Refactor] litellm/init.py: lazy load LLMClientCache (#18008) 2025-12-16 05:44:06 -08:00
anthropic_interface [Feat] Allow using litellm.completion with /v1/messages API Spec (use gpt-4, gemini etc with claude code) (#11502) 2025-06-06 20:35:53 -07:00
assistants Contributor PR - Support OPENAI_BASE_URL in addition to OPENAI_API_BASE (#9995) (#10423) 2025-04-29 21:27:37 -07:00
batch_completion (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
batches Revert batch utils with original logic 2025-12-10 17:01:21 +05:30
caching fix redis event loop closed at first call (#16913) 2025-11-21 19:15:56 -08:00
completion_extras Add custom headers in responses API 2025-12-16 11:31:15 +05:30
containers [Feat] Containers API - add new container API file management + UI Interface (#17745) 2025-12-09 17:33:26 -08:00
endpoints/speech/speech_to_completion_bridge fix: fix import errors 2025-09-14 09:32:21 -07:00
experimental_mcp_client [Feat] mcp resources support (#16800) 2025-11-20 14:53:44 -08:00
files Add support for expires after param 2025-12-12 10:01:18 +05:30
fine_tuning Litellm managed file updates combined (#11040) 2025-05-22 17:20:41 -07:00
google_genai fix: Preserve systemInstructions for vertex ai generate content request 2025-12-11 09:52:32 +05:30
images Lazy load ImageEditRequestUtils in images/main.py to avoid heavy import (#18074) 2025-12-16 12:28:33 -08:00
integrations [Refactor] litellm/init.py: lazy load LLMClientCache (#18008) 2025-12-16 05:44:06 -08:00
litellm_core_utils Merge branch 'main' into litellm_staging_12_16_2025 2025-12-16 21:38:14 +05:30
llms Merge pull request #18025 from BerriAI/litellm_staging_12_16_2025 2025-12-16 22:31:39 +05:30
ocr [Feat] /ocr - Add VertexAI OCR provider support + cost tracking (#16216) 2025-11-03 15:56:49 -08:00
passthrough fix bedrock passthrough auth issue (#16879) 2025-11-24 18:44:59 -08:00
proxy Merge pull request #18025 from BerriAI/litellm_staging_12_16_2025 2025-12-16 22:31:39 +05:30
rag [Feat] RAG API - QA - allow internal user keys to access api, allow using litellm credentials with API, raise clear exception when RAG API fails (#17169) 2025-11-26 17:07:30 -08:00
realtime_api fix: tested e2e implementation and added sample config. 2025-11-26 12:37:13 +00:00
rerank_api Add tests for header forwarding 2025-12-12 17:54:17 +05:30
responses Merge pull request #17980 from BerriAI/litellm_add_provider_specific_tools_in_responses 2025-12-15 22:53:08 +05:30
router_strategy fix: add None check for litellm_params (#16754) 2025-11-17 19:44:29 -08:00
router_utils fix(router): add minimum request threshold for error rate cooldown (#17464) 2025-12-12 04:36:10 -08:00
search [Bug Fix] Exa Search API - ensure request params are sent to Exa AI (#15855) 2025-10-23 11:56:30 -07:00
secret_managers fix: cyberark allow setting ssl verfiy to false (#17433) 2025-12-03 18:54:31 -08:00
skills [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
types Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619) 2025-12-15 18:19:52 +05:30
vector_store_files Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vector_stores Fix vector store configuration synchronization failure 2025-12-05 11:46:14 +05:30
videos fix: respect videos content db creds 2025-12-10 23:00:01 +05:30
__init__.py feat: lazy load GuardrailItem following existing patterns (#18072) 2025-12-16 11:48:36 -08:00
_lazy_imports.py feat: lazy load GuardrailItem following existing patterns (#18072) 2025-12-16 11:48:36 -08:00
_logging.py [Feat] Add support for returning images with gemini/gemini-2.5-flash-image-preview with /chat/completions (#13983) 2025-08-27 16:16:19 -07:00
_redis.py fix: Apply max_connections configuration to Redis async client (#15797) 2025-10-22 09:19:08 -07:00
_service_logger.py [⚡️ Python SDK import] - reduce python sdk import time by .3s (#12140) 2025-06-28 14:57:10 -07:00
_uuid.py Fix: revert fastuuid optional dependency, always use fastuuid in .__uid helper (#14941) 2025-09-26 09:14:20 -07:00
_version.py Virtual key based policies in Aim Guardrails (#9499) 2025-04-01 21:57:23 -07:00
budget_manager.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
constants.py fix(router): add minimum request threshold for error rate cooldown (#17464) 2025-12-12 04:36:10 -08:00
cost.json
cost_calculator.py fix: default quality cost calculation of gpt-image 1 model 2025-12-15 08:16:25 +05:30
exceptions.py Adds support for returning Azure Content Policy error information when exceptions from Azure OpenAI occur (#16231) 2025-11-08 16:04:36 -08:00
main.py [Refactor] litellm/init.py: lazy load encoding from main.py (#18070) 2025-12-16 11:19:59 -08:00
model_prices_and_context_window_backup.json Add doc and tests for agent skils 2025-12-16 10:20:21 +05:30
mypy.ini fix mypy 2025-09-27 12:21:32 -07:00
py.typed
router.py refactor(router): replace time.perf_counter() with time.time() for timing measurements (#17881) 2025-12-12 08:51:18 -08:00
scheduler.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
timeout.py Litellm ruff linting enforcement (#5992) 2024-10-01 19:44:20 -04:00
utils.py [Refactor] litellm/init.py: lazy-load AmazonConverseConfig (#18069) 2025-12-16 10:48:11 -08:00