fix(prompt-retry): preserve async holds without blocking validation fallbacks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user