From b8717aa8603ed659a2d3bf932b025a12500740b3 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 15 Oct 2026 21:01:58 +0800 Subject: [PATCH] =?UTF-8?q?factory=200.1.30:=20requests=20say=20droid=200.?= =?UTF-8?q?242.0,=20the=20current=20release=20(sky=E6=9D=A8=20on=20magpie'?= =?UTF-8?q?s=20Discord:=20every=20model=20403=20"Factory:=20Forbidden"=20f?= =?UTF-8?q?rom=20Claude=20Code=20on=200.1.29)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sky杨, on magpie 0.1.1254 with this plugin at 0.1.29, got 403 "Factory: Forbidden" from Claude Code on every model, GPT, Claude and Gemini alike. Factory's body was a bare "Forbidden", not a phrase-specific refusal. Header diff against droid 0.242.0 (npm droid and @factory/cli-darwin-arm64 0.242.0, unpacked with --ignore-scripts into an empty directory and read with strings, never run). Its model requests carry: Authorization, X-Factory-Client: cli, X-Client-Version, X-Factory-Org-Id, User-Agent factory-cli/, x-session-id, x-assistant-message-id, x-api-provider, x-provider-routing-source (registry_default without a routing claim), OpenAI-Platform: org-bHuLtG1fGmYk5YaOihAAXFBw for openai/azure_openai, and X-Api-Key "placeholder" from its Anthropic client. The plugin sends each of these with the same value, apart from the release: 0.233.0, nine releases behind. The WorkOS client id is unchanged. droid's binary still reads a server-side min_cli_version flag and runs a forced auto-update. 0.1.16 was the same case (JL: every model 403 "Forbidden" from pi and Claude Code while droid worked; the plugin said 0.231.0, two behind), and JL's later reports (0.1.25) were about models, not refusals. Whether Factory refuses an old release with a 403 is still not confirmed: there is no Factory account to try with. This is the one header difference found. Run: bun test in packages/factory, 143 pass. With VERSION put back to 0.233.0, droid.test.mjs goes red (Expected "0.242.0", Received "0.233.0"). bun scripts/check.mjs factory: ok. Not tried against Factory itself. Full suite: bun test (packages/factory) 143 pass --- packages/factory/droid.test.mjs | 4 ++-- packages/factory/index.mjs | 9 +++++++-- packages/factory/package.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/factory/droid.test.mjs b/packages/factory/droid.test.mjs index ba0a2dd..d110b52 100644 --- a/packages/factory/droid.test.mjs +++ b/packages/factory/droid.test.mjs @@ -62,8 +62,8 @@ test("another agent's request to /api/llm/o opens with droid's line", async () = // the length was the old body's: it isn't sent on expect(s.headers.get("content-length")).toBe(null) expect(s.headers.get("x-api-provider")).toBe("fireworks") - expect(s.headers.get("x-client-version")).toBe("0.233.0") - expect(s.headers.get("user-agent")).toBe("factory-cli/0.233.0") + expect(s.headers.get("x-client-version")).toBe("0.242.0") + expect(s.headers.get("user-agent")).toBe("factory-cli/0.242.0") expect(s.headers.get("x-factory-org-id")).toBe("fac_D") // Claude Code's system blocks, made chat completions as parts: joined b = JSON.parse((await send(chat, `{"model":"kimi-k3","messages":[{"role":"system","content":[{"type":"text","text":"You are Claude Code."},{"type":"text","text":"Be brief."}]},{"role":"user","content":"hi"}]}`)).body) diff --git a/packages/factory/index.mjs b/packages/factory/index.mjs index c5a8796..d2db11f 100644 --- a/packages/factory/index.mjs +++ b/packages/factory/index.mjs @@ -13,8 +13,13 @@ const API = "https://api.factory.ai" const API_EU = "https://api.eu.factory.ai" // droid's WorkOS client, production const CLIENT_ID = "client_01HNM792M5G5G1A2THWPXKFMXB" -// the droid release the requests say they are -const VERSION = "0.233.0" +// the droid release the requests say they are: the current one (droid +// 0.242.0's X-Client-Version and User-Agent). Its binary reads a +// server-side min_cli_version, and both reports of every model answered a +// bare 403 "Forbidden" (0.1.16, 0.1.30) came with this release behind +// droid's while every other header matched; whether Factory refuses an old +// release so is not confirmed +const VERSION = "0.242.0" // how long before an access token lapses it is renewed (droid: a minute) const REFRESH_LEAD = 2 * 60 * 1000 // and how long before, magpie renews it ahead of time (auth.refresh): a diff --git a/packages/factory/package.json b/packages/factory/package.json index 45e6e02..a16e3c0 100644 --- a/packages/factory/package.json +++ b/packages/factory/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-factory-auth", - "version": "0.1.29", + "version": "0.1.30", "description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie", "type": "module", "main": "./index.mjs",