[PR #1113] [MERGED] Handle Anthropic streamable errors #3588

Closed
opened 2026-02-22 18:34:05 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1113
Author: @timothycarambat
Created: 4/16/2024
Status: Merged
Merged: 4/16/2024
Merged by: @timothycarambat

Base: masterHead: 1046-anthropic-unhandled-error


📝 Commits (1)

  • 950b862 Handle Anthropic streamable errors

📊 Changes

2 files changed (+41 additions, -9 deletions)

View changed files

📝 server/utils/AiProviders/anthropic/index.js (+23 -1)
📝 server/utils/chats/stream.js (+18 -8)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #1046

What is in this change?

Handle Anthropic streaming errors gracefully

Additional Information

Do not save or report a chunk if the text response from an LLM was empty ""

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/1113 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 4/16/2024 **Status:** ✅ Merged **Merged:** 4/16/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `1046-anthropic-unhandled-error` --- ### 📝 Commits (1) - [`950b862`](https://github.com/Mintplex-Labs/anything-llm/commit/950b862ec5dcc7c003542438397653a7c0492071) Handle Anthropic streamable errors ### 📊 Changes **2 files changed** (+41 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/anthropic/index.js` (+23 -1) 📝 `server/utils/chats/stream.js` (+18 -8) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #1046 ### What is in this change? Handle Anthropic streaming errors gracefully ### Additional Information Do not save or report a chunk if the text response from an LLM was empty `""` ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [ ] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:05 -05:00
yindo closed this issue 2026-02-22 18:34:05 -05:00
yindo changed title from [PR #1113] Handle Anthropic streamable errors to [PR #1113] [MERGED] Handle Anthropic streamable errors 2026-06-05 15:14:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3588