lamaIndex provider fails with INTERNAL_ERROR / Error in input stream for custom Agent URL despite valid 200 SSE responses
When using Tambo Cloud Agent Provider = llamaindex with a custom Agent URL, requests consistently fail with one of the following errors:
{"message":"An internal error occurred","code":"INTERNAL_ERROR"}
or
{"message":"Error in input stream"}
The custom Agent endpoint is reachable and responds with HTTP 200 Upstream LLM endpoint also returns valid streaming responses Streaming works correctly when tested independently (outside Tambo)
What We Tested
We tried multiple response formats to match possible expectations:
Raw SSE passthrough (standard data: ... events) OpenAI-style streaming (chat.completion.chunk)
Minimal SSE format
data: {"content":"..."} data: [DONE]
Non-stream JSON fallback
{ "response": "..." } { "text": "..." } { "message": "..." }
Could you please clarify the exact contract required for the LlamaIndex provider when using a custom Agent URL?
Specifically:
Required Request Format Expected request body schema? Required headers? Any provider-specific fields?
Required Streaming (SSE) Format Exact expected event structure? Should responses be: data: { ... } only? Wrapped in a specific envelope? Is OpenAI-style streaming supported?
Stream Termination Should the stream end with: [DONE] A named event (e.g. event: end) Connection close only?
Non-Streaming Support Is non-stream JSON response supported for llamaindex provider? If yes, what is the required schema?
Minimal Working Example
A minimal request + response pair that works with:
provider = llamaindex custom Agent URL
Source: tambo-ai/tambo