feat(codex): support backend-authorized Luna Reserve fallback (#1780)

* feat(codex): reconcile Luna Reserve fallback and conditional usage

* fix(codex): preserve queued settings and reconcile Reserve sessions
This commit is contained in:
SSU-WEI HUANG
2026-09-09 09:27:40 +08:00
committed by GitHub
parent 5c5c8b3a9f
commit 8357da0a9d
18 changed files with 928 additions and 21 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ function extractTurnContextModel(event: CodexSessionEvent): string | null | unde
const model = (event.payload as Record<string, unknown>).model;
if (model === null) return null;
if (typeof model !== 'string' || !model.trim()) return undefined;
return model.trim();
return model.trim() === 'gpt-reserve' ? 'gpt-5.6-luna' : model.trim();
}
export async function codexLocalLauncher(session: CodexSession): Promise<'switch' | 'exit'> {
@@ -416,7 +416,7 @@ export async function codexLocalLauncher(session: CodexSession): Promise<'switch
await codexLocal({
path: session.path,
sessionId: resumeSessionId,
modelReasoningEffort: (session.getModelReasoningEffort() ?? undefined) as ReasoningEffort | undefined,
modelReasoningEffort: resumeSessionId ? undefined : (session.getModelReasoningEffort() ?? undefined) as ReasoningEffort | undefined,
onSessionFound: handleSessionFound,
abort: abortSignal,
codexArgs,