Move judge models off litellm
Why
litellm is a direct dependency of agentevals, not something google-adk pulls in. The only code that uses it is the judge model path for prefixed model ids (openai/..., anthropic/..., ollama/... and similar) through ADK's LiteLlm class. It adds about 80 MB of packages and their security advisories to every install, and it makes agentevals look like a model router, which it is not.
Goal
Judge metrics run against OpenAI compatible endpoints, Anthropic and Gemini with no litellm installed. litellm becomes an optional extra for the long tail of providers, then goes away.
Scope
- Route judge model ids to native model classes: OpenAI compatible (Ollama, vLLM, Azure, OpenRouter and friends through
base_url), Anthropic, Gemini. - Existing prefixed ids keep working through a mapping, so current eval configs and
--judge-modelvalues do not change. - Per run credential injection (
api_key,base_url) keeps working with no cross talk between concurrent runs. agentevals[litellm]extra re enables the remaining litellm prefixes (Bedrock, Vertex through litellm, Cohere) for one or two releases.- Fix the dependency floors comment in
pyproject.toml. The floors that stay are there forgoogle-adk.
Out of scope
- New metrics or changes to metric semantics.
- Removing
google-adk(tracked in https://github.com/agentevals-dev/agentevals/issues/243).
Done when
- A default install has no litellm, and every judge metric passes against an OpenAI compatible endpoint, Anthropic and Gemini.
- Docs list the supported judge model id forms.
Would explicit judge settings and a record of the configuration used fit into this work, or would you prefer a separate follow-up issue?
When reviewing historical scores, the judge model name alone may not fully explain how an evaluation was graded. Generation settings and defaults can affect results, especially when changing providers or client versions. Making the grading setup inspectable would also help with comparisons between saved Runs (#249).
A useful scope would be:
- A small, documented set of judge settings, such as temperature and response-length limits, where supported by the selected judge and metric.
- Validation with clear feedback for unsupported or inapplicable settings, so users can tell whether their requested configuration was actually applied.
- A non-secret record alongside results of the model/provider and settings used, including known defaults. Defaults that cannot be determined should remain identifiable as unspecified.
- Existing behavior preserved when users omit these settings.
The goal is to make the grading setup easier to understand and repeat, while acknowledging that model outputs can still vary. The public configuration shape and provider-specific mappings could follow whatever interfaces make sense for the native-judge work.
Would you consider this within #242, or better tracked separately?
Thanks, these are great points, but I'd prefer this work to be tracked separately. The original rationale for this particular issue is to move off of litellm as a dependency.
Hi, I maintain llm-api-adapter, a lightweight Python SDK supporting 9 cloud LLM providers, including OpenAI, Anthropic, and Gemini, without vendor SDKs or LiteLLM. It has just one required runtime dependency (requests) and also supports async calls. I'm currently working on generic OpenAI-compatible endpoint support via base_url, though that isn't released yet.
Would you consider a lightweight provider-agnostic client behind an ADK BaseLlm wrapper, or do you specifically want to use ADK's native model classes? If this approach fits your plans, I'd be happy to contribute a PR implementing the integration.