factory 0.1.16: requests say droid 0.233.0, the current release (Discord, JL on magpie 0.1.824 with plugin 0.1.15: every model 403 "Factory: Forbidden" from pi and Claude Code, while droid itself works) — droid 0.233.0's model requests carry the same headers, paths and body shape as 0.231.0's apart from its version (X-Client-Version, User-Agent factory-cli/<ver>), and its binary reads a server-side min_cli_version; the plugin said 0.231.0, two releases behind. Whether Factory refuses an old version with a 403 is not confirmed (no Factory account to try with); this is the one difference found. bun test (79 pass) and bun scripts/check.mjs factory pass.

This commit is contained in:
yetone
2026-10-04 18:26:33 +08:00
parent c3ba3ef1ab
commit 9fefe75f15
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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.231.0")
expect(s.headers.get("user-agent")).toBe("factory-cli/0.231.0")
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-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)
+1 -1
View File
@@ -14,7 +14,7 @@ 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.231.0"
const VERSION = "0.233.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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-factory-auth",
"version": "0.1.15",
"version": "0.1.16",
"description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie",
"type": "module",
"main": "./index.mjs",