Skip to content

Custom headers for OpenAPI compatible providers - #45673

Closed
aurabindo wants to merge 3 commits into
zed-industries:mainfrom
aurabindo:main
Closed

Custom headers for OpenAPI compatible providers#45673
aurabindo wants to merge 3 commits into
zed-industries:mainfrom
aurabindo:main

Conversation

@aurabindo

Copy link
Copy Markdown
Contributor

Related discussion: #42663

Release Notes:

  • Add custom header support in settings
  • Create a UI to manipulate custom headers in AI settings
  • Added a card based interface for custom headers
  • Moved the "Add header" button to top right instead of botton
image

Some enterprise instances dont use the standard "Authorization" header.
Custom headers are required in those cases to enable authentication. So
add them as an option for OpenAI compatible providers.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
ApiEndpointNotFound error does not print the provider name. Print it so
that the error message is  more helpful.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Enable modifying custom headers in AI settings from the UI

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Dec 25, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Dec 25, 2025
@schelhorn

schelhorn commented Feb 1, 2026

Copy link
Copy Markdown

Hi, any chance you folks could look at this again and make the final changes? Supporting custom API header indeed would be awesome for enterprise settings. Much appreciated!

@danilo-leal danilo-leal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @aurabindo, thanks for the PR and sorry for the late response here! In testing this out, I found some fixes we need to make before we're ready to merge (aside from the conflict this branch now has):

  1. The input tab order in the "Add LLM Provider" modal is wrong: tabbing from the "Header Name" input gets me to the model name input, as opposed to the "Header Value" input.
  2. We should also add the "Remove Header" button as part of the tab index
  3. We should make "Header Name" and "Header Value" the label for the corresponding inputs and add in the placeholder slot an example of content that can be inserted in those inputs
  4. After I hit "Save Provider" in the modal, I still see the input to add the API key, as well as the custom HTTP headers in the settings view of the agent panel. This feels wrong to me; I'd expect everything to be filled already (image below).
Screenshot 2026-02-16 at 12  57@2x

After we push these changes, we can fine-tune the UI more. Let me know if you're still interested in working on this, otherwise, I might either close it for now or work on it later time-permitting. Thank you!

@viniciusdof

Copy link
Copy Markdown

Hello!
Looks like this PR has been inactive for a while, but I was interested in the feature so I ended up implementing a similar version in my fork:
https://github.com/viniciusdof/zed

Would it be better to open a new PR with this, or should we wait to see if this one gets updated?

@benbrandt

Copy link
Copy Markdown
Member

Given the merge conflicts I think it is best to have a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants