[bug] request Authorization header uses root-level api_key instead of active profile key; config show disagrees with the wire; config edits have no effect
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
- 1-2 ngày
- Mức phù hợp với người mới
- 48/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ệ
- typescript
- Lĩnh vực
- authentication, cli
Hướng nghiên cứu
Start by tracing how the CLI selects credentials for requests and how bl config show resolves the active profile; the report does not name source files or tests. Reproduce with a profile base_url and api_key, then compare the verbose Authorization mask against the active profile key. Done when requests use the active profile's key and the config view matches the key sent.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
CLI version
2.3.1
Skill version (optional)
2.3.1
Node version
n/a (standalone binary install channel, no Node on machine)
OS
Windows 10 10.0.19045 x86_64 (MINGW64/Git Bash)
Region
cn
Command to reproduce
bl video task get --task-id 00000000-0000-0000-0000-000000000000 --verbose
Expected behavior
The Authorization header should match the active profile's api_key — the same key bl config show reports as active — so the request authenticates against the profile's base_url.
Actual behavior
- The
> Auth:mask printed by--verbosematches the ROOT-level api_key [REDACTED root-level key], while the request URL is the PROFILE's base_url (token-plan regional endpoint) → HTTP 401 InvalidApiKey (request_id: 04ad1d6d-68ff-4a1e-ab6b-562fb8956883, a79cdf7b-a2d0-40ed-9e51-59a2daa02c6e). bl config showreports the PROFILE key [REDACTED profile key] as active — the CLI's own config view contradicts what is sent on the wire.- Removing the root-level
api_keyfromconfig.jsondoes NOT change the key sent on the wire (same root-key mask on the next request) → suggests a credential store outsideconfig.jsonsilently takes precedence. - Explicit
--config <profile>does not change the sent key either. - Control experiments: root key + root base_url → HTTP 200; profile endpoint + explicitly passed valid profile key → HTTP 200. Only the mixed pairing (root key + profile endpoint) fails — which is what the CLI produces by itself.
- Reproduced on both 1.27.0 and 2.3.1 (on 2.3.1 the wrong Auth header is visible in --verbose before the unrelated HTTP crash of #263).
Full output
> GET https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/tasks/00000000-0000-0000-0000-000000000000
> Auth: [REDACTED root-level key]
> x-dashscope-source-config: {"channel":"bailian-cli","tags":{"t1":"public","t2":"bl","t3":"1.27.0"}}
< 401 Unauthorized
request_id: 04ad1d6d-68ff-4a1e-ab6b-562fb8956883
Error: Invalid API-key provided.
Status: HTTP 401 (InvalidApiKey)
Exit code: 1
JSON error (optional)
Already tried
- bl update and skill version aligned with CLI
- bl auth status OK for this command
- Different network / region — still reproduces
How often does this happen?
Always
How was bl invoked?
Agent (Cursor, Claude, etc.)
Notes (optional)
- Related: #171 (closed) covered 401s for the upload-policy endpoint under token-plan profiles; this report is about the broader credential precedence/mixing affecting every request.
- Security/UX concern: a key the user can no longer see or edit in
config.jsonkeeps being used; there is no documented way to inspect or clear that external credential store viabl. - Attribution: automatically drafted and submitted by the agentic assistant (model: qwen3.8-max) of Qoder CN Desktop v0.4.3 (build 0.4.3.0) on behalf of the account owner, who reviewed and approved the content before submission.
- Ngôn ngữ chính
- TypeScript
- Star
- 475
- Fork
- 34
- Merge trung bình
- 23 giờ 6 phút
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 modelstudioai/cli
-
[bug] Local media upload is pinned to China endpoint; Singapore workspace API key fails getPolicy (401 InvalidApiKey)Có thể đã có người làm @Uddoo đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
modelstudioai/cli#267 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
modelstudioai/cli#202 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
modelstudioai/cli#195 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
modelstudioai/cli#190 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelstudioai/cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Nimblesite/SharpLsp#468 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesCó thể đã có người làm @FabienDanieau đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bg_wait's blocking mode (stopOnAttention: false) is under-documented and effectively undiscoverableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
nicobailon/pi-subagents#3019 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
db-ux-design-system/core-web#8613 ·
Maintainer thường phản hồi trong vòng 1 ngày