CodeReview/backend/app/services/llm/adapters
lintsinghua 7091f891d1 feat(llm): enhance LLM connection testing with improved error handling and adapter instantiation
- Bypass LLMFactory cache during connection tests to ensure fresh API calls with latest configuration
- Directly instantiate native adapters (Baidu, Minimax, Doubao) and LiteLLM adapter based on provider type
- Add comprehensive error handling in LiteLLM adapter with specific exception catching for authentication, rate limiting, and connection errors
- Implement user-friendly error messages for common failure scenarios (invalid API key, authentication failure, timeout, connection issues)
- Add response validation to detect and report empty API responses
- Disable LiteLLM internal caching to guarantee actual API calls during testing
- Update available models list with 2025 latest models across all providers (Gemini, OpenAI, Claude, Qwen, DeepSeek, etc.)
- Improve error message clarity and debugging information in config endpoint
2025-11-28 16:53:01 +08:00
..
__init__.py refactor(llm): consolidate LLM adapters with LiteLLM unified layer 2025-11-28 16:41:39 +08:00
baidu_adapter.py refactor(llm): consolidate LLM adapters with LiteLLM unified layer 2025-11-28 16:41:39 +08:00
doubao_adapter.py refactor(llm): consolidate LLM adapters with LiteLLM unified layer 2025-11-28 16:41:39 +08:00
litellm_adapter.py feat(llm): enhance LLM connection testing with improved error handling and adapter instantiation 2025-11-28 16:53:01 +08:00
minimax_adapter.py refactor(llm): consolidate LLM adapters with LiteLLM unified layer 2025-11-28 16:41:39 +08:00