cli: OpenCode Go uses Console credential instead of selected OpenCode Go credential
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cli, typescript
- Bereich
- cli
Rechercherichtung
The bug is in how the opencode-go provider picks its credential, so start with the provider and auth code that reads the active credential from opencode.db and the /api/provider integration lookup. Reproduce by storing two Go credentials, switching with opencode auth switch opencode-go, then running a Go model and checking which x-opencode-org-id is sent. Done means the provider uses the active "OpenCode Go" credential rather than the Console one, and the switch takes effect without a restart.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
The opencode-go provider ignores the active credential selected under "OpenCode Go" (opencode auth switch opencode-go <label>). It keeps billing requests to the workspace of the active "OpenCode Console" credential, so switching Go accounts has no effect and the user hits the other account's weekly Go limit.
Environment
- opencode version: 2.1.3
- OS: Linux 7.3.6-arch1-1 (x86_64)
- Terminal: alacritty (TERM=xterm-256color, COLORTERM=truecolor)
- Shell: /bin/zsh
- Install/channel: latest
- Active plugins: opencode-screenshot-vision
Reproduction
- Have two OpenCode Go credentials stored (
opencode auth list): "A" and "B", belonging to different workspaces. - Have an active "OpenCode Console" credential that belongs to workspace B.
- Run
opencode auth switch opencode-go A. The active flag in the DB for "OpenCode Go" becomes A. - Run a Go model, e.g.
opencode run -m opencode-go/glm-5.3-flash "hi". - Observed:
OpenCode Go usage limit reached (weekly...)with the workspace URL of B.GET /api/providershowsopencode-gowithintegrationID: "opencode"andx-opencode-org-id= workspace B. - Calling the Go endpoint directly with A's key and workspace A's org header returns 200. With B's key it returns 429.
- Adding A's key under "OpenCode Console" and making it active fixes it without restarting the service.
Expected Behavior
The Go provider should use the active credential of the "OpenCode Go" integration.
Actual Behavior
The provider uses the active "OpenCode Console" credential. Switching the Go credential has no effect. --standalone and OPENCODE_API_KEY do not override it either.
Additional Context
- Workspace IDs and key values are redacted.
- In
opencode.db,credential.active= 1 for "OpenCode Go / A", but the Go provider was billing workspace B. - Workaround: add the key under "OpenCode Console" and make it active.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 230k
- Forks
- 31.3k
- Ø Merge
- 5 Std. 32 Min.
- Gemergte PRs (30 T.)
- 453
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
anomalyco/opencode#67064 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 82/100
anomalyco/opencode#67009 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/web type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
anomalyco/opencode#67001 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logEvtl. vergeben @liwenjie200543 hat das vor 2 Tagen übernommen. Offenarea/plugins platform/linux reproduced type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anomalyco/opencode#66970 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksEvtl. vergeben @argszero hat das vor 2 Tagen übernommen. Offenarea/tui platform/wsl status/repro-simulated type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
anomalyco/opencode#66773 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode
Ähnliche Issues
-
enhancement feature/signals self-driving team/self-driving
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PostHog/posthog#144208 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue web
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
triage: not actionable
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
oxc-project/oxc#30518 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug Claude useability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
Maintainer antworten meist innerhalb von 1 Tag