You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds LiteLLM as a built-in provider. Sets LITELLM_BASE_URL (and optionally LITELLM_API_KEY) to connect. Models are auto-discovered from the proxy's /v1/models endpoint at
startup, no manual config needed.
Since LiteLLM is a gateway (not a fixed provider), it's not in models.dev. The provider auto-seeds into the database when env vars are detected.
Files changed:
provider.ts: Custom loader with env var resolution, database seeding, and /v1/models discovery
schema.ts: Well-known 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)
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.
cc @adamdotdevin would love your review on this one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Issue for this PR
Closes #29935
Type of change
What does this PR do?
Adds LiteLLM as a built-in provider. Sets
LITELLM_BASE_URL(and optionallyLITELLM_API_KEY) to connect. Models are auto-discovered from the proxy's/v1/modelsendpoint atstartup, no manual config needed.
Since LiteLLM is a gateway (not a fixed provider), it's not in models.dev. The provider auto-seeds into the database when env vars are detected.
Files changed:
provider.ts: Custom loader with env var resolution, database seeding, and/v1/modelsdiscoveryschema.ts: Well-knownlitellmprovider 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+LITELLM_API_KEYenv varsbun dev), LiteLLM models auto-discovered and appear in model pickerbun dev serve+bun run --cwd packages/app dev), provider visible in settings, chat worksScreenshots / recordings
ceb2-3aa7-47fd-b86f-e27af97bfe24-2.mp4
Checklist