factory 0.1.30: requests say droid 0.242.0, the current release (sky杨 on magpie's Discord: every model 403 "Factory: Forbidden" from Claude Code on 0.1.29)
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/<ver>, 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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user