Repository navigation
Sign in to a Z.ai or BigModel account - #124
Merged
Merged
Conversation
A new entry in the service-type list, next to the ChatGPT account. The sign-in ends with an ordinary API key on the account, so what it writes is a plain anthropic upstream — everything after the sign-in is the same as any other upstream. Two differences from the ChatGPT dialog, both forced by their protocol: - There is no code-on-another-device path. Their platform only offers the browser flow. - The browser ends up on their page, not one of ours, so nothing hands the app back the focus and the dialog learns the outcome by polling. The dialog says two things before the sign-in can start: the authorization page belongs to their own client, because the service does not let third parties register an authorization app; and signing in creates an API key named thinkwatch on the account, or reuses the one already there. Requires the core release that carries ThinkWatchProject/ThinkWatch-Core#112. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fylorn
force-pushed
the
feat/zai-login
branch
from
September 23, 2026 10:15
284c50c to
e3d3bf9
Compare
fylorn
marked this pull request as ready for review
September 23, 2026 10:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new entry in the service-type list, next to the ChatGPT account. The sign-in ends with an ordinary API key on the account, so what it writes is a plain
anthropicupstream — everything after the sign-in behaves like any other upstream.Draft until core is released. It needs the core version that carries ThinkWatchProject/ThinkWatch-Core#112 (merged to main, not tagged yet);
tw-apiis still pinned to v0.28.0, so CI cannot pass before the pin is bumped.What it adds
ZaiLoginDialog: account service as a segmented control (Z.ai / BigModel), name, outbound proxy, and the notes that have to be read before signing in.src-tauri/src/zai.rs: opens the authorization page and keeps its address out of the webview, the same rule the ChatGPT commands follow.Two differences from the ChatGPT dialog, both forced by their protocol
What the dialog says before it will start
thinkwatchon the account, or reuses the one already there.Checked
tsc, 228 unit tests,cargo clippy(against a local build of the unreleased core) all clean. The dialog was driven for real in the isolated preview: switching to BigModel moves the endpoint line toopen.bigmodel.cn/api/anthropic, the button stays disabled until the notes are acknowledged, signing in reaches the waiting state and then the finished state. Both languages read correctly.Against the real service, from an isolated core instance: both families return a real authorization address, and the status and cancel endpoints behave. Their authorization window is 5 minutes, shorter than our 15-minute cap, and core follows theirs.
🤖 Generated with Claude Code