eca icon indicating copy to clipboard operation
eca copied to clipboard

Make parallel_tool_calls parameter optional for Azure OpenAI compatibility

Open ikappaki opened this issue 1 year ago • 8 comments

Hi,

eca currently always includes the parallel_tool_calls parameter in chat completion requests. Azure OpenAI endpoints do not support this parameter and return a 400 error when it is present. See related Azure bug report: https://github.com/Azure/azure-rest-api-specs/issues/29545.

To ensure compatibility with Azure deployments, could you please consider making this parameter optional or add a configuration option to disable it when using endpoints that do not support it.

Expected Behavior: eca should omit parallel_tool_calls when the endpoint does not support it, allowing successful requests to Azure OpenAI.

thanks

ikappaki avatar Oct 23 '25 06:10 ikappaki

Hey @ikappaki , the nice thing about ECA is that you can override any payload sent to model, including that one, something like this should do:

{
    "providers": {
        "azure": {
            ...
            "models": {
                "gpt-5": {
                    "extraPayload": {
                        "parallel_tool_calls": false
                    }
                }
            }
        }
    }
}

ericdallo avatar Oct 23 '25 13:10 ericdallo

Sorry, I wasn’t clear. It’s the presence of this key that causes the API to fail, not its value. The API fails whether the key is set to true or false.

ikappaki avatar Oct 23 '25 16:10 ikappaki

Hum, that's weird, I believe we can assoc that field only if its truth

ericdallo avatar Oct 23 '25 17:10 ericdallo

Done in 0.71.3!

ericdallo avatar Oct 23 '25 17:10 ericdallo

Thanks @ericdallo. Unfortunately, this didn’t solve the problem and the value is still being sent. I believe this flag is always set beforehand by https://github.com/editor-code-assistant/eca/blob/96c50be45342ae39df93b881b97f524631ea948e/src/eca/llm_providers/openai.clj#L113?

ikappaki avatar Oct 24 '25 17:10 ikappaki

oh my bad, I changed only for openai-chat not openai-responses which is what azure uses

ericdallo avatar Oct 24 '25 17:10 ericdallo

@ikappaki done!

ericdallo avatar Oct 24 '25 17:10 ericdallo

Thanks @ericdallo, this is working now!

ikappaki avatar Oct 27 '25 20:10 ikappaki