From b8221a883e1ad4de94a0d7af6204cd510e482748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pe=C3=AFo=20Thibault?= Date: Sat, 7 Feb 2026 13:38:25 +0100 Subject: [PATCH] fix(shared): switch promptWithModelSuggestionRetry to use promptAsync --- src/shared/model-suggestion-retry.ts | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/shared/model-suggestion-retry.ts b/src/shared/model-suggestion-retry.ts index 4b2e6486..2564059f 100644 --- a/src/shared/model-suggestion-retry.ts +++ b/src/shared/model-suggestion-retry.ts @@ -84,28 +84,7 @@ export async function promptWithModelSuggestionRetry( client: Client, args: PromptArgs, ): Promise { - try { - await client.session.prompt(args as Parameters[0]) - } catch (error) { - const suggestion = parseModelSuggestion(error) - if (!suggestion || !args.body.model) { - throw error - } - - log("[model-suggestion-retry] Model not found, retrying with suggestion", { - original: `${suggestion.providerID}/${suggestion.modelID}`, - suggested: suggestion.suggestion, - }) - - await client.session.prompt({ - ...args, - body: { - ...args.body, - model: { - providerID: suggestion.providerID, - modelID: suggestion.suggestion, - }, - }, - } as Parameters[0]) - } + // NOTE: Model suggestion retry removed — promptAsync returns 204 immediately, + // model errors happen asynchronously server-side and cannot be caught here + await client.session.promptAsync(args as Parameters[0]) }