Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
22.35k stars 2.08k forks source link

Streaming mode does sent "Accept" header "application/json" #2307

Open MarvinKlar opened 1 week ago

MarvinKlar commented 1 week ago

Issue

When Aider does sent a chat-completion request, it sends the Accept header with the value application/json, no matter if stream is set to false or true. It should actually be text/event-stream for stream=true.

Version and model info

Aider: 0.62.1 Model: any Prompt/Request: any

paul-gauthier commented 1 week ago

Thanks for trying aider and filing this issue.

Sorry, what makes you concerned about this? Are you experiencing some specific problem?

MarvinKlar commented 1 week ago

I am currently trying Aider with an custom LLM proxy, which does not support sending a stream with Content-Type: application/json. When using streaming, it requires/sends Content-Type: text/event-steam.

paul-gauthier commented 1 week ago

This sounds like something you may need to work out with your custom proxy.

Aider uses litellm to connect to almost any LLM api. You can also check their docs.

MarvinKlar commented 1 week ago

Can you verify that LiteLLM is causing the error or does Aider manipulate the request in any way?