Skip to content

feat(llmgateway): add provider - #458

Open
steebchen wants to merge 1 commit into
charmbracelet:mainfrom
steebchen:feat/llmgateway
Open

feat(llmgateway): add provider#458
steebchen wants to merge 1 commit into
charmbracelet:mainfrom
steebchen:feat/llmgateway

Conversation

@steebchen

Copy link
Copy Markdown

This adds LLM Gateway as a provider.

LLM Gateway is an open-source (AGPLv3, llmgateway/llmgateway) LLM API gateway that routes OpenAI-compatible requests across all major providers with automatic fallback, caching, and cost analytics. It currently processes 100B+ tokens monthly and is SOC 2 Type II compliant; revenue is publicly verifiable via TrustMRR.

Follows the same shape as #407 (Baseten):

  • cmd/llmgateway/main.go — generator that builds the model list from the public models endpoint (https://api.llmgateway.io/v1/models). The endpoint requires no API key, so the 6-hourly update workflow needs no repo secret.
  • internal/providers/configs/llmgateway.json — generated config (129 models). The generator keeps only tool-capable, text-in/text-out models with ≥20k context, drops deprecated/deactivated and unstable models, maps per-token pricing to per-1M costs, and carries reasoning levels (nonemax) and image support.
  • Registered in internal/providers/providers.go, pkg/catwalk/provider.go, Taskfile.yaml (task gen:llmgateway), and .github/workflows/update.yml.

Auth uses $LLMGATEWAY_API_KEY with type: openai-compat; defaults are claude-sonnet-5 (large) and gpt-5-mini (small).

Verified: go build ./... && go test ./... pass (including TestValidDefaultModels), and the generator output is idempotent across runs.

🤖 Generated with Claude Code

Adds LLM Gateway (https://llmgateway.io) as a provider, with a generator
that builds the model list from its public models endpoint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 15:57
@steebchen
steebchen requested a review from andreynering as a code owner July 22, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

steebchen added a commit to theopenco/llmgateway that referenced this pull request Jul 22, 2026
Assume charmbracelet/catwalk#458 is merged: built-in provider flow is
the primary path, manual crush.json config demoted to an optional
customization section. Merge once the native integration is live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants