cli: OpenCode Go uses Console credential instead of selected OpenCode Go credential
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cli, typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 230k
- Fork
- 31.3k
- Merge trung bình
- 5 giờ 32 phút
- Pull request đã merge (30 ngày)
- 453
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
anomalyco/opencode#67064 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 82/100
anomalyco/opencode#67009 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/web type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode#67001 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logCó thể đã có người làm @liwenjie200543 đã nhận 2 ngày trước. Đang mởarea/plugins platform/linux reproduced type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#66970 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksCó thể đã có người làm @argszero đã nhận 2 ngày trước. Đang mởarea/tui platform/wsl status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
anomalyco/opencode#66773 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
enhancement feature/signals self-driving team/self-driving
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PostHog/posthog#144208 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage: not actionable
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
oxc-project/oxc#30518 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug Claude useability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
Maintainer thường phản hồi trong vòng 1 ngày