continuedev / continuedev/continue
OpenAI provider injects stream_options causing HTTP 400 on Databricks OpenAI-compatible serving endpoints
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I've tried finding an answer on the Continue docs site
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
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:
useResponsesApi: false
but the behavior did not change.
I also attempted configurations intended to disable streaming. However, the logs still show:
streamEnabled:true
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_optionsfor 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:
hello
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(...)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OpenAIApi.chatCompletionStream and follow the OpenAI2.openAIAdapterStream and OpenAI2.streamChat entry points shown in the stack trace. Reproduce the Databricks-compatible endpoint failure with the provided configuration and inspect the outgoing request for stream_options. Done means the endpoint accepts requests from Continue and displays the model response without the HTTP 400 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100