Skip to content

Commit 9b2cc25

Browse files
Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 58b8df1 commit 9b2cc25

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/services/clients/claude/index.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ export class Claude {
7474
if (!sessionKey) {
7575
throw new Error('Session key required')
7676
}
77-
if (!sessionKey.startsWith('sk-ant-sid')) {
78-
throw new Error('Session key invalid: Must be in the format sk-ant-sid**-*****')
77+
if (!/^sk-ant-sid\d+-/.test(sessionKey)) {
78+
throw new Error('Session key invalid: Must be in the format sk-ant-sidXX-*****')
79+
}
7980
}
8081
if (fetch) {
8182
this.fetch = fetch

0 commit comments

Comments
 (0)