eca icon indicating copy to clipboard operation
eca copied to clipboard

ECA sends null JSON items to Mistral models

Open mz-pdm opened this issue 1 month ago • 4 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug

When I send prompts in an Emacs ECA session to a Mistral model, I get the error OpenAI response status: 400 body: {"object":"error","message":"input: Value error, Input items of type None are not supported.","type":"invalid_request_error","param":null,"code":"3051","raw_status_code":400}.

This is because ECA sends null items in its JSON input (see the attached files for examples; I replaced some ids there with ... to avoid posting possibly sensitive information). It happens at least with mistral-small (when sending the first prompt already) and mistral-large-4 (when sending a followup prompt in the same session) models.

eca-mistral-small.json eca-mistral-large-4.json

To Reproduce

Steps to reproduce the behavior:

  1. Run Emacs.
  2. Open let's say eca-emacs/Eask file and run `M-x eca' there.
  3. Select mistral-small model.
  4. Run prompt "what is the package version?".
  5. You should get the error.

Expected behavior

ECA sends valid JSON inputs.

Doctor

Paste the relevant parts of /doctor command from chat if applicable:

ECA version: 0.169.0

Server cmd: /home/pdm/.emacs.d/eca/eca server

Workspaces: /home/pdm/git/github.com/editor-code-assistant/eca-emacs

Default model: mistral/mistral-large-4 (API key (...))

Logged providers: mistral: API key (...)

Relevant env vars:

Credential files: None found

mz-pdm avatar Oct 30 '26 19:10 mz-pdm

@mz-pdm hey, should be fixed in the latest release. Can you confirm? Thanks.

zikajk avatar Nov 03 '26 13:11 zikajk

Hi, I still get the same errors with ECA 0.170.0.

mz-pdm avatar Nov 04 '26 11:11 mz-pdm

@mz-pdm Are you using openai-chat as API? openai (responses) API is not compatible with Mistral and I am not sure it is worth doing changes there. edit: Yes, it looks like you use responses api. I think there is 0 reasons to use it. So after you switch to openai-chat then it should be fine.

zikajk avatar Nov 04 '26 20:11 zikajk

Indeed, I was using responses API (perhaps copied from older docs), after updating the configuration from the current docs, it works. Thanks!

mz-pdm avatar Nov 04 '26 21:11 mz-pdm