Skip to content

feat(glm): add Z.AI OAuth Coding Plan with captcha and API key parity#1848

Open
teededung wants to merge 2 commits into
decolua:masterfrom
teededung:feat/glm-zcode
Open

feat(glm): add Z.AI OAuth Coding Plan with captcha and API key parity#1848
teededung wants to merge 2 commits into
decolua:masterfrom
teededung:feat/glm-zcode

Conversation

@teededung

@teededung teededung commented Jun 16, 2026

Copy link
Copy Markdown

Integrate GLM Coding with ZCode upstream fingerprint, adapted from zcode_proxy patterns to match 9router executor/OAuth architecture:

  • Z.AI OAuth CLI flow (init/poll) + dashboard ZaiOAuthModal
  • GlmExecutor: Coding Plan JWT URL, Alibaba captcha (CloakBrowser + headed interactive fallback), ZCode 3.1.0 headers, system prompt inject
  • API key path: api.z.ai upstream parity (captcha, ZCode headers, model map)
  • OAuth token refresh for Z.AI access_token + biz API key rotation
  • Coding Plan usage/quota from zcode-plan billing APIs
  • Provider registry: dual OAuth/API key auth, risk notice, glm-5.2/turbo models
  • Connection dedup by zcodeUserId; model test 120s timeout for captcha
  • Unit tests for executor, headers, system prompt, refresh, and usage

Integrate GLM (Global) with ZCode upstream fingerprint, adapted from
zcode_proxy patterns to match 9router executor/OAuth architecture:

- Z.AI OAuth CLI flow (init/poll) + dashboard ZaiOAuthModal
- GlmExecutor: Coding Plan JWT URL, Alibaba captcha (CloakBrowser +
  headed interactive fallback), ZCode 3.1.0 headers, system prompt inject
- API key path: api.z.ai upstream parity (captcha, ZCode headers, model map)
- OAuth token refresh for Z.AI access_token + biz API key rotation
- Coding Plan usage/quota from zcode-plan billing APIs
- Provider registry: dual OAuth/API key auth, risk notice, glm-5.2/turbo models
- Connection dedup by zcodeUserId; model test 120s timeout for captcha
- Unit tests for executor, headers, system prompt, refresh, and usage
- Use AsyncLocalStorage in GlmExecutor to isolate per-request credentials/urlIndex
- Fix ZaiOAuthModal: consecutive 404 retry via sessionMissRef; split resetInternal vs handleClose
- Check res.ok on captcha submit (HTML + manager timer leak fix)
- Pin playwright-core to ^1.60.0; update GLM unit tests for ALS wrapper
@teededung teededung mentioned this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant