- test_tool_message_output_is_string_not_list: verifies function_call_output.output is a string
- test_multiple_tool_calls_in_single_choice: verifies multiple tool calls are grouped in one choice
Fixes two bugs in the openai/responses/... completion bridge:
1. function_call_output.output must be a string, not a list
- When sending tool results back to the model, the content was being
transformed to [{type: "output_text", text: "..."}] instead of a plain string
- This caused OpenAI to reject with "Invalid value: 'output_text'"
2. Multiple tool calls must be in a single choice, not separate choices
- When the model returned multiple tool calls, each was put in its own
Choice with index 0, 1, 2... instead of all together in one Choice
- This broke the standard Chat Completions API format where all tool_calls
belong in a single message
Fixes#18201
* 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