GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(opencode): add LiteLLM plugin integration by RheagalFire · Pull Request #29937 · anomalyco/opencode

Conversation

@RheagalFire

@RheagalFire RheagalFire commented May 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #29935

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds LiteLLM as a plugin. Sets LITELLM_BASE_URL (and optionally LITELLM_API_KEY) to connect. Models are synced from the proxy's /v1/models endpoint and enriched with per-model metadata from /model/info.

Files changed:

  • src/plugin/litellm/litellm.ts: Plugin with provider.models hook (model sync) and auth hook (API key)
  • src/plugin/litellm/models.ts: Model fetching from /v1/models + /model/info metadata enrichment
  • src/plugin/index.ts: Registered LiteLLM in internal plugins
  • src/provider/provider.ts: Removed built-in provider code, added generic plugin provider seeding
  • packages/core/src/provider.ts: litellm provider ID
  • sprite.svg / types.ts: Provider icon
  • en.ts / settings-providers.tsx / dialog-select-provider.tsx: UI strings and notes
Env var Description
LITELLM_BASE_URL Base URL of the LiteLLM proxy (e.g. http://localhost:4000)
LITELLM_API_KEY API key / master key for the proxy (optional if proxy has no auth)

Related: #29308, #6231, #14468

How did you verify your code works?

  1. Started LiteLLM proxy with config (claude-sonnet-4-6 + claude-opus-4-6 via Azure AI Foundry)
  2. Set LITELLM_BASE_URL=http://localhost:4000 env var
  3. Ran TUI (bun dev), LiteLLM models auto-discovered from /v1/models and appear in model picker
  4. Verified /model/info metadata enrichment (token limits, costs)
  5. Sent messages with streaming, works
  6. Switched between models (sonnet/opus), works
  7. Full test suite passes (2979 pass, 0 fail)
  8. Typecheck passes across all 21 packages

Screenshots / recordings

ceb2-3aa7-47fd-b86f-e27af97bfe24-2.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

polmontanera, jhedberg, Lukas-Ertl, ngehrsitz, cesco69, and el-AI-wei reacted with thumbs up emoji
All reactions
  • 👍 6 reactions
@RheagalFire
RheagalFire requested a review from adamdotdevin as a code owner May 29, 2026 22:48
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate/Related PRs Found:

  1. PR feat(opencode): add LiteLLM provider with auto model discovery #14468 - feat(opencode): add LiteLLM provider with auto model discovery

    • feat(opencode): add LiteLLM provider with auto model discovery #14468
    • Why related: This appears to be an earlier or alternative implementation of LiteLLM provider integration with auto model discovery. Current PR feat(opencode): add LiteLLM plugin integration #29937 is likely updating/completing this feature (PR feat(opencode): add LiteLLM provider with auto model discovery #14468 is mentioned in the "Related" section).
  2. PR fix: inject cache_control on content blocks for openai-compatible proxies to Anthropic backends (Bifrost, LiteLLM, Databricks) #25985 - fix: inject cache_control on content blocks for openai-compatible proxies to Anthropic backends (Bifrost, LiteLLM, Databricks)

    • fix: inject cache_control on content blocks for openai-compatible proxies to Anthropic backends (Bifrost, LiteLLM, Databricks) #25985
    • Why related: Involves LiteLLM proxy handling and OpenAI-compatible protocol features that may be relevant to the integration.
  3. PR feat(opencode): add LLM provider fallback chain #26292 - feat(opencode): add LLM provider fallback chain

    • feat(opencode): add LLM provider fallback chain #26292
    • Why related: Provider integration feature that may have overlapping scope with adding a new gateway provider.

The most significant is PR #14468 - verify if it's the predecessor/duplicate of the current work or if it's a separate issue being addressed by PR #29937.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RheagalFire
RheagalFire force-pushed the feat/litellm-provider branch from 0cfea4d to 0bb63ba Compare June 1, 2026 16:38
@RheagalFire

RheagalFire commented Jun 1, 2026

Copy link
Copy Markdown
Author

cc @adamdotdevin would love your review on this one.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RheagalFire
RheagalFire force-pushed the feat/litellm-provider branch from 0bb63ba to 432d8d1 Compare June 3, 2026 19:23
RheagalFire added 4 commits June 4, 2026 01:19
@RheagalFire
feat(opencode): add LiteLLM provider integration
1212829
@RheagalFire
fix(ui): use emoji for LiteLLM provider icon
0091583
@RheagalFire
refactor: move LiteLLM from built-in provider to plugin pattern
151a2b9
@RheagalFire
fix: read LITELLM_BASE_URL from env and ensure plugin provider appear…
d370c1d
…s in UI
@RheagalFire
RheagalFire force-pushed the feat/litellm-provider branch from 432d8d1 to d370c1d Compare June 3, 2026 19:49
@RheagalFire RheagalFire changed the title feat(opencode): add LiteLLM provider integration feat(opencode): add LiteLLM plugin integration Jun 3, 2026
RheagalFire added 2 commits June 5, 2026 02:26
@RheagalFire
Merge branch 'dev' into feat/litellm-provider
0fcaae8
@RheagalFire
test: add unit tests for LiteLLM plugin
0f16bb1
@thdxr
thdxr requested review from Brendonovich and Hona as code owners June 11, 2026 00:18
@RheagalFire

RheagalFire commented Jun 19, 2026

Copy link
Copy Markdown
Author

Hey folks, any update here
cc @Hona @Brendonovich

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Jun 20, 2026
📊 AI CLI 工具社区动态日报 2026-06-20 zx0828/big_model_radar#151
Open
@KMontag42

KMontag42 commented Aug 7, 2026

Copy link
Copy Markdown

would be great to have this merged into a release

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@el-AI-wei el-AI-wei mentioned this pull request Sep 14, 2026
[FEATURE]: Add LiteLLM as a provider #48938
Closed
1 task done
@el-AI-wei

el-AI-wei commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

This PR got held previously up because it never got reviewed. Now it's blocked because it's stale and conflicts with dev branch and likely needs to be redesigned or ported for the current provider/V2 architecture. So, either this PR needs to do that and somehow get an actual review this time or someone needs to make a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thdxr thdxr closed this Oct 10, 2026
@misbahsy misbahsy mentioned this pull request Oct 11, 2026
feat(core): add LiteLLM provider #54558
Closed
4 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin
@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add LiteLLM proxy as a built-in provider

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@RheagalFire @KMontag42 @el-AI-wei @thdxr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.