Skip to content

Commit 7a57340

Browse files
committed
Merge branch 'dev' into all
2 parents c4ab3b7 + 1467876 commit 7a57340

5 files changed

Lines changed: 9 additions & 28 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@jeffreycao/copilot-api",
4-
"version": "1.7.3",
4+
"version": "1.8.0",
55
"description": "Turn GitHub Copilot into OpenAI/Anthropic API compatible server. Usable with Claude Code Or Codex Or Opencode!",
66
"keywords": [
77
"proxy",

src/lib/api-config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ export const getOpencodeVersion = () => {
141141
return OPENCODE_VERSION
142142
}
143143

144-
const OPENCODE_VERSION = "opencode/1.3.15"
144+
const OPENCODE_VERSION = "opencode/1.14.29"
145145
const OPENCODE_LLM_USER_AGENT =
146-
"opencode/1.3.15 ai-sdk/provider-utils/4.0.21 runtime/bun/1.3.11, opencode/1.3.15"
146+
"opencode/1.14.29 ai-sdk/provider-utils/4.0.23 runtime/bun/1.3.13, opencode/1.14.29"
147147

148-
const COPILOT_VERSION = "0.44.2"
148+
const COPILOT_VERSION = "0.46.0"
149149
const EDITOR_PLUGIN_VERSION = `copilot-chat/${COPILOT_VERSION}`
150150
const USER_AGENT = `GitHubCopilotChat/${COPILOT_VERSION}`
151151
const CLAUDE_AGENT_USER_AGENT =
152-
"vscode_claude_code/2.1.98 (external, sdk-ts, agent-sdk/0.2.98)"
152+
"vscode_claude_code/2.1.112 (external, sdk-ts, agent-sdk/0.2.112)"
153153

154154
const API_VERSION = "2025-10-01"
155155

src/services/copilot/create-messages.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,10 @@ const allowedAnthropicBetas = new Set([
3131
ADVANCED_TOOL_USE_BETA,
3232
])
3333

34-
const TOOL_SEARCH_SUPPORTED_MODELS = [
35-
"claude-sonnet-4.5",
36-
"claude-sonnet-4.6",
37-
"claude-opus-4.5",
38-
"claude-opus-4.6",
39-
] as const
40-
41-
const modelSupportsToolSearch = (modelId: string): boolean => {
42-
return TOOL_SEARCH_SUPPORTED_MODELS.some((prefix) =>
43-
modelId.toLowerCase().startsWith(prefix),
44-
)
45-
}
46-
4734
const buildAnthropicBetaHeader = (
4835
anthropicBetaHeader: string | undefined,
4936
thinking: AnthropicMessagesPayload["thinking"],
50-
model: string,
37+
_model: string,
5138
): string | undefined => {
5239
const isAdaptiveThinking = thinking?.type === "adaptive"
5340

@@ -60,13 +47,7 @@ const buildAnthropicBetaHeader = (
6047

6148
// in vscode copilot extension, advanced-tool-use is enabled by default
6249
// align header with vscode copilot extension
63-
64-
// will remove append ADVANCED_TOOL_USE_BETA in next github copilot extension version (>0.44.2)
65-
const copilotHeaderSet =
66-
modelSupportsToolSearch(model) ? [ADVANCED_TOOL_USE_BETA] : []
67-
const headerSet = new Set([...copilotHeaderSet, ...filteredBeta])
68-
const uniqueFilteredBetas = [...headerSet]
69-
50+
const uniqueFilteredBetas = [...filteredBeta]
7051
if (uniqueFilteredBetas.length > 0) {
7152
return uniqueFilteredBetas.join(",")
7253
}

src/services/get-vscode-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const FALLBACK = "1.116.0"
1+
const FALLBACK = "1.118.0"
22

33
export async function getVSCodeVersion() {
44
await Promise.resolve()

tests/api-config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test("prepareMessageProxyHeaders applies message proxy headers by default", () =
2929
expect(headers["x-interaction-type"]).toBe("messages-proxy")
3030
expect(headers["openai-intent"]).toBe("messages-proxy")
3131
expect(headers["user-agent"]).toBe(
32-
"vscode_claude_code/2.1.98 (external, sdk-ts, agent-sdk/0.2.98)",
32+
"vscode_claude_code/2.1.112 (external, sdk-ts, agent-sdk/0.2.112)",
3333
)
3434
expect(headers["x-request-id"]).toBeDefined()
3535
expect(headers["x-agent-task-id"]).toBe(headers["x-request-id"])

0 commit comments

Comments
 (0)