Add extra headers support for custom LLM providers#739
Open
Duyi-Wang wants to merge 1 commit into
Open
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit c224c00)Here are some key observations to aid the review process:
|
Contributor
|
Persistent review updated to latest commit c224c00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
背景
部分 OpenAI-compatible 的 custom LLM provider 需要通过自定义 HTTP headers 完成接入。现有配置只支持 Base URL、API Key 和 Model,无法覆盖这类 custom 接入需求,也会影响模型拉取、provider 校验和实际调用链路的一致性。
变更
验证
git diff --checknpm run build -- --mode developmentPR Type
Enhancement, Tests
Description
Add extra headers support for custom LLM providers
Include validation and persistence of extra headers JSON
Propagate extra headers through provider config, request, and UI
Add test for extra headers and empty API key behavior
Diagram Walkthrough
File Walkthrough
6 files
Handle extra headers as special accountInclude extra headers in provider config and requestsPass extra headers when building LLM providerAdd persist, parse, and validate extra headersAdd builder method for extra headersShow extra headers field for custom provider1 files
Add test for extra headers in model fetch5 files
Add English i18n for extra headersAdd Japanese i18n for extra headersAdd Korean i18n for extra headersAdd Chinese i18n for extra headersAdd Traditional Chinese i18n for extra headers