fix: skip auth and onboarding for OpenAI provider in interactive mode
The interactive REPL was hanging because isAnthropicAuthEnabled() didn't recognize CLAUDE_CODE_USE_OPENAI as a 3rd party provider, triggering OAuth flows. Also skip setup screens (onboarding, trust dialog) when using the OpenAI shim. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,7 @@ export async function renderAndRun(root: Root, element: React.ReactNode): Promis
|
||||
}
|
||||
export async function showSetupScreens(root: Root, permissionMode: PermissionMode, allowDangerouslySkipPermissions: boolean, commands?: Command[], claudeInChrome?: boolean, devChannels?: ChannelEntry[]): Promise<boolean> {
|
||||
if ("production" === 'test' || isEnvTruthy(false) || process.env.IS_DEMO // Skip onboarding in demo mode
|
||||
|| isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) // Skip onboarding for OpenAI provider
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,8 @@ export function isAnthropicAuthEnabled(): boolean {
|
||||
const is3P =
|
||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
|
||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
|
||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY)
|
||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ||
|
||||
isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI)
|
||||
|
||||
// Check if user has configured an external API key source
|
||||
// This allows externally-provided API keys to work (without requiring proxy configuration)
|
||||
|
||||
Reference in New Issue
Block a user