Ramblr — resilient AI dictation cleanup
I contributed PR #282 to Ramblr, an Android AI dictation app that transcribes speech and uses an LLM provider waterfall to clean up text. Merged for release 1.0.33, the change helps cleanup continue when a provider introduces a model that rejects the temperature parameter.
Reliability without unnecessary calls
Rather than depend only on a hardcoded model list, a fail-closed classifier recognizes structured temperature rejections on a real cleanup request. The app retries once without temperature within the original deadline and remembers the rejection per provider entry. Unknown errors continue through the existing waterfall. Known o1, o3, o4, and gpt-5.6 prefixes remain seeded to avoid a recurring failed request for existing users.
The capability cache is bounded to 128 entries with a seven-day TTL. Successful capability writes are throttled until half the TTL has elapsed, avoiding a SharedPreferences rewrite on every dictation. A shared retry helper keeps Gemini and OpenAI-compatible paths aligned.
Review and verification
During review I removed an initial save-time probe: it would have made a billable request on every configuration save. Learning from real cleanup requests avoids that extra cost. MockWebServer tests cover rejection, retry, and cached behavior; the reviewer reported 2,072 unit tests passing. The provider-error fixtures were synthetic; no paid live-provider check was claimed.