Skip to content

[Q] Maintainer follow-up: ZCode 3.16.3 OAuth HTTP 500 / code 2007 with active Coding Plan #1268

Open

Description

@0xsheet

涉及的框架 · Framework

ZCode Agent(自研)

你的问题 · Your question

Browser authorization displays “Sign-In Complete” and returns to ZCode, but the desktop app displays “Login failed, please try again”.

The callback reaches the application successfully. The failure occurs at POST https://zcode.z.ai/api/v1/oauth/token: HTTP 500, followed by zai_oauth_required. A separate diagnostic request returned code 2007, “http error”.

My GLM Coding Lite Monthly Plan is Valid. The account usage page shows only 22% used in both the 5-hour and weekly quotas. However, a direct Coding Plan API request with my API key also returned HTTP 429 / error 1113 (“Insufficient balance or no resource package”).

Actual desktop login request ID: 20261027171436f1e2afbfd749c56302f2
Diagnostic logid: 20261027170749068e79e847ff6795ecc7

Related reports: #575 and #1232. I am requesting maintainer follow-up for this account and the OAuth exchange failure. Is there a supported workaround or a fix in progress?

你已经尝试过什么 · What you've tried

  • Retried authorization multiple times.
  • Verified the zcode:// handler resolves to zcode.desktop and /opt/ZCode/zcode.
  • Confirmed successful callback routing in local logs.
  • Tried API-key mode and both provider formats; no successful model reply was confirmed.
  • Checked for the deletedModels configuration issue reported in [Bug + Community Fix] ZCode GLM Coding Plan Login Failure After Update/Logout — deletedModels Blacklist Issue #290; it was absent in the current provider settings.
  • Attempted the bundled CLI. It initially could not locate zcode-builtin.json. Retried with ZCODE_BUILTIN_PROVIDER_CONFIG_FILE pointing to /opt/ZCode/resources/config/provider/zcode-builtin.json; successful CLI login has not yet been confirmed.

ZCode 版本 / 环境 · Version / Environment

ZCode Desktop 3.16.3-8992 (.deb); bundled CLI 0.17.0; Ubuntu 26.04.1 LTS, Linux x86_64.

Activity

  1. github-actions commented on Oct 27, 2026

    @github-actions

    👋 感谢你的反馈,我们已经收到。

    • 维护者看到后会尽快回复你。
    • 状态保持为 status: 待评估,你可以随时补充信息。
    • 信息不全时我们会打上 needs: 更多信息 标签并 @ 你。

    👋 Thanks — we've received your issue.

    • A maintainer will get back to you as soon as we can.
    • Status stays at status: 待评估 (Triage); feel free to add context.
    • If we need more details, we'll add needs: 更多信息 and ping you.
  2. 0xsheet commented on Oct 27, 2026

    @0xsheet
    Author

    Update: the original sign-in problem is now resolved on my Ubuntu machine after applying an IPv4 hosts workaround for api.z.ai and fully restarting ZCode.

    The workaround used was:

    sudo cp /etc/hosts /etc/hosts.backup-zai
    printf '\n8.217.100.151 api.z.ai\n8.217.233.95 api.z.ai\n' | sudo tee -a /etc/hosts
    getent ahosts api.z.ai

    Then fully quit ZCode, reopen it, and retry Connect to Z.ai → Global. Sign-in completed successfully afterwards.

    This suggests an IPv4/IPv6 connection or address-selection issue may contribute to the OAuth/business-token failure in this environment, but I have not isolated the exact internal cause. These IP addresses are a temporary workaround, not a permanent DNS recommendation; they may change.

    The subsequent model/provider issue was separate and is also resolved now. Please investigate why the standard login flow failed while forcing IPv4 allowed it to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions