eca
eca copied to clipboard
Cannot get Mistral to work because of `max_completion_tokens` being provided
This was supposedly reported in #231 and fixed since, but I cannot get mistral to work with ECA in Emacs.
I'm using the following config
{
"providers" : {
"mistral" : {
"api" : "openai-chat",
"url" : "https://api.mistral.ai/v1",
"key" : "[REDACTED]",
"max_completion_tokens": null
}
},
"$schema" : "https://eca.dev/config.json"
}
which is properly shown with /config:
"mistral"
{:api "openai-chat",
:url "https://api.mistral.ai/v1",
:key "[REDACTED]",
:max_completion_tokens nil}}
but I still get
LLM response status: 422 body: {"object":"error","message":{"detail":[{"type":"extra_forbidden","loc":["body","max_completion_tokens"],"msg":"Extra inputs are not permitted","input":32000}]},"type":"invalid_request_error","param":null,"code":null}
Shouldn't this configuration remove max_completion_tokens from the request during the deep-merge?
I'm using ECA version 0.101.1 according to /doctor.
@samueltardieu try something like this:
"mistral" : {
"api" : "openai-chat",
"url" : "https://api.mistral.ai/v1",
"key" : "[REDACTED]",
"models": {
"foo": {
"extraPayload": {
"max_completion_tokens": null
}
}
}
}
Closing this as I believe it should work, LMK otherwise