tnt1223 (Discord) signed in to QwenWork and got "QwenWork models: HTTP
403: {"code":"403","message":"User identity could not be verified"}" from
both the model list and Test models. Compared with QwenWorkCN.app 1.2.1,
@magpie-community/opencode-qoder-auth 0.2.57 (plugins d40a074) changes
three things:
- Its gateway calls carry User-Agent qoderwork/1.2.1, an X-Request-Id
and the X-QwenWork-* headers, as the client's openApiJsonRequest does.
These are the device poll, the account-context, wallets and the
refresh.
- A biz account's device token is refreshed for its team ({target:
"biz", team_id}), with client_id and redirect_uri. Before, it was
always refreshed as "c".
- That 403 now tells the user to sign in again.
Raising min makes keepMovedCurrent update every moved Qoder user.
npm view --prefer-online @magpie-community/opencode-qoder-auth version
returned 0.2.57 before this commit.
Run at this head (mote):
- gofmt -l internal/provider: clean.
- GOOS=linux and GOOS=windows go vet ./internal/provider: pass.
- go test -tags nogui ./internal/provider: ok (143.4s).
- In the plugin: packages/qoder bun test 381 pass, and scripts/check.mjs
ok.
Broken by hand (in the plugin): with the client headers dropped, the
refresh always "c", the identity not recorded, the enterprise
redirect_uri kept and the hint removed, 4 of the new tests failed.
Not tried:
- A real QwenWork account. None is at hand, so it isn't known whether
these differences caused the 403.
- The chat's Cosy-Organization-Id, -Organization-Tags and -Data-Policy
headers. The official wasm signer has them and the plugin doesn't send
them.
- A move with this min in a sandbox. Only the min changed.