-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add custom requestHeaders
support for custom OAI and Azure models in BYOK
#1231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…zhichli/customheaders4byok
…zhichli/customheaders4byok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for custom HTTP headers in BYOK (Bring Your Own Key) configurations for both Azure and custom OpenAI models. Users can now specify additional request headers that will be sent with API requests to their custom model endpoints.
- Extends the model configuration interfaces to include optional
requestHeaders
field - Implements header sanitization logic to prevent overriding reserved system headers
- Updates the OpenAI endpoint to merge custom headers with default request headers
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/platform/endpoint/common/endpointProvider.ts | Adds requestHeaders field to IChatModelInformation interface |
src/platform/configuration/common/configurationService.ts | Updates CustomOAIModels type definition to include requestHeaders |
src/extension/byok/vscode-node/customOAIProvider.ts | Integrates requestHeaders throughout the custom OAI provider implementation |
src/extension/byok/vscode-node/customOAIModelConfigurator.ts | Adds requestHeaders to the ModelConfig interface |
src/extension/byok/node/openAIEndpoint.ts | Implements header sanitization and merging logic for custom headers |
src/extension/byok/common/byokProvider.ts | Updates BYOK interfaces and resolveModelInfo to handle custom headers |
package.json | Adds schema definitions for the new requestHeaders configuration options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ode-copilot-chat into zhichli/customheaders4byok
No description provided.