Skip to content

feat(provider): add LiteLLM provider support#22179

Closed
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/litellm-provider
Closed

feat(provider): add LiteLLM provider support#22179
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/litellm-provider

Conversation

@tobias-weiss-ai-xr
Copy link
Copy Markdown

@tobias-weiss-ai-xr tobias-weiss-ai-xr commented Apr 12, 2026

Closes #22212

Adds LiteLLM as a provider using the existing @ai-sdk/openai-compatible adapter. Users running LiteLLM can point opencode at it instead of configuring each provider individually.

Verified: 19 packages typecheck clean, tested against local LiteLLM proxy.

Add litellm entry to the custom() provider map. Uses the bundled
@ai-sdk/openai-compatible SDK with user-configured baseURL. Supports
LITELLM_API_KEY env var and apiKey in provider options. Autoloads when
baseURL is configured in opencode.json under provider.litellm.
@github-actions
Copy link
Copy Markdown
Contributor

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

Based on my search, I found several related PRs that are potentially duplicates or closely related:

Potential Duplicates:

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

  2. PR feat(opencode): add auto loading models for litellm providers #13896 - feat(opencode): add auto loading models for litellm providers

    • Related work on LiteLLM provider with automatic model loading

Related PRs (not direct duplicates but same area):

  1. PR feat(opencode): add Kiro provider #20491 - feat(opencode): add Kiro provider

    • Similar pattern of adding new provider support to the registry
  2. PR feat(provider): add openai-compatible custom tool compat #16531 - feat(provider): add openai-compatible custom tool compat

    • Addresses OpenAI-compatible provider improvements using the same adapter
  3. PR fix(provider): enable image support for custom OpenAI-compatible providers #21627 - fix(provider): enable image support for custom OpenAI-compatible providers

    • Related improvements to OpenAI-compatible provider support

Most Likely Duplicate: PR #14468 appears to be doing the exact same thing - adding LiteLLM provider support. You should check if this was previously closed or merged before proceeding.

@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 13, 2026
@github-actions github-actions bot closed this Apr 13, 2026
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.

feat: add LiteLLM provider support

1 participant