7b42e404f5f656d7bfb4aa5c7ddbcd1031264a86
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e2d15ba653 |
qoder 0.2.64: a model off for credits used up is a 429 quota (#880); qodercli 1.21.2's single-file runtime on Windows (#879)
#880: on an international personal_professional_trial account whose 800 credits were used up, Qoder's listing had dfmodel off, and ask() answered its own 400 `unknown or disabled model "dfmodel"`, which magpie reads as the request's fault: a routing group neither failed over nor rested the account (yetone/magpie#5726). - models() records the keys the live listing names and has off (l.off). - ask(): a known model the listing has off, on an account whose usage (/sash/api/v2/me/usage, device token rotated once as usage reads it; a PAT account's on its job token) says the pools spent in turn have no credits left, is answered 429 "usage limit reached: the account's credits are used up (800 / 800 credits), and Qoder lists "dfmodel" off for it until they refresh", before any job-token renewal. magpie's failure() reads that as failQuota (429 + usage limit, no brokeWords). - Kept as before: a model off while credits are left, or when the usage can't be read (unknown, not quota), goes to the #484 renewal and the 400; an id Qoder never served is the 400 at once with no usage read. - usage() reads the envelope through the same usageEnv helper. #879: qodercli 1.21.2 on Windows caches the helper as .qoder\.bin\runtime-info-win32-x64-<hash>.exe beside sgsdk.dll, and campaignRuntime took only the 1.1.66 folder umid-win32-<arch>-<hash>\. Both are now taken, the newest by mtime; another arch's file and a non-.exe (a .tmp) are passed over. Run (mote, load ~900): packages/qoder bun test 424 pass 0 fail; bun scripts/check.mjs qoder ok. Broken by hand: the new tests against the old index.mjs: 5 red (#879's single file found the umid folder instead; #880's 429 was 400; spentOf missing). Fixtures: #879 uses the reporter's file names (runtime-info-win32-x64-faa59bbe39db0bd1.exe, sgsdk.dll). #880's issue gives the plan, 800 credits used 100% and dfmodel off, but not the listing's or usage's bytes; their shape is the other qoder tests'. Not tried: a real out-of-credit Qoder account; Windows itself (the runtime test forces platform win32 on mote); where Qoder desktop 1.21.2 keeps its helper now that resources\umid is gone (the reporter's second point; QODER_RUNTIME_INFO still covers it); the repo-wide bun test (mote at load ~900; only packages/qoder changed). Reported-by: zane668 (#880) Reported-by: ArmedHelicopter (#879) |
||
|
|
1a560ba618 |
qoder 0.2.41: a chat carries the headers Qoder's client puts on a chat, not the machine id three times (#443)
unifilitence (plugins#443, Windows 11 x64, qoder.com) captured a chat
going out with the account's machine UUID as Cosy-ClientIp,
Cosy-MachineId and Cosy-MachineToken alike, Cosy-MachineType 5 and
Cosy-MachineOS x86_64_win32, and asked for each to be what Qoder's own
client sends.
Checked against Qoder.app 0.4.3: its worker runtime
(qoder-agent-sdk/dist/_worker) and the auth wasm it embeds, run here
with its own inputs:
- Cosy-MachineOS is `${x64->x86_64, arm64->aarch64, else arch}_${platform}`,
so x86_64_win32 is Qoder's own value. Only ia32 differed: the plugin
sent x86_win32, Qoder sends ia32_win32. Fixed.
- Its non-chat calls (prepareRequest) do send ClientIp, MachineId and
MachineToken all as the machine id, MachineType 5. The listing, usage
and queue status keep that set.
- A chat (prepareInferRequest, then its header pass) differs: no
Cosy-ClientIp; MachineToken and MachineType are the native device
identity's (umid runtime-info) or absent when there is none; and a
Cosy-MachineHostname, os.hostname() made safe as its zei does
(punycode, else "-" runs plus a sha256 mark, 96 chars at most). A chat
now goes so. The identity is one the check-in already read in this
process (renewed behind the chat after an hour); a chat never runs the
helper itself, so with no check-in yet it goes without, as Qoder does
when it has no identity.
- The signed payload's requestId is a dashed UUID in Qoder's signer; the
plugin sent it undashed. ideVersion "" is Qoder's own.
Left as it was: Accept-Encoding identity on a chat (Qoder sets none;
its fetch's default differs from Bun's anyway).
Run: packages/qoder `bun test` (276 pass, new headers.test.mjs and one
check-in test); `bun scripts/check.mjs` all green. Real qoder.com
account from bun in a sandbox HOME (token not renewed, no auth.set):
qfmodel answered "pong" with the new chat headers, dfmodel queued
(10605, as before), the model list 200.
Broken by hand: index.mjs at HEAD with the new tests: 6 of 7 in
headers.test.mjs and the check-in chat test red.
Not tried: Windows (the hostname and OS values are unit-tested for
it); a chat carrying a real device identity against the live service.
|
||
|
|
929a8b3adf |
qoder 0.2.30: Qoder CN's check-in sends Qoder CN's own device identity, as its desktop and CLI do (yetone/magpie#2911, #304)
witt-bit (yetone/magpie#2911, 10-22): after Qoder CN's update moved its
daily 100 Credits into the desktop's 权益中心, magpie's Qoder CN check-in
stopped working; Andrew0767 (#304) sees the same with Qoder desktop
installed. The plugin sent Qoder CN's campaigns pages no device identity
at all ("Qoder CN does not need this local helper").
What Qoder CN's clients do, read from their own packages:
- Qoder CN desktop 0.4.9 (the .deb's out/main): its requests carry
Cosy-ClientType 10 and, through createAuthorizedHeaders, the identity
from <resources>/umid/runtime-info run with environment
`regionCode === "global" ? 3 : 0`, i.e. 0 for Qoder CN, the uid on
stdin (--account-stdin) on macOS and Windows. Campaigns are found
through GET /sash/api/v1/me/notifications (hasClaimableCampaign,
campaignPopupUrl). When the identity can't be read it sends the
request without it (resolveMachineIdentity's catch returns null).
- qoderclicn (@qodercn-ai/qoderclicn 1.1.64, 1.1.70, 1.1.73):
campaigns.list is GET /sash/api/v1/me/campaigns, needing the UMID from
1.1.64 and requireMachineIdentity() from 1.1.70, UMID environment
ONLINE = 0; its config dir is QODERCN_CONFIG_DIR, else QODERCN_CLI_HOME
(or home) + QODERCN_CONFIG_DIR_NAME (or .qoder-cn), and it caches the
helper in <config>/.bin/runtime-info-<platform>-<arch>-<hash>.
- Install places: Qoder CN.app/Contents/Resources/umid/runtime-info
(seen inside Qoder-CN-Installer-mac-arm64.zip's payload, 0.4.9),
/opt/Qoder-CN/resources/umid/runtime-info (the .deb), and on Windows
umid/runtime-info.exe among Qoder-CN-win-x64-user.exe's owned files,
with "Uninstall Qoder CN.exe" (electron-builder's
%LOCALAPPDATA%\Programs\<productName>; the folder itself not seen).
The plugin now keeps a runtime per site (RUNTIMES): Qoder CN reads its own
helper (those paths, its CLI's folders, QODERCN_RUNTIME_INFO, never the
international Qoder's) with environment 0, and sends Cosy-MachineToken and
Cosy-MachineType on the list, the claim and the campaigns proxy. As the
desktop does, a Qoder CN request without a readable identity still goes
out, so an account that was claiming without Qoder CN installed (0.2.21's
live PAT claim) keeps doing so. When such a list offers no daily claim,
the check-in is ineligible for the day, saying to install Qoder CN desktop
or sign in to its CLI (no helper), or failed and asked again (a helper that
didn't answer), instead of "inactive". International Qoder is unchanged.
Run: in packages/qoder, TMPDIR=$H HOME=$H/home bun test: 195 pass, 0 fail.
On the old index.mjs the new tests are 9 red (checkin.test.mjs 5 lookup
tests and the env-0 proxy test, native-checkin.test.mjs the env-0 claim,
the ineligible and the failed cases). Repo root at this commit
(rebased on
|
||
|
|
dc59000b1b |
qoder 0.2.26: mark the prompt for Qoder's cache as its client does (#290), and find a machine-wide Windows install's runtime-info
#290 (Codex side session on Ultimate read 0% from cache). Qoder's own
client (qoder-agent-sdk in Qoder.app 0.4.3, qodercli 1.1.75) sends, on
every agent_chat_generation request:
- cache_control {type: ephemeral} on the last non-thinking, non-tool
block of the last message when it is a user turn (none when the last
turn is tool results);
- each user turn's blocks as `contents` beside `content`;
- request_id / chat_record_id / request_set_id per request and a stable
session_id per conversation.
The plugin sent none of that, and gave a tool call without an id a new
random id on each request, so the prefix changed every turn. Now:
- cacheMarked() marks as above, without touching the caller's turns;
- session_id is a UUID-shaped sha256 of prompt_cache_key (Codex's
thread, which magpie forwards) or else of the system text and first
user turn; the key itself never goes out;
- an id-less call's id is sha256(turn, place, name, arguments).
Check-in (accomplish on Discord, 10-21: Qoder intl can't check in, CN
can). Only the international site needs Qoder's runtime-info helper;
on Windows only %LOCALAPPDATA%\Programs\Qoder was searched. A
machine-wide install under %ProgramFiles%\Qoder is now found too. This
is one possible cause, not a confirmed one: the reporter's error text
and OS are unknown.
Run at this tree (rebased on
|
||
|
|
0a8e5abd00 |
qoder 0.2.21: Qoder CN PAT sign-in, and a PAT account checks in on its job token (#262, sphuang1030-prog)
Qoder CN offers the PAT sign-in too (its /api/v1/jobToken/exchange takes a personal_token as qoder.com's does; the prompt names qoder.cn's console), and a PAT account, which has no device token, signs the campaigns pages and the daily check-in with its job token instead of rotating a device token it doesn't have. The account keeps the name its browser sign-in takes (email || uid), so a renewed PAT sign-in replaces its lapsed row. Run at d7db9f2b987c46cbf100cda9d89a8a546e374fb6: - bun test packages/qoder: 155 pass, 0 fail; bun scripts/check.mjs passes. - The PR's check-in tests go through the loader's campaigns fetch, not auth.checkin. Two local tests calling auth.checkin with a PAT account (qoder and qoder-cn: claimed on the job token, no deviceToken refresh; a 403 is "failed", not rotated) pass on this head and both fail with the checkin hook's change reverted by hand. They follow on main. - Probe: POST openapi.qoder.com.cn/api/v1/jobToken/exchange with an invalid pt- token answers 400 BadRequest, as openapi.qoder.sh does (an unknown path answers 401), so the endpoint exists on CN and a bad PAT maps to "refused the PAT". qoder.cn/account/integrations redirects to sign-in, as qoder.com's does. - Not tried: a live qoder.cn PAT exchange, chat or claim; that rests on the author's live run. |
||
|
|
5e80f39d3f |
qoder 0.2.10: international check-in finds Qoder's device identity runtime where Qoder CLI and the Linux desktop really keep it (ARNO on Discord: "device identity runtime not found")
0.2.9 (#49) looked for the CLI's cached runtime in ~/.qoder/.bin/umid-<platform>-<arch>-*/ on every platform. qodercli 1.1.66 (npm) and the worker in Qoder desktop 0.4.3 (extractBinary) make that folder only on Windows (umid-win32-<arch>-<hash>\runtime-info.exe with sgsdk.dll); on macOS and Linux they write a file, ~/.qoder/.bin/runtime-info-<platform>-<arch>-<hash>. And the Linux desktop installs to /opt/Qoder/resources/umid/runtime-info (Qoder 0.4.3's .deb and .rpm), which wasn't looked at. So a macOS user with only the CLI, and every Linux user, got HTTP 502 on the international check-in, while Qoder CN (which needs no runtime) checked in. campaignRuntime now looks at /opt/Qoder on Linux, reads the CLI's cache as the CLI writes it (the newest matching file, a .tmp being written skipped), and follows the CLI's own folder settings (QODER_CONFIG_DIR, QODER_CLI_HOME, QODER_CONFIG_DIR_NAME). Windows and macOS desktop lookup is unchanged. checkin.test.mjs lays out the CLI cache as qodercli writes it on win32/x64, darwin arm64/x64 and linux x64/arm64, plus /opt/Qoder and the config-folder variables: 6 of the new tests fail on 0.2.9 (the Windows case passes on both, as 0.2.9 had it right), all pass now. bun test packages/qoder (87 pass) and scripts/check.mjs qoder under a temp HOME pass. On this Mac the real lookup returns /Applications/Qoder.app/Contents/Resources/umid/runtime-info. Not run: the runtime itself against a real account, or on Linux/Windows. |
||
|
|
d8431fbfcf | qoder: include native device identity in international campaigns (#49) | ||
|
|
72382fb8a1 | qoder 0.2.7: the account's fetch sends Qoder's campaigns pages (the daily credits claim) as the account — GET <openapi>/sash/api/v1/me/campaigns and POST …/{id}/claim, on the device token as usage is read (a refused one rotated once), for qoder (openapi.qoder.sh) and qoder-cn (openapi.qoder.com.cn); any other page there is still refused. For magpie's Qoder check-in (Discord, ARNO, after wallechfox/qoder-checkin). checkin.test.mjs is new (4 of its 5 fail on 0.2.6); bun test (54 pass) and check.mjs qoder pass. Not tried against Qoder itself (no Qoder account here). |