Skip to content

Conversation

zhichli
Copy link
Member

@zhichli zhichli commented Oct 3, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 19:32
@zhichli zhichli self-assigned this Oct 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link
Contributor

@Copilot Copilot AI left a 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.

@zhichli zhichli requested a review from Copilot October 6, 2025 23:47
Copy link
Contributor

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant