shipfeedAI news, curated daily

00:16:29 CET
24 AUG00:16:29shipfeed
pull to refreshlast sync
Just in — 30 new
§ langchain · storyline

Marks errors as retryable to prevent wasted API calls

LangChain updates core error handling to mark errors as retryable or non-retryable, preventing wasted API calls.

Aug 14 · · primary fetch1 sourceupdated Aug 14 ·

Patch Changes #11369 `d6ad973` Thanks @hntrl! - fix(langchain): use unified endpoint for gateway #11342 `3b0e4c4` Thanks @thushanth-bengre-langchain! - feat(core): mark errors as retryable or not, and stop retrying the ones that aren't Retry middleware retried every failure up to `maxRetries`, including deterministic ones like a bad API key or an unknown model. Retries also nest, so a single such failure could cost dozens of API calls. `@langchain/core/errors` adds `stampRetryable(error, retryable)` and `getRetryable(error)`. Marking an error leaves its class and shape untouched, so a provider SDK error can be classified without breaking `instanceof`.

`getRetryable` returns `undefined` for errors nobody classified, and both are exported so tool authors can mark their own failures. `modelRetryMiddleware` and `toolRetryMiddleware` now respect the mark by default, and retries stop as soon as one is found rather than each layer spending its own budget. Aborted calls, context overflow, and oversized payloads are marked non-retryable out of the box. Models accept a per-call `maxRetries` so a surrounding retry loop can take over. Behavior change: errors marked non-retryable now fail on…

read full article on github.com
§ sources5 publications · timeline below
  1. github.comLangChain (JS) — langchain v1.5.9primary
  2. github.comLangChain (JS) — google v0.2.2
  3. github.comLangChain (JS) — fireworks v0.2.8
  4. github.comLangChain (JS) — core v1.2.8
  5. github.comLangChain (JS) — openai v1.5.8

§ how this story moved

  1. primaryLangChain (JS) — Releases publishes the launch post.
  2. LangChain (JS) — Releases picks up coverage.
  3. LangChain (JS) — Releases picks up coverage.
  4. LangChain (JS) — Releases picks up coverage.
  5. LangChain (JS) — Releases picks up coverage.