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:
@@ -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)
|
||||
|
||||
@@ -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,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",
|
||||
|
||||
Reference in New Issue
Block a user