Skip to content

Commit 6115ebc

Browse files
Add more codex keys to agent detection (#2290)
add new agent keys
1 parent 7ccd4b3 commit 6115ebc

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

stripe.go

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ func (s *BackendImplementation) responseToErrorV2(res *http.Response, resBody []
991991

992992
var typedError error
993993

994-
// The beginning of the section generated from our OpenAPI spec
994+
// errorTypeSwitch: The beginning of the section generated from our OpenAPI spec
995995
switch *raw.Error.Type {
996996
case "temporary_session_expired":
997997
tmp := struct {
@@ -1007,7 +1007,7 @@ func (s *BackendImplementation) responseToErrorV2(res *http.Response, resBody []
10071007
default:
10081008
typedError = raw.Error
10091009
}
1010-
// The end of the section generated from our OpenAPI spec
1010+
// errorTypeSwitch: The end of the section generated from our OpenAPI spec
10111011

10121012
return typedError
10131013
}
@@ -1625,13 +1625,18 @@ func getUname() string {
16251625
}
16261626

16271627
var aiAgents = map[string]string{
1628-
"ANTIGRAVITY_CLI_ALIAS": "antigravity",
1629-
"CLAUDECODE": "claude_code",
1630-
"CLINE_ACTIVE": "cline",
1631-
"CODEX_SANDBOX": "codex_cli",
1632-
"CURSOR_AGENT": "cursor",
1633-
"GEMINI_CLI": "gemini_cli",
1634-
"OPENCODE": "open_code",
1628+
// aiAgents: The beginning of the section generated from our OpenAPI spec
1629+
"ANTIGRAVITY_CLI_ALIAS": "antigravity",
1630+
"CLAUDECODE": "claude_code",
1631+
"CLINE_ACTIVE": "cline",
1632+
"CODEX_SANDBOX": "codex_cli",
1633+
"CODEX_THREAD_ID": "codex_cli",
1634+
"CODEX_SANDBOX_NETWORK_DISABLED": "codex_cli",
1635+
"CODEX_CI": "codex_cli",
1636+
"CURSOR_AGENT": "cursor",
1637+
"GEMINI_CLI": "gemini_cli",
1638+
"OPENCODE": "open_code",
1639+
// aiAgents: The end of the section generated from our OpenAPI spec
16351640
}
16361641

16371642
func detectAIAgent(lookupEnv func(string) (string, bool)) (string, bool) {

0 commit comments

Comments
 (0)