You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "sshiv012 (via GitHub)" <gi...@apache.org> on 2026/10/21 23:30:56 UTC

[I] AI agent fails with 'Failed to process successful response' when LiteLLM sends compressed replies [texera]

sshiv012 opened a new issue, #9080:
URL: https://github.com/apache/texera/issues/9080

   ### What happened?
   
   On our Kubernetes deployment, the AI agent stopped working with the error **"Failed to process successful response"**. Every chat request failed, even though LiteLLM itself answered fine.
   
   **Why it happens:** the access-control-service sits between the agent and LiteLLM and passes chat requests through (`LiteLLMProxyResource`, `POST /api/chat/*`). It breaks compressed replies:
   
   1. The agent asks for a compressed reply (Bun's `fetch` sends `Accept-Encoding: gzip` by default), and the proxy passes that request on to LiteLLM.
   2. LiteLLM sends back a gzip-compressed reply.
   3. The proxy reads the compressed bytes as if they were text, which scrambles them.
   4. It then copies LiteLLM's headers back, so the agent is still told "this is gzip".
   5. The agent tries to unzip the scrambled bytes and fails.
   
   ```
   Before:  agent -> proxy -> LiteLLM (gzip reply) -> proxy reads it as text -> scrambled "gzip" -> agent fails
   After:   agent -> proxy -> LiteLLM (plain reply) -> proxy passes it through correctly -> agent works
   ```
   
   **Why only on Kubernetes:** the k8s chart uses the unpinned LiteLLM image `litellm/litellm:main-stable` (`bin/k8s/values.yaml`), so it picked up a newer LiteLLM build that compresses chat replies. The single-node setup pins `v1.83.10-stable`, so it isn't affected yet.
   
   `GET /api/models` (`LiteLLMModelsResource`) is written the same way: it reads the reply as text and copies all headers back. It doesn't forward the agent's `Accept-Encoding`, so it is less likely to break, but it should get the same fix.
   
   **Expected:** the proxy should not ask LiteLLM for compression, should pass the reply body through untouched, and should not copy headers that no longer match the body (`Content-Encoding`, `Content-Length`, `Transfer-Encoding`, `Connection`).
   
   ### How to reproduce?
   
   1. Deploy with the k8s chart (LiteLLM image `litellm/litellm:main-stable`) and enable Copilot.
   2. Open a workflow and send any message to the AI agent.
   3. The agent fails with "Failed to process successful response", and agent-service logs show a `ZlibError` while reading the reply.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   3ba45ee5a
   
   ### Relevant log output
   
   ```shell
   ZlibError ... Failed to process successful response
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] AI agent fails with 'Failed to process successful response' when LiteLLM sends compressed replies [texera]

Posted by "sshiv012 (via GitHub)" <gi...@apache.org>.
sshiv012 commented on issue #9080:
URL: https://github.com/apache/texera/issues/9080#issuecomment-6328909494

   /take
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] AI agent fails with 'Failed to process successful response' when LiteLLM sends compressed replies [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9080:
URL: https://github.com/apache/texera/issues/9080#issuecomment-6329851708

   <!-- texera:template-compliance -->
   👋 Thanks for opening this issue, @sshiv012!
   
   It looks like the issue description doesn't quite follow our template yet:
   
   - This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
   
   Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
   
   You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org