Repository navigation
feat(opencode): add LiteLLM plugin integration - #29937
RheagalFire wants to merge 6 commits into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate/Related PRs Found:
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. |
0cfea4d to
0bb63ba
Compare
|
cc @adamdotdevin would love your review on this one. |
0bb63ba to
432d8d1
Compare
432d8d1 to
d370c1d
Compare
|
Hey folks, any update here |
|
would be great to have this merged into a release |
|
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. |
|
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Issue for this PR
Closes #29935
Type of change
What does this PR do?
Adds LiteLLM as a plugin. Sets
LITELLM_BASE_URL(and optionallyLITELLM_API_KEY) to connect. Models are synced from the proxy's/v1/modelsendpoint and enriched with per-model metadata from/model/info.Files changed:
src/plugin/litellm/litellm.ts: Plugin withprovider.modelshook (model sync) andauthhook (API key)src/plugin/litellm/models.ts: Model fetching from/v1/models+/model/infometadata enrichmentsrc/plugin/index.ts: Registered LiteLLM in internal pluginssrc/provider/provider.ts: Removed built-in provider code, added generic plugin provider seedingpackages/core/src/provider.ts:litellmprovider IDsprite.svg/types.ts: Provider iconen.ts/settings-providers.tsx/dialog-select-provider.tsx: UI strings and notesLITELLM_BASE_URLhttp://localhost:4000)LITELLM_API_KEYRelated: #29308, #6231, #14468
How did you verify your code works?
LITELLM_BASE_URL=http://localhost:4000env varbun dev), LiteLLM models auto-discovered from/v1/modelsand appear in model picker/model/infometadata enrichment (token limits, costs)Screenshots / recordings
ceb2-3aa7-47fd-b86f-e27af97bfe24-2.mp4
Checklist