Skip to content

feat(opencode): add Open WebUI provider#18306

Open
SamirMoustafa wants to merge 15 commits intoanomalyco:devfrom
SamirMoustafa:feat/open-webui-provider
Open

feat(opencode): add Open WebUI provider#18306
SamirMoustafa wants to merge 15 commits intoanomalyco:devfrom
SamirMoustafa:feat/open-webui-provider

Conversation

@SamirMoustafa
Copy link

@SamirMoustafa SamirMoustafa commented Mar 19, 2026

Issue for this PR

Closes #13537

Builds on feat: add provider openWebUI #14341 (thanks @PapeThePope).

Type of change

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

What does this PR do?

Adds Open WebUI as a provider (OpenAI-compatible API): login/connection in CLI and TUI, listing and models, handling for gzip/chunked streams, docs, and tests.

Files: packages/opencode/src/cli/cmd/providers.ts, packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx, packages/opencode/src/config/paths.ts, packages/opencode/src/provider/models.ts, packages/opencode/src/provider/provider.ts, packages/opencode/src/provider/transform.ts, packages/opencode/src/server/routes/provider.ts, packages/opencode/test/provider/transform.test.ts, packages/web/src/content/docs/providers.mdx.

How did you verify your code works?

  • bun typecheck in packages/opencode
  • Manual: Open WebUI URL + API key via CLI/TUI, model list and a short chat/streaming run

Screenshots / recordings

N/A (CLI/TUI text flows).

Checklist

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

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 19, 2026
@github-actions
Copy link
Contributor

Hey! Your PR title Add Open WebUI Provider doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

Potential Duplicate Found:

The current PR (#18306) appears to be an updated or refactored version of the Open WebUI provider feature originally introduced in PR #14341. The description acknowledges this relationship, so these two PRs are related but the current one seems to be a successor/improvement to the earlier work.

@SamirMoustafa SamirMoustafa changed the title Add Open WebUI Provider feat/Add Open WebUI Provider Mar 20, 2026
@SamirMoustafa SamirMoustafa changed the title feat/Add Open WebUI Provider feat(opencode): add Open WebUI provider Mar 20, 2026
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 20, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@SamirMoustafa
Copy link
Author

Open WebUI + Ollama (local smoke test)

Download docker-compose.yml

docker compose up -d
docker compose exec ollama ollama pull qwen2.5:0.5b

Open http://localhost:3001 → admin signup → Settings → Account → API keys → create a key.

// Optional
export OPEN_WEBUI_BASE_URL=http://localhost:3001
export OPEN_WEBUI_API_KEY=…

Stop: docker compose down (volumes: docker compose down -v).
Ports: Web UI defaults to 3001 (OPEN_WEBUI_PORT in docker-compose.yml). Run docker compose only under infra/open-webui-local or add -f infra/open-webui-local/docker-compose.yml.

Screen.Recording.2026-03-20.at.2.15.07.AM.mov

@SamirMoustafa SamirMoustafa marked this pull request as ready for review March 20, 2026 01:18
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.

[FEATURE]: Add Open WebUI as a provider

3 participants