Skip to content

Commit 46dd339

Browse files
authored
Merge pull request #26 from gitcommit90/agent/20260901-claude-fable-5-1
Support Claude Fable 5.1 subscriptions
2 parents 1aa5687 + b00cd1f commit 46dd339

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitcommit90/rerouted",
33
"productName": "ReRouted",
4-
"version": "0.5.12",
4+
"version": "0.5.13",
55
"description": "A local AI router for connected accounts, models, named routes, and automatic fallback.",
66
"author": "gitcommit90",
77
"license": "MIT",

src/lib/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const OAUTH = {
7878
chatUrl: "https://api.anthropic.com/v1/messages",
7979
// Models available through the Claude OAuth account.
8080
models: [
81+
{ id: "claude-fable-5-1", name: "Claude Fable 5.1" },
8182
{ id: "claude-fable-5", name: "Claude Fable 5" },
8283
{ id: "claude-sonnet-5", name: "Claude Sonnet 5" },
8384
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },

src/lib/providers/claude.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const cfg = OAUTH.claude;
99
const ANTHROPIC_METADATA = Symbol.for("rerouted.anthropic.metadata");
1010

1111
/** Provider-compatible request metadata and system-block shaping. */
12-
const CLAUDE_CLI_VERSION = "2.1.92";
12+
const CLAUDE_CLI_VERSION = "2.1.251";
1313
const CC_ENTRYPOINT = "cli";
1414

1515
const ANTHROPIC_BETA =

tests/gateway.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,12 +826,14 @@ describe("claude oauth request shaping", () => {
826826
const h = seen.opts.headers;
827827
assert.equal(h["X-App"], "cli");
828828
assert.ok(String(h["User-Agent"]).startsWith("claude-cli/"));
829+
assert.ok(String(h["User-Agent"]).includes("2.1.251"), "new Claude models require the current supported CLI fingerprint");
829830
assert.ok(String(h["User-Agent"]).includes("(external, cli)"));
830831
assert.ok(h["X-Stainless-Os"]);
831832
assert.ok(h["X-Claude-Code-Session-Id"]);
832833
assert.ok(String(h["Anthropic-Beta"]).includes("oauth-2025-04-20"));
833834
const body = JSON.parse(seen.opts.body);
834835
assert.ok(body.system?.[0]?.text?.startsWith("x-anthropic-billing-header:"));
836+
assert.ok(body.system[0].text.includes("cc_version=2.1.251."));
835837
assert.equal(body.system.length, 3);
836838
assert.ok(body.metadata?.user_id);
837839
});
@@ -1291,7 +1293,7 @@ describe("requested OAuth model catalogs", () => {
12911293
);
12921294
assert.deepEqual(
12931295
OAUTH.claude.models.map((model) => model.id),
1294-
["claude-fable-5", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-4-7", "claude-haiku-4-5-20251001"]
1296+
["claude-fable-5-1", "claude-fable-5", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-4-7", "claude-haiku-4-5-20251001"]
12951297
);
12961298
assert.deepEqual(
12971299
OAUTH.antigravity.models.map((model) => model.id),

0 commit comments

Comments
 (0)