1- """
1+ """
22CODEFLOW LLM Package - Modular LLM provider system.
33
44This package provides a unified interface for multiple LLM providers including:
1212
1313Usage::
1414
15- from codeflow_engine.actions.llm import get_llm_provider_manager, complete_chat
15+ from codeflow_engine.actions.ai_actions. llm import get_llm_provider_manager, complete_chat
1616
1717 # Get a manager instance
1818 manager = get_llm_provider_manager()
2828import os
2929from typing import Any
3030
31- # Export base classes
32- from codeflow_engine .actions .llm .base import BaseLLMProvider
31+ # Export base classes from core
32+ from codeflow_engine .core .llm import (
33+ BaseLLMProvider ,
34+ LLMProviderRegistry ,
35+ LLMResponse ,
36+ OpenAICompatibleProvider ,
37+ )
3338
3439# Export manager
35- from codeflow_engine .actions .llm .manager import ActionLLMProviderManager
40+ from codeflow_engine .actions .ai_actions . llm .manager import ActionLLMProviderManager
3641
3742# Export providers
38- from codeflow_engine .actions .llm .providers import (
43+ from codeflow_engine .actions .ai_actions . llm .providers import (
3944 AnthropicProvider ,
45+ AzureOpenAIProvider ,
4046 GroqProvider ,
41- MistralProvider ,
4247 OpenAIProvider ,
4348 PerplexityProvider ,
4449 TogetherAIProvider ,
50+ MISTRAL_AVAILABLE ,
4551)
4652
4753# Export types
48- from codeflow_engine .actions .llm .types import (
54+ from codeflow_engine .actions .ai_actions . llm .types import (
4955 LLMConfig ,
5056 LLMProviderType ,
51- LLMResponse ,
5257 Message ,
5358 MessageRole ,
5459)
5560
61+ # Conditionally import MistralProvider
62+ MistralProvider = None
63+ if MISTRAL_AVAILABLE :
64+ from codeflow_engine .actions .ai_actions .llm .providers import MistralProvider
65+
5666
5767# Global provider manager instance
5868_provider_manager : ActionLLMProviderManager | None = None
@@ -63,7 +73,7 @@ def get_llm_provider_manager() -> ActionLLMProviderManager:
6373 Get or create the global LLM provider manager with configuration from environment variables.
6474
6575 Returns:
66- LLMProviderManager : A configured instance of LLMProviderManager
76+ ActionLLMProviderManager : A configured instance of LLMProviderManager
6777 """
6878 global _provider_manager
6979
@@ -166,26 +176,35 @@ def complete_chat(
166176 return manager .complete (request )
167177
168178
179+ # Backward compatibility alias
180+ LLMProviderManager = ActionLLMProviderManager
181+
182+
169183# Export all public components
170184__all__ = [
171- "AnthropicProvider" ,
172185 # Base classes
173186 "BaseLLMProvider" ,
174- "GroqProvider" ,
175- "LLMConfig" ,
187+ "OpenAICompatibleProvider" ,
176188 # Manager
177189 "ActionLLMProviderManager" ,
190+ "LLMProviderManager" , # Backward compatibility
191+ # Registry
192+ "LLMProviderRegistry" ,
193+ # Types
194+ "LLMConfig" ,
178195 "LLMProviderType" ,
179196 "LLMResponse" ,
180197 "Message" ,
181- # Types
182198 "MessageRole" ,
183- "MistralProvider" ,
184199 # Providers
200+ "AnthropicProvider" ,
201+ "AzureOpenAIProvider" ,
202+ "GroqProvider" ,
203+ "MistralProvider" ,
185204 "OpenAIProvider" ,
186205 "PerplexityProvider" ,
187206 "TogetherAIProvider" ,
188- "complete_chat" ,
189207 # Factory functions
208+ "complete_chat" ,
190209 "get_llm_provider_manager" ,
191210]
0 commit comments