Claude models on Azure AI were incorrectly using AzureAIStudioConfig,
causing tool calls to fail with invalid_request_error because tools
remained in OpenAI format instead of being transformed to Anthropic format.
extract model id from vertex ai passthrough routes that follow the pattern:
/vertex_ai/*/models/{model_id}:*
the model extraction now handles vertex ai routes by regex matching the model
segment from the url path, which allows proper model identification for
authentication and authorization in proxy pass-through endpoints.
adds comprehensive test coverage for vertex ai model extraction including:
- various vertex api versions (v1, v1beta1)
- different locations (us-central1, asia-southeast1)
- model names with special suffixes (gemini-1.5-pro, gemini-2.0-flash)
- precedence verification (request body model over url)
- non-vertex route isolation
* init BaseInteractionsAPIConfig
* updated types for interactions API
* fix SDK level interactions API
* InteractionsAPIRequestUtils
* init base
* init interactions API
* init Interactions API Types
* init interactins API
* GoogleAIStudioInteractionsConfig
* init http handler
* remove file no longer needed
* test OPENAPI_SPEC_URL
* TestGoogleInteractionsCreate
* add google interctions routes
* init interactions api
* init interactions api
* new routes
* fix config
* working streaming interactons api
- Remove direct import of OpenAILikeChatConfig from llms.openai_like.chat.handler
- Add OpenAILikeChatConfig to LLM_CONFIG_NAMES for lazy loading
- Add handler in _lazy_import_llm_configs() to lazy load when accessed
- Add OpenAILikeChatConfig to TYPE_CHECKING block for type hints
This defers the import until OpenAILikeChatConfig is actually needed, improving import time.
- 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.
- Add TYPES_NAMES tuple and _lazy_import_types function in _lazy_imports.py
- Remove direct import of GuardrailItem from __init__.py
- Add lazy loading handler in __getattr__ to dispatch type imports
- Add type stub for GuardrailItem in TYPE_CHECKING block
- Add test_types_lazy_imports test to verify lazy loading works
- Use from __future__ import annotations for forward reference support
- Follows same pattern as DOTPROMPT_NAMES and LLM_CONFIG_NAMES for consistency
- Add __getattr__ in main.py to lazy load encoding when accessed
- Remove direct assignment of encoding = tiktoken.get_encoding() at module level
- Heavy tiktoken.get_encoding() call is now deferred until encoding is first accessed
- Follows existing lazy loading patterns
- All existing code using litellm.encoding continues to work
- Add LLM_CONFIG_NAMES tuple and _lazy_import_llm_configs function in _lazy_imports.py
- Remove direct import of AmazonConverseConfig from __init__.py
- Add lazy loading handler in __getattr__ to dispatch LLM config imports
- Add type stub for AmazonConverseConfig in TYPE_CHECKING block
- Add test_llm_config_lazy_imports test to verify lazy loading works
- Follows same pattern as DOTPROMPT_NAMES for consistency