Skip to content

Commit b2bcd51

Browse files
committed
Revert "Playground: local experiments"
This reverts commit d1ca5ea.
1 parent d1ca5ea commit b2bcd51

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/// <reference path="../../ui/src/custom-elements.d.ts" />
1+
../../ui/src/custom-elements.d.ts
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/// <reference path="../../ui/src/custom-elements.d.ts" />
1+
../../ui/src/custom-elements.d.ts

packages/opencode/src/provider/provider.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ import { createOpenaiCompatible as createGitHubCopilotOpenAICompatible } from ".
2929
export namespace Provider {
3030
const log = Log.create({ service: "provider" })
3131

32-
function isGpt5OrLater(modelID: string): boolean {
33-
const match = /^gpt-(\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

Comments
 (0)