Before submitting your bug report
Relevant environment info
- OS: Windows 11
- Continue version: v2.0.0
- IDE version: VS Code 1.127.0
- Provider: OpenAI
- Backend: Databricks OpenAI-compatible Serving Endpoint
- config:
: Main Config
version: 1.0.0
schema: v1
models:
- name: Databricks
provider: openai
model: <serving-endpoint-name>
apiBase: https://<workspace>/serving-endpoints
apiKey: <token>
useResponsesApi: false
Description
Description
Continue cannot communicate with a Databricks OpenAI-compatible Serving Endpoint because the request appears to contain the unsupported field stream_options.
The endpoint works correctly when called directly via REST API (PowerShell), returning a valid OpenAI-compatible chat completion.
However, requests originating from Continue fail with:
400 Bad request: json: unknown field "stream_options"
Based on debugging, the issue appears to be caused by Continue's OpenAI adapter automatically sending:
{
"stream_options": {
"include_usage": true
}
}
Databricks strictly validates request schemas and rejects unknown fields.
Additional debugging
I attempted:
but the behavior did not change.
I also attempted configurations intended to disable streaming. However, the logs still show:
and Continue continues to make streaming requests.
I found a similar issue in another OpenAI-compatible client where stream_options was automatically injected into requests sent to Databricks AI Gateway and caused the same HTTP 400 error.
Possible root cause
It appears that Continue's OpenAI adapter always performs streaming requests and automatically injects:
"stream_options": {
"include_usage": true
}
Some OpenAI-compatible backends (including Databricks Serving Endpoints) reject this field and return HTTP 400.
Would it be possible to:
- Stop sending
stream_options for generic OpenAI-compatible providers,
- Add a configuration option to disable
stream_options,
- Or allow streaming to be fully disabled for providers that do not support this parameter?
To reproduce
- Configure an OpenAI-compatible Databricks Serving Endpoint.
- Verify the endpoint works using a direct REST call.
- Configure Continue with:
provider: openai
apiBase: https://<workspace>/serving-endpoints
model: <serving-endpoint-name>
- Open Continue Chat.
- Send a simple prompt such as:
Expected behavior
Continue should successfully call the OpenAI-compatible endpoint and display the model response.
Actual behavior
Continue returns:
400 Bad request: json: unknown field "stream_options"
and no response is displayed.
Validation already performed
The same endpoint works successfully outside of Continue.
Example PowerShell test:
Invoke-RestMethod `
-Uri "https://<workspace>/serving-endpoints/chat/completions" `
-Method POST `
-Headers @{
Authorization="Bearer <redacted>"
"Content-Type"="application/json"
} `
-Body $body
Result:
object : chat.completion
choices: ...
This confirms:
- Authentication is working
- Endpoint is reachable
- Model configuration is valid
- OpenAI-compatible API is functioning correctly
The failure only occurs when requests originate from Continue.
Log output
## Relevant logs
Continue log:
[@continuedev] error: 400 Bad request: json: unknown field "stream_options"
{
"context":"llm_stream_chat",
"model":"<serving-endpoint-name>",
"provider":"openai",
"useOpenAIAdapter":true,
"streamEnabled":true,
"templateMessages":false
}
Stack trace:
Error: 400 Bad request: json: unknown field "stream_options"
at OpenAIApi.chatCompletionStream(...)
at OpenAI2.openAIAdapterStream(...)
at OpenAI2.streamChat(...)
Before submitting your bug report
Relevant environment info
Description
Description
Continue cannot communicate with a Databricks OpenAI-compatible Serving Endpoint because the request appears to contain the unsupported field
stream_options.The endpoint works correctly when called directly via REST API (PowerShell), returning a valid OpenAI-compatible chat completion.
However, requests originating from Continue fail with:
Based on debugging, the issue appears to be caused by Continue's OpenAI adapter automatically sending:
{ "stream_options": { "include_usage": true } }Databricks strictly validates request schemas and rejects unknown fields.
Additional debugging
I attempted:
but the behavior did not change.
I also attempted configurations intended to disable streaming. However, the logs still show:
and Continue continues to make streaming requests.
I found a similar issue in another OpenAI-compatible client where
stream_optionswas automatically injected into requests sent to Databricks AI Gateway and caused the same HTTP 400 error.Possible root cause
It appears that Continue's OpenAI adapter always performs streaming requests and automatically injects:
Some OpenAI-compatible backends (including Databricks Serving Endpoints) reject this field and return HTTP 400.
Would it be possible to:
stream_optionsfor generic OpenAI-compatible providers,stream_options,To reproduce
Expected behavior
Continue should successfully call the OpenAI-compatible endpoint and display the model response.
Actual behavior
Continue returns:
and no response is displayed.
Validation already performed
The same endpoint works successfully outside of Continue.
Example PowerShell test:
Result:
This confirms:
The failure only occurs when requests originate from Continue.
Log output