Skip to content

[ask-a-sailor] mozilla-ai/any-llm provider abstraction: swap LLMs without code changes #21

Description

@fullharbor

Currently AskASailorAgent hard-codes OpenAI. mozilla-ai/any-llm (github.com/mozilla-ai/any-llm) provides a single interface across OpenAI, Anthropic Claude, Mistral, and local models (Ollama) with one import swap. This is critical for: (1) cost flexibility -- switch to Mistral 7B for lower-cost club deployments, (2) offline/local mode -- llamafile for clubs with no cloud budget or data privacy requirements, (3) funder credibility -- not locked to any single vendor. Work: (1) pip install any-llm, refactor AskASailorAgent to use any_llm.get_llm(model=os.environ['LLM_MODEL']) instead of OpenAI() directly, (2) add LLM_MODEL env var to .env.example and CI, (3) verify tests still pass with mocked any-llm client, (4) document the swap in README.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions