mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
claude-code with OpenAI mode fix (#102)
Co-authored-by: HitMargin <hitmargin@qq.com>
This commit is contained in:
0
.githooks/pre-commit
Executable file → Normal file
0
.githooks/pre-commit
Executable file → Normal file
2
Run.ps1
Normal file
2
Run.ps1
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bun install
|
||||||
|
bun run dev --dangerously-skip-permissions
|
||||||
@@ -112,14 +112,13 @@ export function isAnthropicAuthEnabled(): boolean {
|
|||||||
return !!process.env.CLAUDE_CODE_OAUTH_TOKEN
|
return !!process.env.CLAUDE_CODE_OAUTH_TOKEN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const settings = getSettings_DEPRECATED() || {}
|
||||||
const is3P =
|
const is3P =
|
||||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
|
||||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
|
||||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY)
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ||
|
||||||
|
(settings as any).modelType === 'openai' ||
|
||||||
// Check if user has configured an external API key source
|
!!process.env.OPENAI_BASE_URL
|
||||||
// This allows externally-provided API keys to work (without requiring proxy configuration)
|
|
||||||
const settings = getSettings_DEPRECATED() || {}
|
|
||||||
const apiKeyHelper = settings.apiKeyHelper
|
const apiKeyHelper = settings.apiKeyHelper
|
||||||
const hasExternalAuthToken =
|
const hasExternalAuthToken =
|
||||||
process.env.ANTHROPIC_AUTH_TOKEN ||
|
process.env.ANTHROPIC_AUTH_TOKEN ||
|
||||||
|
|||||||
Reference in New Issue
Block a user