Skip to content

Bug: Miss content-type header in gemini chat completion stream #8825

@defi-failure

Description

@defi-failure

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: 1.2.10
- IDE version: vscode 1.106.2 arm64 
- Model:
- config:
  

  
  OR link to agent in Continue hub:

Description

The Content-Type header isn’t explicitly set to application/json here, so it will fall back to the default
text/plain;charset=UTF-8, which may cause some Gemini-compatible providers to reject the request.

const response = await this.fetch(apiURL, {
method: "POST",
body: JSON.stringify(body),
signal,
});

To reproduce

  1. add a gemini model in config
  2. trigger chat request
  3. check the request header

Log output

Metadata

Metadata

Assignees

Labels

area:chatRelates to chat interfaceide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:macHappening specifically on Mac

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions