kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Azure OpenAI with gpt-5-codex - 400 "The chatCompletion operation does not work with the specified model, gpt-5-codex. "

Open murbanowicz opened this issue 1 year ago • 13 comments

Plugin Type

VSCode Extension

App Version

latest

Description

Trying to use Kilo with GPT 5 Codex deployed on Azure AI Foundry. After 404 with /chat/responses, I came to the "https://myairesource.cognitiveservices.azure.com/openai" base URL, but it throws the error from the title.

Reproduction steps

Deploy codex to Azure Try to use with kilo

Provider

Azure

Model

GPT 5 Code

System Information

No response

murbanowicz avatar Oct 19 '25 07:10 murbanowicz

Same issue I am using AI Foundry with gpt-5-codex codex. Also wierd when using AI Foundry with gpt-5 (normal) I must set the temperature to 1 (which is not good for coding tasks). Only thing I got working in Kilo Code + AI Foundry is gpt-5-chat

onlinegroeicoach avatar Oct 26 '25 17:10 onlinegroeicoach

Configured Kilo with gpt-5-chat deployment and specified Model="gpt-5-codex" Image

It pretends to be using gpt-5-codex: Image

But then I decided to test with non-existent Model="gpt-7", and realized it just hallucinates: Image

veton avatar Nov 02 '25 13:11 veton

yes same problem. its working only with gpt-5-chat and not codex

nusquama avatar Nov 03 '25 14:11 nusquama

Have you tried using the "OpenAI" (not "OpenAI compatible") provider with a custom base URL?

chrarnoldus avatar Nov 04 '25 23:11 chrarnoldus

In fact this works Image

Although I did not find a way to confidently say gpt-5-codex is used, not gpt-5 or gpt-5-chat.

veton avatar Nov 05 '25 07:11 veton

yes thanks

nusquama avatar Nov 05 '25 08:11 nusquama

Although I did not find a way to confidently say gpt-5-codex is used, not gpt-5 or gpt-5-chat.

Can you check your usage in Azure?

chrarnoldus avatar Nov 05 '25 08:11 chrarnoldus

The model that is really used is the model being mentioned in the custom base URL if it has gpt-5-chat in it then that is the used model.

onlinegroeicoach avatar Nov 06 '25 09:11 onlinegroeicoach

Codex model require other input JSON then chat models, so if Kilo can't figure out is a codex endpoint the wrong input JSON is being sent.

onlinegroeicoach avatar Nov 06 '25 09:11 onlinegroeicoach

I tried using a relay to call CodexCli's GPT5-Codex using ChatMock in KiloCode and found that its operation is quite different from regular models. It's not a back-and-forth conversation but rather a continuous processing mode: one response, multiple thinking/tool calls/output, think, call tool, output, think more, call tool, output more, seemingly forming a chain when used in ChatBox. This might make it unusable in KiloCode, as it keeps trying to use KiloCode's tools in the thought chain but fails to do so, and it also randomly triggers "task completed."

Image

PingGai avatar Nov 10 '25 02:11 PingGai

Configured Kilo with gpt-5-chat deployment and specified Model="gpt-5-codex" Image

It pretends to be using gpt-5-codex: Image

But then I decided to test with non-existent Model="gpt-7", and realized it just hallucinates: Image

Bro, please use the new openai/v1/responses at least, you are missing the initial value of it

Zochory avatar Nov 10 '25 07:11 Zochory

See #5330

YifeiDevs avatar Feb 08 '26 15:02 YifeiDevs

Thanks for taking the time to report this!

We've just released a new version of the Kilo Code extension. As part of this transition, we're automatically closing issues that were filed against the legacy extension.

If you're still experiencing this issue with the new extension, feel free to reopen this or open a fresh issue with updated details - we'd love to hear from you. We're actively working to make Kilo Code better, and your feedback is a big part of that.

Thanks again for being part of the community!

johnnyeric avatar Apr 02 '26 10:04 johnnyeric