fix(prompt-retry): preserve async holds without blocking validation fallbacks

This commit is contained in:
YeonGyu-Kim
2026-05-19 13:48:33 +09:00
parent 5f733f471c
commit e57bac3b6b
9 changed files with 168 additions and 6 deletions
@@ -16,6 +16,10 @@ function toDelegatedModelConfig(fallback: NonNullable<ReturnType<typeof getNextR
}
}
function isPromptGateReservedError(error: string): boolean {
return error.includes("promptAsync skipped by gate: reserved") || error.includes("prompt skipped by gate: reserved")
}
export async function retrySyncPromptWithFallbacks(input: {
sessionID: string
initialError: string
@@ -63,6 +67,14 @@ export async function retrySyncPromptWithFallbacks(input: {
}
}
if (isPromptGateReservedError(promptError)) {
return {
promptError: finalError,
categoryModel,
fallbackState,
}
}
finalError = promptError
fallbackState.providerID = fallbackModel.providerID
fallbackState.modelID = fallbackModel.modelID