From 58b8df1b020452c0af0c4d4c2b99c224dace96cc Mon Sep 17 00:00:00 2001 From: careful-cat8480 Date: Sat, 11 Apr 2026 18:53:52 -0400 Subject: [PATCH 1/4] fix: accept sk-ant-sid02 session keys for claude web --- src/services/clients/claude/index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/clients/claude/index.mjs b/src/services/clients/claude/index.mjs index c026f710..592cf2f1 100644 --- a/src/services/clients/claude/index.mjs +++ b/src/services/clients/claude/index.mjs @@ -74,8 +74,8 @@ export class Claude { if (!sessionKey) { throw new Error('Session key required') } - if (!sessionKey.startsWith('sk-ant-sid01')) { - throw new Error('Session key invalid: Must be in the format sk-ant-sid01-*****') + if (!sessionKey.startsWith('sk-ant-sid')) { + throw new Error('Session key invalid: Must be in the format sk-ant-sid**-*****') } if (fetch) { this.fetch = fetch From 9b2cc2515a26d9d489ece4143e585077ea2669f9 Mon Sep 17 00:00:00 2001 From: careful-cat8480 Date: Sat, 11 Apr 2026 23:38:53 +0000 Subject: [PATCH 2/4] Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/services/clients/claude/index.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/clients/claude/index.mjs b/src/services/clients/claude/index.mjs index 592cf2f1..27373d97 100644 --- a/src/services/clients/claude/index.mjs +++ b/src/services/clients/claude/index.mjs @@ -74,8 +74,9 @@ export class Claude { if (!sessionKey) { throw new Error('Session key required') } - if (!sessionKey.startsWith('sk-ant-sid')) { - throw new Error('Session key invalid: Must be in the format sk-ant-sid**-*****') + if (!/^sk-ant-sid\d+-/.test(sessionKey)) { + throw new Error('Session key invalid: Must be in the format sk-ant-sidXX-*****') + } } if (fetch) { this.fetch = fetch From 2c15a5c904c633c5eddccc06af845c45b8f3bb54 Mon Sep 17 00:00:00 2001 From: careful-cat8480 Date: Sat, 11 Apr 2026 23:45:42 +0000 Subject: [PATCH 3/4] Apply suggestion from @devin-ai-integration[bot] Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- src/services/clients/claude/index.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/clients/claude/index.mjs b/src/services/clients/claude/index.mjs index 27373d97..0641f03f 100644 --- a/src/services/clients/claude/index.mjs +++ b/src/services/clients/claude/index.mjs @@ -77,7 +77,6 @@ export class Claude { if (!/^sk-ant-sid\d+-/.test(sessionKey)) { throw new Error('Session key invalid: Must be in the format sk-ant-sidXX-*****') } - } if (fetch) { this.fetch = fetch } From 1ba0997a8d2b6303f4d6af10a9a6b5c46abe1949 Mon Sep 17 00:00:00 2001 From: careful-cat8480 Date: Sun, 12 Apr 2026 00:01:10 +0000 Subject: [PATCH 4/4] Update index.mjs replacing session-key examples with a consistent version-agnostic form --- src/services/clients/claude/index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/clients/claude/index.mjs b/src/services/clients/claude/index.mjs index 0641f03f..534e8513 100644 --- a/src/services/clients/claude/index.mjs +++ b/src/services/clients/claude/index.mjs @@ -44,7 +44,7 @@ export class Claude { * @param {function} [options.fetch] - Fetch function * @example * const claude = new Claude({ - * sessionKey: 'sk-ant-sid01-*****', + * sessionKey: 'sk-ant-sidXX-*****', * fetch: globalThis.fetch * }) * @@ -164,7 +164,7 @@ export class Claude { // Can't figure out a way to test this so I'm just assuming it works if (!(this.fetch || globalThis.fetch)) { throw new Error( - `No fetch available in your environment. Use node-18 or later, a modern browser, or add the following code to your project:\n\nimport "isomorphic-fetch";\nconst claude = new Claude({fetch: fetch, sessionKey: "sk-ant-sid01-*****"});`, + `No fetch available in your environment. Use node-18 or later, a modern browser, or add the following code to your project:\n\nimport "isomorphic-fetch";\nconst claude = new Claude({fetch: fetch, sessionKey: "sk-ant-sidXX-*****"});`, ) } if (!this.proxy) {