mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-09 01:51:39 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user