Skip to content

Commit 9b60099

Browse files
committed
fix: use createServer over bun serve
1 parent 188a111 commit 9b60099

File tree

7 files changed

+246
-190
lines changed

7 files changed

+246
-190
lines changed

bun.lock

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 108 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"access": "public"
5252
},
5353
"dependencies": {
54-
"@ai-sdk/openai-compatible": "2.0.37",
5554
"@opencode-ai/plugin": "^1.3.4",
5655
"@bufbuild/protobuf": "^2.0.0",
5756
"zod": "^3.24.0"

src/plugin/cursor-auth-plugin.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
buildDisabledProviderConfig,
2525
type ProviderWithModels,
2626
setProviderModels,
27-
stripAuthorizationHeader,
2827
} from "../provider/models";
2928
import { startProxy, stopProxy } from "../proxy";
3029

@@ -115,9 +114,6 @@ export const server: Plugin = async (
115114
return {
116115
baseURL: `http://localhost:${port}/v1`,
117116
apiKey: "cursor-proxy",
118-
async fetch(requestInput: RequestInfo | URL, init?: RequestInit) {
119-
return fetch(requestInput, stripAuthorizationHeader(init));
120-
},
121117
};
122118
} catch (error) {
123119
const message =

src/provider/models.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { CURSOR_PROVIDER_ID } from "../constants";
22
import type { CursorModel } from "../models";
33
import { estimateModelCost } from "./model-cost";
44

5-
const SDK_WRAPPER_PATH = new URL("../sdk-wrapper.js", import.meta.url).href;
6-
75
export interface ProviderWithModels {
86
models?: Record<string, unknown>;
97
}
@@ -29,7 +27,7 @@ export function buildCursorProviderModels(
2927
api: {
3028
id: model.id,
3129
url: `http://localhost:${port}/v1`,
32-
npm: SDK_WRAPPER_PATH,
30+
npm: "@ai-sdk/openai-compatible",
3331
},
3432
name: model.name,
3533
capabilities: {

0 commit comments

Comments
 (0)