Skip to content

Autocomplete Codestral BYOK authorization failure #8975

@sunarowicz

Description

@sunarowicz

Description

I followed the guide https://kilo.ai/docs/code-with-ai/features/autocomplete/mistral-setup to use BYOK Codestral API key for autocomplete. But when I set the Codestral key at BYOK page in Kilo platform and use the button to check if it is working, I get the key authorization failure warning. I get similar authorization failure warning in both vscode and VSCodium editor when autocomplete is triggered.

While the Codestral key authorization fails when set as BYOK, it works fine if used in test API call like this:

curl -X POST "https://codestral.mistral.ai/v1/fim/completions" \
  -H "Authorization: Bearer <CODESTRAL_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/codestral-2508",
    "prompt": "def fibonacci(n):\n    if n <= 1:\n        return n\n    ",
    "suffix": "\n\nprint(fibonacci(10))",
    "max_tokens": 200,
    "stream": false
  }'

BTW, if I set the standard La Plateforme key as Codestral BYOK, the authorization test passes, but autocomplete doesn't work with this key.

Plugins

No response

Kilo version

7.2.0

Steps to reproduce

  1. Set Codestral (not standard La Plateforme ) API key at BYOK page in Kilo platform.
  2. Test the key using the button on the same page.
  3. Key authorization fails (autocomplete in vscode fails too).

Please note, that standard La Plateforme key (if used instead of Codestral key) authorization passes.

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions