continue-custom/core/llm/utils
Dallin Romney 93c437cb0b
Improve error handling UX and move stream retry to BaseLLM (#11773)
* Improve error handling UX and move stream retry to BaseLLM

- Remove issue reporting buttons (GitHub/Discussions) from stream error dialog
- Add error detection for invalid API keys, OpenAI org verification,
  insufficient balance (402), and failed secret templating
- Update out-of-credits copy to match current messaging
- Add sk- prefix validation for OpenAI/Anthropic keys in add model form
- Update OpenRouter API key URL to workspaces/default/keys
- Move overloaded/malformed JSON retry from GUI streamThunkWrapper to
  BaseLLM _retryableStream to avoid glitchy UI from GUI-level retries
- Add overloaded/malformed JSON detection to core retry infrastructure

* fix: simplify retry architecture and make sk- validation a warning

- Remove _retryableStream from BaseLLM; overloaded/malformed JSON retry
  belongs in withExponentialBackoff at the HTTP fetch level
- Revert defaultShouldRetry/calculateDelay exports (no longer needed externally)
- Keep OpenRouter API key URL unchanged
- Make sk- prefix validation a warning instead of blocking error

* Fix stale comment referencing removed retry decorator

* Improve 402 Insufficient Balance error message clarity

* fix: improve copy - rename "View key" to "Check API key", use warning styles, simplify secret error message

* fix: use ternary for className to avoid space stripping by prettier

* style: fix prettier formatting in OutOfCreditsDialog

---------

Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
2026-03-24 12:40:19 -07:00
..
calculateRequestCost.ts fix: update stale comment for Claude Opus 4.5 pricing 2026-02-18 01:23:22 +00:00
calculateRequestCost.vitest.ts Add comprehensive cost tracking with OpenAI pricing and session usage display 2025-12-05 15:23:21 -08:00
extractContentFromCodeBlocks.test.ts fix: formatting 2025-06-20 11:24:06 -07:00
extractContentFromCodeBlocks.ts improv: tests 2025-06-20 09:30:00 -07:00
extractPathsFromCodeBlocks.test.ts npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
extractPathsFromCodeBlocks.ts switch to the free trial assistant once logged in for the first time 2025-06-08 13:44:44 -07:00
getSecureID.test.ts fix: HOTFIX 🚑 Fix crypto error (#7938) 2025-09-24 13:06:58 -07:00
getSecureID.ts fix: HOTFIX 🚑 Fix crypto error (#7938) 2025-09-24 13:06:58 -07:00
retry.test.ts Improve error handling UX and move stream retry to BaseLLM (#11773) 2026-03-24 12:40:19 -07:00
retry.ts Improve error handling UX and move stream retry to BaseLLM (#11773) 2026-03-24 12:40:19 -07:00
starterCredits.ts feat: rehaul onboarding for updated billing (#7965) 2025-10-12 20:50:16 -07:00