Commit graph

25 commits

Author SHA1 Message Date
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
Keita A.
af4383f6df
refactor: unify AbortError detection with isAbortError utility (#10551)
* refactor: unify AbortError detection with isAbortError utility

AbortError detection was scattered across 3+ patterns (string
comparison, .name check, .code check). Consolidates into a single
isAbortError() utility that handles all known patterns: "cancel"
string, DOMException, Error.name variants, ABORT_ERR code, and
plain objects. Updates call sites in core/llm/index.ts and
core/llm/utils/retry.ts.

* fix: use exact match for AbortError name, add null guard, improve tests

- Changed .includes("AbortError") to === "AbortError" to preserve
  original exact-match semantics at L505 and retry.ts call sites
- Added null/undefined early return to prevent TypeError on
  "name" in null
- Unified DOMException branch to use exact match consistently
- Tests: removed 4 redundant same-branch duplicates, added 12 new
  cases (case sensitivity, empty string, non-string name, partial
  name boundary, DOMException negative, plain object code asymmetry,
  boolean, frozen object, Error subclass, TypeError)
- Fixed DOMException test skip from expect(true).toBe(true) to
  it.skipIf

* fix: replace == null with === null || === undefined (eqeqeq)

---------

Co-authored-by: amabito <192487536+amabito@users.noreply.github.com>
Co-authored-by: amabito <amabito@local>
2026-03-13 16:10:05 -07:00
Dallin Romney
9759ad657d fix: detect embedded 429 errors from Gemini/VertexAI APIs
Gemini and VertexAI can return rate-limit errors where the HTTP status
is not 429 but the error code is embedded in the response body JSON
(e.g., "code":429). Add regex-based detection of these embedded errors
in both retry paths so they trigger exponential backoff correctly.
2026-02-20 00:30:46 -08:00
continue-staging[bot]
ac2a940cd7
fix: update stale comment for Claude Opus 4.5 pricing
The comment described Claude Opus 4.5 as 'most intelligent model' but
this is now outdated since Claude Opus 4.6 was added as the new most
intelligent model. Updated to 'previous generation' for consistency.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: dallin <dallin+staging@continue.dev>
2026-02-18 01:23:22 +00:00
Dallin Romney
c006d4b231 feat: add Claude Sonnet 4.6 and Claude Opus 4.6 models
Add claude-sonnet-4-6 and claude-opus-4-6 as the new default Sonnet and
Opus models across providers, GUI configs, schemas, cost calculation,
and CLI defaults. Update display names for all >= 4.5 models to use
name-first format (e.g. "Claude Sonnet 4.5" not "Claude 4.5 Sonnet").
2026-02-17 11:49:21 -08:00
Nate
da147f9d0a Add comprehensive cost tracking with OpenAI pricing and session usage display 2025-12-05 15:23:21 -08:00
Nate Sesti
d192e61a55
feat: rehaul onboarding for updated billing (#7965)
* clean: remove dead code related to free trial

* out of credits dialog

* update models addon onboarding tab

* feat: rehaul onboarding for credits-based billing

* Update gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix: credits bar direction

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-10-12 20:50:16 -07:00
Shawn Smith
d1973e3a6a
fix: HOTFIX 🚑 Fix crypto error (#7938)
* fix: 🚑 Fix crypto error

* fix: 🎨 Prettier

* fix: 🐛 Fix broken test
2025-09-24 13:06:58 -07:00
Patrick Erichsen
81dd2c3112 Reapply "feat: enhance oneper utility and refactor build system for commit SHA versioning" (#6811)
This reverts commit 880786b66f.
2025-07-28 14:15:49 -07:00
Patrick Erichsen
880786b66f
Revert "feat: enhance oneper utility and refactor build system for commit SHA versioning" (#6811) 2025-07-28 08:07:06 -07:00
Patrick Erichsen
bbb6765b7c fix jitter 2025-07-25 14:32:06 -07:00
Patrick Erichsen
b292ed2126 Update retry.test.ts 2025-07-25 14:28:44 -07:00
Patrick Erichsen
eca333fde5 Update retry.test.ts 2025-07-25 14:23:02 -07:00
Nate
0453d2acf5 Merge branch 'main' into nate/anthropic-usage-oai-adapters 2025-07-17 19:45:42 -07:00
Shawn Smith
9383571a20
feat: ✨ Introduce LLM streamChat retries (#6596)
* feat: ✨ Introduce LLM streamChat retries

* prettier and decorator fixes

* moar prettier

* enhance tests

* fix: 🐛 Prettier and a fix for jitter

* feat: 🐛 Account for system performance issues in tests
2025-07-16 17:32:01 -07:00
Nate
409935d998 improv: cost breakdown in continue console 2025-07-07 18:02:45 -07:00
Tomasz Stefaniak
77989095ba fix: formatting 2025-06-20 11:24:06 -07:00
Tomasz Stefaniak
0f174fca79 improv: tests 2025-06-20 09:30:00 -07:00
Tomasz Stefaniak
4cf154d9c9 fix: pattern matching 2025-06-20 09:27:33 -07:00
Nate
4a2254e25d switch to the free trial assistant once logged in for the first time 2025-06-08 13:44:44 -07:00
Nate
184be8f092 npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p
ath .gitignore --ignore-path .prettierignore --write
2025-05-25 18:34:39 -07:00
Tomasz Stefaniak
64fb928b8f fix: matching context code 2025-05-20 18:06:56 -07:00
chezsmithy
189d0c87c6 feat/bedrock-secure-prompt-caching 2025-04-07 22:49:40 -07:00
tomasz-io
9cb5170b1a feat: get paths 2025-04-03 10:45:42 -07:00
tomasz-io
2ffb4aefeb feat: extract paths 2025-04-03 09:20:41 -07:00