Skip to content

IntelliJ: duplicate authorization header sent for OpenAI models, causing authentication failure #7047

@tim-sh

Description

@tim-sh

Before submitting your bug report

Relevant environment info

- OS: Linux
- Continue version: 1.0.30
- IDE version: IntelliJ IDEA Community 2025.1
- Model: o4-mini (self-hosted)
- config:
models:
  - name: my o4-mini
    provider: openai
    model: o4-mini
    apiBase: https://acme.com/some/path
    requestOptions:
      headers:
        Authorization: Bearer eyYo…
        my-hdr: bar

Description

When trying to use a self-hosted openai model, the server error response indicates that Continue doesn't send the Authorization header as it should.
This does not happen with a self-hosted gemini model, where our server expects the same token and successfully receives it (indicated by absence of error).

Investigating with a proxy, I see this duplication in the raw headers: ['authorization', 'Bearer', 'authorization', 'Bearer [myToken]']. Now the first value, 'Bearer' (token missing), seems to win – at least that's what Node.js' http module makes it into.

Though I can't see the headers received by our server when disabling the proxy, the finding suggests that Continue sends a duplicate Authorization header in my case.

The token has this structure, I would say:
[a-zA-Z0-9]{250}\.[a-zA-Z0-9]{6590}\.[a-zA-Z0-9_-]{342}

Metadata

Metadata

Assignees

Labels

area:configurationRelates to configuration optionside:jetbrainsRelates specifically to JetBrains extensionkind:bugIndicates an unexpected problem or unintended behavioros:linuxHappening specifically on Linux

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions