#2335

[BUG] When post-processing fails, Handy silently pastes the raw transcription

Openrnmrnmrnmrnmrnmrnmopened 4d ago

Before You Submit

I searched existing issues. Related: #2268 (an empty LLM result is treated as success; I hit it too with gpt-5.1). This report is about failed requests.

Bug Description

When the post-processing request fails, Handy logs the error and pastes the original transcription without telling the user, so it looks as if post-processing worked.

Steps to reproduce: select a model the provider no longer serves (for example gpt-5.3-chat-latest on OpenAI) and dictate with post-processing.

Expected: a visible error, at least a toast.

Actual: the raw transcription is pasted, and the error is only in the log.

In my case the selected model was gpt-5.3-chat-latest. OpenAI's /v1/models still returns it, so it is in the model dropdown, but it was shut down on 2026-08-10, and every request gets 404: The model gpt-5.3-chat-latest has been deprecated. Four dictations in a row were pasted unedited before I noticed it in the log, and from the user's side it only looked like post-processing had become very fast.

post_process_transcription() returns None on error, and process_transcription_output() then uses the original text with no event to the UI:

https://github.com/cjpais/Handy/blob/73c095857bc4eadff097f64767c40ad129cc372d/src-tauri/src/actions.rs#L393-L400

https://github.com/cjpais/Handy/blob/73c095857bc4eadff097f64767c40ad129cc372d/src-tauri/src/actions.rs#L420-L424

Possible fix

On failure, show a toast like the existing transcription-error one, for example "Post-processing failed (404 Not Found), pasted the original text".

System Information

App Version: 0.9.8

Operating System: Windows 11 Pro (Insider build 26220)

CPU: AMD Ryzen 5 4500U

GPU: AMD Radeon integrated (not involved here)

Logs

Abridged: the structured-output request and the legacy fallback both get 404, then the original text is pasted:

[19:04:45][handy_app_lib::actions][DEBUG] Starting LLM post-processing with provider 'openai' (model: gpt-5.3-chat-latest)
[19:04:46][handy_app_lib::llm_client][DEBUG] Chat completion response received with status 404 Not Found over HTTP/1.1 from https://api.openai.com/v1/chat/completions
[19:04:46][handy_app_lib::actions][WARN] Structured output failed for provider 'openai': API request failed with status 404 Not Found: {... "The model `gpt-5.3-chat-latest` has been deprecated" ...}. Falling back to legacy mode.
[19:04:46][handy_app_lib::llm_client][DEBUG] Chat completion response received with status 404 Not Found over HTTP/1.1 from https://api.openai.com/v1/chat/completions
[19:04:46][handy_app_lib::actions][ERROR] LLM post-processing failed for provider 'openai': API request failed with status 404 Not Found: {...}. Falling back to original transcription.
[19:04:46][handy_app_lib::actions][DEBUG] Text pasted successfully in 225.4061ms

The investigation and this text were done with Claude Code; the logs and measurements are from my machine.

Activity

0

No activity yet.