Package: llm

Multi-provider LLM abstraction — Anthropic, Gemini, OpenAI, OpenRouter, and Vertex AI behind one interface.

Package: llm

A unified abstraction over large-language-model providers. Callers code against a single interface and swap providers via configuration — the same prompt code works with Anthropic, Gemini, OpenAI, OpenRouter, or Vertex AI.

Repository: https://github.com/dracory/llm

Installation

go get github.com/dracory/llm

Features

  • Single provider interface covering chat completions.
  • Providers: Anthropic, Google Gemini, OpenAI, OpenRouter, Vertex AI.
  • Provider selection at runtime — each is enabled and configured via its *_API_USED / *_API_KEY / *_DEFAULT_MODEL environment keys.

Where It Is Used

The app exposes an LLM factory (app.Llm) which the external admin modules (blogadmin, shopadmin) consume through adapters for AI-assisted content generation. See Environment Variables for the provider configuration keys.