Skip to content

Make LLM layer model-agnostic via CrewAI native providers#23

Draft
Kishore-2572 wants to merge 4 commits into
mainfrom
model-agnostic-llm
Draft

Make LLM layer model-agnostic via CrewAI native providers#23
Kishore-2572 wants to merge 4 commits into
mainfrom
model-agnostic-llm

Conversation

@Kishore-2572

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant