feat(engines): editable accounts across engines + OpenCode provider overhaul#429
Merged
Conversation
Add full UI for adding, editing, and managing custom OpenAI-compatible providers (manual or auto-discovered models, context/output limits, aliases). Update backend with updateProvider, fetch-models routes, and dynamic config injection. Improves local LLM/bespoke endpoint support and DX.
…verhaul
Let every engine account be edited beyond its name, rework the OpenCode
provider UI, and fix authentication for OpenAI-compatible providers whose
endpoint needs injected credentials.
OpenCode providers:
- Add custom OpenAI-compatible providers with an optional (blank) API key,
edit them (name, slug, base URL, models) in a modal — restricted to custom
providers since catalog entries are defined upstream.
- Manage credentials at the account level: each account edits the provider's
real secret fields (e.g. Cloudflare Workers AI shows CLOUDFLARE_ACCOUNT_ID
and CLOUDFLARE_API_KEY), all-optional but filled together; add multiple
accounts per provider (catalog and custom).
- Move context/output limits onto each model row instead of one provider-wide
default (legacy provider-level limits still honored as a fallback).
- Fix 401s for api_url providers: inject the active account's apiKey into the
provider config and substitute ${VAR} placeholders (e.g. the account id in
Cloudflare's base URL), authenticating model discovery too.
- UI polish: brighter "Fetch from /v1/models" button, normal-font inputs,
Ollama/9router placeholders.
Per-engine account editing:
- Copilot (token), Qwen (API key + preset), and Codex (API key) accounts can
update their credential in place, not just rename.
- OAuth accounts (Claude Code, Codex ChatGPT) gain a Re-authenticate action
that reruns the login flow and updates the existing account in place via a
new optional reauthAccountId on the setup flow.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Let every engine account be edited beyond its name, rework the OpenCode
provider UI, and fix authentication for OpenAI-compatible providers whose
endpoint needs injected credentials.
OpenCode providers:
edit them (name, slug, base URL, models) in a modal — restricted to custom
providers since catalog entries are defined upstream.
real secret fields (e.g. Cloudflare Workers AI shows CLOUDFLARE_ACCOUNT_ID
and CLOUDFLARE_API_KEY), all-optional but filled together; add multiple
accounts per provider (catalog and custom).
default (legacy provider-level limits still honored as a fallback).
provider config and substitute ${VAR} placeholders (e.g. the account id in
Cloudflare's base URL), authenticating model discovery too.
Ollama/9router placeholders.
Per-engine account editing:
update their credential in place, not just rename.
that reruns the login flow and updates the existing account in place via a
new optional reauthAccountId on the setup flow.