Skip to content

Add AnyLLMClient as alternative to LiteLLMClient - #97

Open
mking-keeper wants to merge 1 commit into
ArtificialAnalysis:mainfrom
keepertax:replace-litellm-any-llm
Open

mking-keeper wants to merge 1 commit into
ArtificialAnalysis:mainfrom
keepertax:replace-litellm-any-llm

Conversation

@mking-keeper

@mking-keeper mking-keeper commented Oct 25, 2026 •

Copy link
Copy Markdown

Hello!

I'm Matt, CTO at Keeper (a YC startup). Big fan of stirrup and how it's making benchmarking easier for everyone! I saw you are using litellm, and given their recent security incidents I wanted to try and provide an alternative with a different llm proxy library.

Motivation

AnyLLMClient

  • This PR adds AnyLLMClient (equivalent to LiteLLMClient)
    • We add an anthropic adapter code to retain thinking blocks
    • We add a gemini adapter code to retain tool call signatures
    • For openai and anthropic, I set max_retries=0. That way, we don't have layered retries when calling the wrapped sdks

LiteLLMClient

  • For backwards compatibility, LiteLLMClient code is not modified. We may want to remove it in the future

Dependencies

Gemini sdk version

  • Issue: Browser use requires google-genai<2.0.0. However, anyllm 1.40.1 requires google-genai>=2.17.0.
  • As a workaround, I pinned any-llm-sdk[gemini]>=1.27.0,<1.29.0

Openai, anthropic

  • I updated openai, anthropic versions (see uv.lock) to be compatible with anyllm

Testing

  • I did a smoke test with each of the following keys using AnyLLMClient (session.run(prompt)):
    • ANTHROPIC_API_KEY (claude-sonnet-4-6, with thinking)
    • GEMINI_API_KEY (gemini-3-flash-preview)
    • OPENAI_API_KEY (gpt-4.1-mini)
    • OPENROUTER_API_KEY (deepseek-v4.1-flash-1017)

@mking-keeper mking-keeper changed the title Replace optional LiteLLM client with any-llm Consider replacing LiteLLM with any-llm Oct 25, 2026
@mking-keeper
mking-keeper force-pushed the replace-litellm-any-llm branch 2 times, most recently from 9a739f8 to 076f991 Compare October 25, 2026 07:15
@mking-keeper
mking-keeper marked this pull request as ready for review October 25, 2026 07:16
@mking-keeper
mking-keeper force-pushed the replace-litellm-any-llm branch 3 times, most recently from bb99543 to af517bb Compare October 25, 2026 07:45
@mking-keeper mking-keeper changed the title Consider replacing LiteLLM with any-llm Add AnyLLMClient as alternative to LiteLLMClient Oct 25, 2026
@mking-keeper
mking-keeper force-pushed the replace-litellm-any-llm branch from af517bb to 96e9b9a Compare October 25, 2026 08:59
@mking-keeper
mking-keeper force-pushed the replace-litellm-any-llm branch from 96e9b9a to a1e0a6e Compare October 25, 2026 09:00

This branch has not been deployed

No deployments
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