Skip to content

fix(doctor): retry DashScope China endpoint on 401 (salvage #19191)#21248

Merged
teknium1 merged 1 commit into
mainfrom
salvage/pr-19191
May 7, 2026
Merged

fix(doctor): retry DashScope China endpoint on 401 (salvage #19191)#21248
teknium1 merged 1 commit into
mainfrom
salvage/pr-19191

Conversation

@teknium1

@teknium1 teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Closes #19191 via salvage. Fixes #18904.

Summary

China-based users have DashScope credentials that only work against dashscope.aliyuncs.com/compatible-mode/v1, not the international endpoint. The doctor probe only tried international and reported 401 as a hard failure. Add a single fallback retry against the China endpoint when international 401s and no explicit DASHSCOPE_BASE_URL override is set.

Validation

scripts/run_tests.sh tests/hermes_cli/test_doctor.py -k dashscope → 1 passed (new regression).

Original author: @LeonSGP43.

@teknium1 teknium1 merged commit 5ead126 into main May 7, 2026
8 of 11 checks passed
@teknium1 teknium1 deleted the salvage/pr-19191 branch May 7, 2026 12:55
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/pr-19191 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7521 on HEAD, 7520 on base (🆕 +1)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 3949 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes doctor reports valid China DashScope API key as invalid

3 participants