danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
18.12k stars 3.03k forks source link

[Bug]: Bedrock: Unhandled error type Iterator value I is not an entry object #4006

Closed dirkpetersen closed 1 month ago

dirkpetersen commented 1 month ago

What happened?

When I switch from OpenAI after entering something to bedrock and then enter something I am getting the above error. if I set ENDPOINTS=bedrock,openAI it works only as long as I stick with bedrock, as soon as I switch to openai and back to bedrock the error occurs. To clear the error i start a new chat or create a new private window to reset the browser and log in again. It then works as long as I stick with bedrock, no restart of services required

Steps to Reproduce

What browsers are you seeing the problem on?

Firefox

Relevant log output

Librechat-API

2024-09-11 23:09:02 info: [Optional] Redis not initialized. Note: Redis support is experimental.
2024-09-11 23:09:04 info: Connected to MongoDB
2024-09-11 23:09:05 info: Custom config file loaded:
2024-09-11 23:09:05 info: {
  "version": "1.1.5",
  "cache": true,
  "interface": {
    "privacyPolicy": {
      "externalUrl": "https://librechat.ai/privacy-policy",
      "openNewTab": true
    },
    "termsOfService": {
      "externalUrl": "https://librechat.ai/tos",
      "openNewTab": true,
      "modalAcceptance": true,
      "modalTitle": "Terms of Service for LibreChat",
      "modalContent": "# Terms and Conditions for LibreChat\n\n*Effective Date: February 18, 2024*\n\nWelcome to LibreChat, the informational website for the open-source AI chat platform, available at https://librechat.ai. These Terms of Service (\"Terms\") govern your use of our website and the services we offer. By accessing or using the Website, you agree to be bound by these Terms and our Privacy Policy, accessible at https://librechat.ai//privacy.\n\n## 1. Ownership\n\nUpon purchasing a package from LibreChat, you are granted the right to download and use the code for accessing an admin panel for LibreChat. While you own the downloaded code, you are expressly prohibited from reselling, redistributing, or otherwise transferring the code to third parties without explicit permission from LibreChat.\n\n## 2. User Data\n\nWe collect personal data, such as your name, email address, and payment information, as described in our Privacy Policy. This information is collected to provide and improve our services, process transactions, and communicate with you.\n\n## 3. Non-Personal Data Collection\n\nThe Website uses cookies to enhance user experience, analyze site usage, and facilitate certain functionalities. By using the Website, you consent to the use of cookies in accordance with our Privacy Policy.\n\n## 4. Use of the Website\n\nYou agree to use the Website only for lawful purposes and in a manner that does not infringe the rights of, restrict, or inhibit anyone else's use and enjoyment of the Website. Prohibited behavior includes harassing or causing distress or inconvenience to any person, transmitting obscene or offensive content, or disrupting the normal flow of dialogue within the Website.\n\n## 5. Governing Law\n\nThese Terms shall be governed by and construed in accordance with the laws of the United States, without giving effect to any principles of conflicts of law.\n\n## 6. Changes to the Terms\n\nWe reserve the right to modify these Terms at any time. We will notify users of any changes by email. Your continued use of the Website after such changes have been notified will constitute your consent to such changes.\n\n## 7. Contact Information\n\nIf you have any questions about these Terms, please contact us at contact@librechat.ai.\n\nBy using the Website, you acknowledge that you have read these Terms of Service and agree to be bound by them.\n"
    }
  },
  "registration": {
    "socialLogins": [
      "github",
      "google",
      "discord",
      "openid",
      "facebook"
    ]
  },
  "endpoints": {
    "bedrock": {
      "availableRegions": [
        "us-west-2"
      ],
      "streamRate": 55,
      "titleModel": "anthropic.claude-3-5-sonnet-20240620-v1:0"
    }
  }
}
2024-09-11 23:09:05 info: RAG API is running and reachable at http://rag_api:8000.
2024-09-11 23:09:05 info: No changes needed for 'USER' role permissions
2024-09-11 23:09:05 info:
Outdated Config version: 1.1.5
Latest version: 1.1.7

      Check out the Config changelogs for the latest options and features added.

      https://www.librechat.ai/changelog

2024-09-11 23:09:05 info: Server listening on all interfaces at port 3080. Use http://localhost:3080 to access it
2024-09-11 23:12:53 error: [api/server/controllers/agents/client.js #sendCompletion] Unhandled error type Iterator value I is not an entry object
2024-09-11 23:12:53 error: [handleAbortError] AI response error; aborting request: Iterator value I is not an entry object

Librechat-NGINX

2024/09/11 23:09:01 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/09/11 23:09:01 [notice] 1#1: start worker processes
2024/09/11 23:09:01 [notice] 1#1: start worker process 29
2024/09/11 23:09:01 [notice] 1#1: start worker process 30
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "POST /api/auth/refresh HTTP/1.0" 200 583 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/config HTTP/1.0" 200 1579 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/config HTTP/1.0" 200 1579 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/endpoints HTTP/1.0" 200 731 "https://host.domain.edu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/endpoints HTTP/1.0" 200 731 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /health HTTP/1.0" 200 2 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/balance HTTP/1.0" 200 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/endpoints/config/override HTTP/1.0" 200 5 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/convos?pageNumber=1 HTTP/1.0" 200 901 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/roles/user HTTP/1.0" 200 225 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/user HTTP/1.0" 200 339 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/search/enable HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/files HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/user/terms HTTP/1.0" 200 23 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/convos?pageNumber=1&isArchived=true HTTP/1.0" 200 59 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/tags HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/plugins HTTP/1.0" 200 2949 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /assets/Inter-Bold.woff2 HTTP/1.0" 200 111040 "https://host.domain.edu/assets/index.Czcirqir.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /assets/Inter-Italic.woff2 HTTP/1.0" 200 114576 "https://host.domain.edu/assets/index.Czcirqir.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/models HTTP/1.0" 200 651 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /assets/apple-touch-icon-180x180.png HTTP/1.0" 200 11631 "https://host.domain.edu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/presets HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /workbox-464e6d59.js HTTP/1.0" 200 15074 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/prompts/all HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /sw.js HTTP/1.0" 200 3777 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/keys?name=bedrock HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:40 +0000] "GET /api/files/config HTTP/1.0" 200 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:44 +0000] "POST /api/user/terms/accept HTTP/1.0" 200 41 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:47 +0000] "GET /api/keys?name=openAI HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:47 +0000] "GET /api/keys?name=assistants HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:47 +0000] "GET /api/keys?name=anthropic HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:47 +0000] "GET /api/keys?name=bingAI HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:47 +0000] "GET /api/keys?name=google HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:09:51 +0000] "GET /api/keys?name=openAI HTTP/1.0" 304 0 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:10:13 +0000] "GET /api/messages/87c2da01-f81b-458d-bb1c-70e34c43f1b0 HTTP/1.0" 200 471 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:10:28 +0000] "POST /api/ask/openAI HTTP/1.0" 200 631869 "https://host.domain.edu/c/new" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:10:31 +0000] "POST /api/convos/gen_title HTTP/1.0" 200 64 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:11:55 +0000] "GET /c/87c2da01-f81b-458d-bb1c-70e34c43f1b0 HTTP/1.0" 200 1418 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:11:57 +0000] "POST /api/ask/openAI HTTP/1.0" 200 153254 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:12:05 +0000] "GET /api/keys?name=bedrock HTTP/1.0" 200 18 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:12:53 +0000] "GET /c/87c2da01-f81b-458d-bb1c-70e34c43f1b0 HTTP/1.0" 304 0 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:12:53 +0000] "POST /api/bedrock/chat HTTP/1.0" 200 689 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"
172.18.0.1 - - [11/Sep/2024:23:12:54 +0000] "POST /api/bedrock/chat/abort HTTP/1.0" 204 0 "https://host.domain.edu/c/87c2da01-f81b-458d-bb1c-70e34c43f1b0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "-"


### Screenshots

![image](https://github.com/user-attachments/assets/62f3ae7c-2fad-4734-b334-7ad84755ebd0)

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
danny-avila commented 1 month ago

Thanks, I can reproduce this and will fix it tomorrow.