@@ -29,14 +29,6 @@ import { createOpenaiCompatible as createGitHubCopilotOpenAICompatible } from ".
2929export namespace Provider {
3030 const log = Log . create ( { service : "provider" } )
3131
32- function isGpt5OrLater ( modelID : string ) : boolean {
33- const match = / ^ g p t - ( \d + ) / . exec ( modelID )
34- if ( ! match ) {
35- return false
36- }
37- return Number ( match [ 1 ] ) >= 5
38- }
39-
4032 const BUNDLED_PROVIDERS : Record < string , ( options : any ) => SDK > = {
4133 "@ai-sdk/amazon-bedrock" : createAmazonBedrock ,
4234 "@ai-sdk/anthropic" : createAnthropic ,
@@ -99,41 +91,25 @@ export namespace Provider {
9991 options : { } ,
10092 }
10193 } ,
102- "github-copilot" : async ( input ) => {
94+ "github-copilot" : async ( ) => {
10395 return {
10496 autoload : false ,
10597 async getModel ( sdk : any , modelID : string , _options ?: Record < string , any > ) {
106- // GitHub Copilot can optionally route supported models through the Responses API.
107- // This enables settings like reasoningEffort/reasoningSummary for GPT-5.* models.
108- const useResponsesApi = Boolean ( input . options ?. useResponsesApi )
109-
11098 if ( modelID . includes ( "codex" ) ) {
11199 return sdk . responses ( modelID )
112100 }
113-
114- if ( useResponsesApi && isGpt5OrLater ( modelID ) ) {
115- return sdk . responses ( modelID )
116- }
117-
118101 return sdk . chat ( modelID )
119102 } ,
120103 options : { } ,
121104 }
122105 } ,
123- "github-copilot-enterprise" : async ( input ) => {
106+ "github-copilot-enterprise" : async ( ) => {
124107 return {
125108 autoload : false ,
126109 async getModel ( sdk : any , modelID : string , _options ?: Record < string , any > ) {
127- const useResponsesApi = Boolean ( input . options ?. useResponsesApi )
128-
129110 if ( modelID . includes ( "codex" ) ) {
130111 return sdk . responses ( modelID )
131112 }
132-
133- if ( useResponsesApi && isGpt5OrLater ( modelID ) ) {
134- return sdk . responses ( modelID )
135- }
136-
137113 return sdk . chat ( modelID )
138114 } ,
139115 options : { } ,
0 commit comments