Fix AI post-processing errors leaking into typed output#243
Fix AI post-processing errors leaking into typed output#243uid4oe wants to merge 3 commits intoaltic-dev:mainfrom
Conversation
When the LLM API fails during dictation post-processing, fall back to the raw transcription instead of typing error strings into the user's document. Fixes two paths in processTextWithAI(): empty API response and any LLM error. Closes #242
|
nice work! I wanted to fix this for a long time. |
|
@altic-dev thanks, great work with the app! good question, I can think of two options
I can add the second on which should reduce the frequency further. note I added some tests too but my mac is not compatible with the project, would be great if you can verify the changes |
Consolidate retry logic into a single isRetryable() method that handles both network errors (already retried) and transient HTTP errors (new).
|
Waitt then how are finding these issues if you cannot run them? |
3ec8f5d to
018da96
Compare
|
@altic-dev you mean how I found the bug? I just used the app, and checked the log file, the change was straight forward, you already have a similar fallback for apple intelligence case the next two commits extends retryable errors on llm client, tests for it are straightforward assertions but they should be added to the project I can't build on Xcode 26.4, (macOS 26) regardless of dependency versions. Multiple packages (FluidAudio, mcp-swift-sdk, swift-collections) aren't Swift 6 compatible, let me know if you have a fix |
|
got it. that makes sense. Thanks. So I have 26+ 6.2 - it compiles well. Try it on Xcode and see if Claude can help you version it right with respect to any tool chain version mismatch etc. I need some help with making sure the the UX is good for the retry or alternatives. Error on the screen makes sense but def the fall back works but letting them know it wasn't post processed is needed for sure. Lmk what you think. |
|
yeah I'm trying, seems like mainly related to mac os 26. Retry or some sort of error state would be good for sure. |
|
Yeah I have 26 too actually. works okay. Where do you want to show the retry option or error? the overlay is supposed to go away after you click stop usually. |
|
@altic-dev something like this maybe? Also it makes sense to allow users to skip this view if for instance they press the hotkeys again, then we can just use the fallback, wdyt?
|



Summary
ContentView.processTextWithAI(): empty API response and any LLM errorCloses #242