Skip to content

Commit 371641e

Browse files
author
OpenClaude Worker 3
committed
fix: keep claude-cli identity for GitHub Copilot
GitHub Copilot whitelists 'claude-cli' but may not whitelist 'openclaude-cli'. Keep using the upstream-compatible identity for GitHub Copilot until confirmed safe to switch. Refs: PR #976
1 parent c2fecc6 commit 371641e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/utils/http.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ export function getProviderApiUserAgent(
5050
const workload = getWorkload()
5151
const workloadSuffix = workload ? `, workload/${workload}` : ''
5252
const isFirstParty = options?.isFirstParty ?? getAPIProvider() === 'firstParty'
53-
// Kimi Code currently expects the upstream-compatible client token.
53+
// Kimi Code and GitHub Copilot currently expect the upstream-compatible
54+
// client token. GitHub Copilot whitelists `claude-cli` but may not
55+
// whitelist `openclaude-cli` — keep compatibility until confirmed.
5456
const requiresCompatibilityIdentity =
55-
isFirstParty || options?.providerRouteId === 'kimi-code'
57+
isFirstParty || options?.providerRouteId === 'kimi-code' || getAPIProvider() === 'github'
5658
const productName = requiresCompatibilityIdentity
5759
? 'claude-cli'
5860
: 'openclaude-cli'

0 commit comments

Comments
 (0)