Skip to content

Commit a0323f7

Browse files
committed
fix: update base URL resolution logic for Codex models in GitHub mode
1 parent 8c1ba91 commit a0323f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/services/api/providerConfig.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,13 @@ export function resolveProviderRequest(options?: {
375375
const envBaseUrlRaw =
376376
asEnvUrl(process.env.OPENAI_BASE_URL) ??
377377
asEnvUrl(process.env.OPENAI_API_BASE)
378+
379+
const isCodexModelForGithub = isGithubMode && isCodexAlias(requestedModel)
378380
const envBaseUrl =
379-
isGithubMode && envBaseUrlRaw && getGithubEndpointType(envBaseUrlRaw) === 'custom'
381+
isCodexModelForGithub && envBaseUrlRaw && getGithubEndpointType(envBaseUrlRaw) === 'custom'
380382
? undefined
381383
: envBaseUrlRaw
384+
382385
const rawBaseUrl = explicitBaseUrl ?? envBaseUrl
383386

384387
const shellModel = process.env.OPENAI_MODEL?.trim() ?? ''

0 commit comments

Comments
 (0)