claude-code with OpenAI mode fix (#102)

Co-authored-by: HitMargin <hitmargin@qq.com>
This commit is contained in:
HitMargin
2026-04-04 10:54:13 +08:00
committed by GitHub
parent a67b4a40b0
commit 6fefff2ef2
3 changed files with 6 additions and 5 deletions

0
.githooks/pre-commit Executable file → Normal file
View File

2
Run.ps1 Normal file
View File

@@ -0,0 +1,2 @@
bun install
bun run dev --dangerously-skip-permissions

View File

@@ -112,14 +112,13 @@ export function isAnthropicAuthEnabled(): boolean {
return !!process.env.CLAUDE_CODE_OAUTH_TOKEN
}
const settings = getSettings_DEPRECATED() || {}
const is3P =
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY)
// Check if user has configured an external API key source
// This allows externally-provided API keys to work (without requiring proxy configuration)
const settings = getSettings_DEPRECATED() || {}
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ||
(settings as any).modelType === 'openai' ||
!!process.env.OPENAI_BASE_URL
const apiKeyHelper = settings.apiKeyHelper
const hasExternalAuthToken =
process.env.ANTHROPIC_AUTH_TOKEN ||