[PR #479] [CLOSED] feat: provider selection #9628

Closed
opened 2026-02-16 18:13:53 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/479
Author: @Tech0001
Created: 6/27/2025
Status: Closed

Base: devHead: provider-selection


📝 Commits (2)

📊 Changes

20 files changed (+3486 additions, -199 deletions)

View changed files

packages/opencode/src/cli/cmd/provider.ts (+144 -0)
📝 packages/opencode/src/config/config.ts (+1 -0)
📝 packages/opencode/src/index.ts (+2 -0)
📝 packages/opencode/src/server/server.ts (+263 -0)
📝 packages/tui/internal/app/app.go (+42 -3)
📝 packages/tui/internal/commands/command.go (+7 -0)
packages/tui/internal/components/dialog/auth_api_key.go (+174 -0)
packages/tui/internal/components/dialog/auth_method_select.go (+119 -0)
packages/tui/internal/components/dialog/auth_oauth.go (+451 -0)
packages/tui/internal/components/dialog/auth_provider_select.go (+133 -0)
packages/tui/internal/components/dialog/confirm_remove_provider.go (+146 -0)
📝 packages/tui/internal/components/dialog/models.go (+17 -12)
packages/tui/internal/components/dialog/providers.go (+240 -0)
packages/tui/internal/components/dialog/remove_provider.go (+161 -0)
📝 packages/tui/internal/components/status/status.go (+12 -2)
📝 packages/tui/internal/config/config.go (+10 -4)
📝 packages/tui/internal/tui/tui.go (+92 -0)
packages/tui/opencode (+0 -0)
📝 packages/tui/pkg/client/gen/openapi.json (+397 -55)
📝 packages/tui/pkg/client/generated-client.go (+1075 -123)

📄 Description

It didn’t have the ability to switch between providers in the middle of chat, and it would not let you set up more than one provider after you set up your initial one. So, now the workflow is you started up it asks you to set up your provider, then in the TUI, you have a providers modal that will allow you to add additional providers with the key or authentication. And from that point forward, you can switch between different providers and it will remember the model you had selected.

I wanted to use anthropic and o3 for different parts of the chat. I'm doing a PR on this, because I'm pretty sure this is a main feature you'd want in the app.

I'm going to add a favorites section, or hot swap section it quickly let me swap from one provider to another. Might do another PR for that one later.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/479 **Author:** [@Tech0001](https://github.com/Tech0001) **Created:** 6/27/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `provider-selection` --- ### 📝 Commits (2) - [`df9cf5e`](https://github.com/anomalyco/opencode/commit/df9cf5e2d92dac86132ed5ffd4286a3d5ee09db3) Provider Selection - [`f44b6f2`](https://github.com/anomalyco/opencode/commit/f44b6f2bf1727d191eb5e76cb28113c38ac820e7) Added a Remove Provider section ### 📊 Changes **20 files changed** (+3486 additions, -199 deletions) <details> <summary>View changed files</summary> ➕ `packages/opencode/src/cli/cmd/provider.ts` (+144 -0) 📝 `packages/opencode/src/config/config.ts` (+1 -0) 📝 `packages/opencode/src/index.ts` (+2 -0) 📝 `packages/opencode/src/server/server.ts` (+263 -0) 📝 `packages/tui/internal/app/app.go` (+42 -3) 📝 `packages/tui/internal/commands/command.go` (+7 -0) ➕ `packages/tui/internal/components/dialog/auth_api_key.go` (+174 -0) ➕ `packages/tui/internal/components/dialog/auth_method_select.go` (+119 -0) ➕ `packages/tui/internal/components/dialog/auth_oauth.go` (+451 -0) ➕ `packages/tui/internal/components/dialog/auth_provider_select.go` (+133 -0) ➕ `packages/tui/internal/components/dialog/confirm_remove_provider.go` (+146 -0) 📝 `packages/tui/internal/components/dialog/models.go` (+17 -12) ➕ `packages/tui/internal/components/dialog/providers.go` (+240 -0) ➕ `packages/tui/internal/components/dialog/remove_provider.go` (+161 -0) 📝 `packages/tui/internal/components/status/status.go` (+12 -2) 📝 `packages/tui/internal/config/config.go` (+10 -4) 📝 `packages/tui/internal/tui/tui.go` (+92 -0) ➕ `packages/tui/opencode` (+0 -0) 📝 `packages/tui/pkg/client/gen/openapi.json` (+397 -55) 📝 `packages/tui/pkg/client/generated-client.go` (+1075 -123) </details> ### 📄 Description It didn’t have the ability to switch between providers in the middle of chat, and it would not let you set up more than one provider after you set up your initial one. So, now the workflow is you started up it asks you to set up your provider, then in the TUI, you have a providers modal that will allow you to add additional providers with the key or authentication. And from that point forward, you can switch between different providers and it will remember the model you had selected. I wanted to use anthropic and o3 for different parts of the chat. I'm doing a PR on this, because I'm pretty sure this is a main feature you'd want in the app. I'm going to add a favorites section, or hot swap section it quickly let me swap from one provider to another. Might do another PR for that one later. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:53 -05:00
yindo closed this issue 2026-02-16 18:13:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9628