Make LLM layer model-agnostic via CrewAI native providers#23
Draft
Kishore-2572 wants to merge 4 commits into
Draft
Make LLM layer model-agnostic via CrewAI native providers#23Kishore-2572 wants to merge 4 commits into
Kishore-2572 wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the LLM layer model-agnostic so any provider can be configured via env (LLM_API_KEY + DEFAULT_LLM_MODEL / MANAGER_LLM_MODEL, plus LLM_API_BASE for OpenAI-compatible endpoints like NVIDIA NIM and Ollama). Uses CrewAI's native provider SDKs — no LiteLLM or third-party router.
Changes:
Add src/ad_seller/llm factory (get_llm/LLMFactory). Routes by model prefix to
native OpenAI/Anthropic/Gemini; when LLM_API_BASE is set, pins the native
OpenAI client at that URL.
settings: drop required anthropic_api_key; add llm_api_key, llm_api_base,
llm_api_version; keep the default/manager two-tier model split.
Refactor all 12 agents to use get_llm().
Migrate ANTHROPIC_API_KEY -> LLM_API_KEY across env, setup wizard, CI, docs,
and Terraform/CloudFormation; add NVIDIA NIM + Ollama presets and provider docs.
Add tests/unit/test_llm_factory.py.
Testing: ruff check src/ clean; full unit suite 727 passed; verified end-to-end via POST /proposals with Anthropic and OpenAI.