Skip to content

Chat response generation fails with “Insufficient credits” error and prevents normal conversation flow #1432

@mdabdulkarimqa456-code

Description

@mdabdulkarimqa456-code

Description:**
A user tries to send a standard message in chat, but the assistant does not respond successfully. Instead, the conversation returns an error card and a retry option. The visible backend/provider-related error suggests that the configured model endpoint or API credential is not usable for inference because the connected account has no credits or the wrong account/org key is being used.

This is not just a provider error exposure issue; it also impacts core chat usability because the system does not gracefully recover, route to another valid model, or provide a cleaner actionable message.

Steps to Reproduce:**

Open the Chat page.
Select the current active assistant/model configuration.
Enter a normal prompt, for example: please tell me about yourself
Send the message.
Observe the response area.

Expected Result:**

The system should generate a valid AI response successfully.
If the selected model/provider is unavailable or misconfigured, the platform should either:
route the request to a valid configured model, or
fail over to a fallback model, or
show a clean user-friendly message without exposing raw provider/internal error details.
Chat should remain usable as a core conversation feature.

Actual Result:**

The response fails.
UI shows:
“I was unable to complete your request. Please try again.”
“Something went wrong”
“There was an error generating a response. Please try again.”
Detailed error exposed in UI:
“Uncaught Error: Insufficient credits. This account never purchased credits. Make sure your key is on the correct account or org...”
User cannot continue normal conversation with that configuration.

Image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions