Upgrade Copilot SDK to 1.0.5 and implement direct HTTP transport#2683
Merged
Conversation
Update @github/copilot-sdk from 0.2.0/0.3.0 to 1.0.5 and implement direct-CAPI HTTP transport for model requests. This replaces the SDK's session-based API with direct HTTP calls to the session's provider endpoint, reducing latency and SDK overhead. Key changes: - Add copilotDirectTransport.ts with HTTP-based chat model implementation - Refactor copilotModels.ts to use endpoint provider pattern with caching - Create CopilotEndpointProvider for endpoint acquisition and refresh management - Update RuntimeConnection API usage for SDK 1.0.5 compatibility - Add comprehensive tests for direct transport including error recovery
robgruen
approved these changes
Jul 15, 2026
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.
This pull request introduces significant improvements to the Copilot AI client by adding a new direct transport layer, updating dependencies, and enhancing test flexibility. The main focus is enabling direct HTTP requests to Copilot endpoints, improving compatibility, and ensuring robust endpoint management.
Key changes include:
Copilot Direct Transport Integration
copilotDirectTransport.tsthat implements a direct HTTP transport for Copilot, supporting endpoint acquisition, credential management, streaming, and vision input. This improves reliability and matches Azure/OpenAI HTTP behavior for retries, timeouts, and throttling.Dependency Updates
@github/copilot-sdkto version1.0.5in bothts/examples/workflow/engine/package.jsonandts/packages/aiclient/package.jsonfor improved Copilot SDK compatibility and features. [1] [2]