Failed to switch API configuration for the `VS Code LM API` provider
Description
Kilo Code v4.84.0 adds model switching to the VS Code LM API provider in the bottom main panel, but it raises a Failed to create API configuration error when switching models. And the displayed selected model is incorrect.
Provider Profile:
Switch Model:
Raise Error:
Kilo Code v4.84.1 still have this error.
Raw error message:
Error create new api configuration: {
"stack": "Error: Failed to save config: [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"string\",\n \"path\": [\n \"vsCodeLmModelSelector\"\n ],\n \"message\": \"Expected object, received string\"\n }\n]\n at t.saveConfig (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/config/ProviderSettingsManager.ts:327:10)\n at t.upsertProviderProfile (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/webview/ClineProvider.ts:1190:15)\n at Qvr (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/webview/webviewMessageHandler.ts:1681:5)",
"message": "Failed to save config: [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"string\",\n \"path\": [\n \"vsCodeLmModelSelector\"\n ],\n \"message\": \"Expected object, received string\"\n }\n]"
}
Formated error message:
{
"stack": "Error: Failed to save config: [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"string\",\n \"path\": [\n \"vsCodeLmModelSelector\"\n ],\n \"message\": \"Expected object, received string\"\n }\n]\n at t.saveConfig (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/config/ProviderSettingsManager.ts:327:10)\n at t.upsertProviderProfile (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/webview/ClineProvider.ts:1190:15)\n at Qvr (/Users/e/.vscode/extensions/kilocode.kilo-code-4.84.1/core/webview/webviewMessageHandler.ts:1681:5)",
"message": [
{
"code": "invalid_type",
"expected": "object",
"received": "string",
"path": [
"vsCodeLmModelSelector"
],
"message": "Expected object, received string"
}
]
}
Same issue. ~~It seems the only model it works with is 3.5 Sonnet.~~ All models throw the same error.
Can confirm happening wth VS code insider
Just to add on to this. First appeared in v4.84.0 Checked each version since and the same issue in all version. Last working version v4.83.1 v4.84.0 was the first version that brought switch model from the chat tab. 8.83.1, this was via the settings tab only.
This seems to be fixed with the latest version that was released yesterday.
This seems to be fixed with the latest version that was released yesterday.
For me, it's not fixed, but is now usable I am now able to change model from settings page, but the drop down at the bottom of the page still isn't working correctly. When selecting a model from settings, it's shows up as: "copilot - gpt-5-mini" That same model in drop down under the chat shows as: "Copilot / Gpt 5 Mini" The other models, that I still can't change to in the drop down show as: "Gpt 5 Mini"
This seems to be fixed with the latest version that was released yesterday.
For me, it's not fixed, but is now usable I am now able to change model from settings page, but the drop down at the bottom of the page still isn't working correctly. When selecting a model from settings, it's shows up as: "copilot - gpt-5-mini" That same model in drop down under the chat shows as: "Copilot / Gpt 5 Mini" The other models, that I still can't change to in the drop down show as: "Gpt 5 Mini"
Can confirm I am experiencing the same behaviour - can change the model via provider settings, but the chat dropdown still gives the same error.
VScode version: 1.104.0-insider Kilo code extension version: 4.91.2
Still getting this error