Skip to content

Commit 6461b98

Browse files
committed
update regex configs
1 parent d9e0867 commit 6461b98

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/configs.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,16 @@
8484
REGEX_LIST = [
8585
# Named Project API Key (no matter normal or restricted) still valid until Dec 2, 2024
8686
(re.compile(r"sk-proj-[A-Za-z0-9-_]{74}T3BlbkFJ[A-Za-z0-9-_]{73}A"), True, True),
87-
# Old Project API Key
87+
88+
# Service Account key (new format, valid until Oct 13, 2025)
89+
(re.compile(r"sk-svcacct-[A-Za-z0-9-_]{74}T3BlbkFJ[A-Za-z0-9-_]{73}A"), False, True),
90+
91+
# Old Project API Key (as of Oct 13, 2025, not sure if still valid)
8892
(re.compile(r"sk-proj-[A-Za-z0-9-_]{58}T3BlbkFJ[A-Za-z0-9-_]{58}"), True, True),
89-
# Service Account Key
90-
(re.compile(r"sk-svcacct-[A-Za-z0-9-_]\+T3BlbkFJ[A-Za-z0-9-_]+"), False, False),
93+
94+
# Service Account Key (not valid since Oct 13, 2025)
95+
# (re.compile(r"sk-svcacct-[A-Za-z0-9-_]\+T3BlbkFJ[A-Za-z0-9-_]+"), False, False), # No search results on Oct 14, 2025
96+
9197
(re.compile(r"sk-proj-[A-Za-z0-9]{20}T3BlbkFJ[A-Za-z0-9]{20}"), True, False),
92-
# Old key format (deprecated by OpenAI)
93-
(re.compile(r"sk-[a-zA-Z0-9]{48}"), True, False),
98+
# (re.compile(r"sk-[a-zA-Z0-9]{48}"), True, False), # OpenAI deprecated these format, because the keys are only "sk-proj" "sk-svcacct-"
9499
]

0 commit comments

Comments
 (0)