Migrate to litellm for model compatability#24
Open
trevormells wants to merge 8 commits intoPickle-Pixel:mainfrom
Open
Migrate to litellm for model compatability#24trevormells wants to merge 8 commits intoPickle-Pixel:mainfrom
trevormells wants to merge 8 commits intoPickle-Pixel:mainfrom
Conversation
Author
|
addresses a wide range of model compatibility issues that have been surfaced in issues |
rothnic
added a commit
to rothnic/ApplyPilot
that referenced
this pull request
Feb 27, 2026
rothnic
added a commit
to rothnic/ApplyPilot
that referenced
this pull request
Feb 27, 2026
- Add AgentBackend abstraction for Claude and OpenCode - Implement backend detection and preference logic - Add MCP server management for both backends - Maintain compatibility with PR Pickle-Pixel#24 LiteLLM integration - Update scoring/tailoring/wizard to use new backend system
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.
Summary
This PR migrates ApplyPilot’s LLM layer to a LiteLLM-based adapter and standardizes provider/model configuration across CLI, wizard, docs, and runtime checks. It reduces provider-specific logic, adds Anthropic support, and tightens test coverage around LLM resolution/client behavior.
What Changed
llm.py.resolve_llm_config()contract for provider/model/api key resolution.GEMINI_API_KEYOPENAI_API_KEYANTHROPIC_API_KEYLLM_URL(OpenAI-compatible local endpoint)LLM_API_KEY(generic key fallback)openai/gpt-4o-mini,gemini-3.0-flash)LLM_MODELis not setclient.chat(..., max_output_tokens=...)and removedask()usage.applypilot initflow to allow saving multiple provider credentials and explicitLLM_MODEL..env.examplefor new provider options and model format.Tests
Added
test_llm_resolution.pytest_llm_client.pytest_gemini_smoke.py(optional smoke:@pytest.mark.smoke)Suggested commands
Notes