Skip to content

Commit f5dab60

Browse files
la14-1spawn-botclaude
authored andcommitted
fix(cursor): update proxy model list to current models (#3105)
Replace outdated models (Claude Sonnet 4, GPT-4o) with current ones: - Claude Sonnet 4.6 (default), Claude Haiku 4.5 - GPT-4.1 - Gemini 2.5 Pro, Gemini 2.5 Flash Co-authored-by: spawn-bot <spawn-bot@openrouter.ai> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3578598 commit f5dab60

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openrouter/spawn",
3-
"version": "0.28.1",
3+
"version": "0.28.2",
44
"type": "module",
55
"bin": {
66
"spawn": "cli.js"

packages/cli/src/__tests__/cursor-proxy.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,29 +228,29 @@ describe("AgentServerMessage encoding", () => {
228228

229229
describe("ModelDetails encoding", () => {
230230
it("encodes model with all required fields", () => {
231-
const model = bmd("claude-4-sonnet", "Claude Sonnet 4");
231+
const model = bmd("anthropic/claude-sonnet-4-6", "Claude Sonnet 4.6");
232232
const strings: string[] = [];
233233
xstr(model, strings);
234-
expect(strings).toContain("claude-4-sonnet");
235-
expect(strings).toContain("Claude Sonnet 4");
234+
expect(strings).toContain("anthropic/claude-sonnet-4-6");
235+
expect(strings).toContain("Claude Sonnet 4.6");
236236
});
237237

238238
it("encodes model list response", () => {
239239
const models = [
240240
[
241-
"claude-4-sonnet",
242-
"Claude 4",
241+
"anthropic/claude-sonnet-4-6",
242+
"Claude Sonnet 4.6",
243243
],
244244
[
245-
"gpt-4o",
246-
"GPT-4o",
245+
"openai/gpt-5.4",
246+
"GPT-5.4",
247247
],
248248
];
249249
const response = Buffer.concat(models.map(([id, name]) => em(1, bmd(id, name))));
250250
const strings: string[] = [];
251251
xstr(response, strings);
252-
expect(strings).toContain("claude-4-sonnet");
253-
expect(strings).toContain("gpt-4o");
252+
expect(strings).toContain("anthropic/claude-sonnet-4-6");
253+
expect(strings).toContain("openai/gpt-5.4");
254254
});
255255
});
256256

packages/cli/src/shared/cursor-proxy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function ct(){const j=Buffer.from("{}");const t=Buffer.alloc(5+j.length);t[0]=2;
3131
function tdf(t){return cf(em(1,em(1,es(1,t))));}
3232
function tef(){return cf(em(1,em(14,Buffer.from([8,10,16,5]))));}
3333
function bmd(id,n){return Buffer.concat([es(1,id),es(3,id),es(4,n),es(5,n)]);}
34-
function bmr(){return Buffer.concat([["anthropic/claude-sonnet-4","Claude Sonnet 4"],["openai/gpt-4o","GPT-4o"],["google/gemini-2.5-flash","Gemini 2.5 Flash"]].map(([i,n])=>em(1,bmd(i,n))));}
35-
function bdr(){return em(1,bmd("anthropic/claude-sonnet-4","Claude Sonnet 4"));}
34+
function bmr(){return Buffer.concat([["anthropic/claude-sonnet-4-6","Claude Sonnet 4.6"],["anthropic/claude-haiku-4-5","Claude Haiku 4.5"],["openai/gpt-5.4","GPT-5.4"],["google/gemini-3.5-pro","Gemini 3.5 Pro"],["google/gemini-3.5-flash","Gemini 3.5 Flash"]].map(([i,n])=>em(1,bmd(i,n))));}
35+
function bdr(){return em(1,bmd("anthropic/claude-sonnet-4-6","Claude Sonnet 4.6"));}
3636
function xstr(buf,out){let o=0;while(o<buf.length){let t=0,s=0;while(o<buf.length){const b=buf[o++];t|=(b&0x7f)<<s;s+=7;if(!(b&0x80))break;}const wt=t&7;if(wt===0){while(o<buf.length&&buf[o++]&0x80);}else if(wt===2){let l=0,s=0;while(o<buf.length){const b=buf[o++];l|=(b&0x7f)<<s;s+=7;if(!(b&0x80))break;}const d=buf.slice(o,o+l);o+=l;const st=d.toString("utf8");if(/^[\\x20-\\x7e]+$/.test(st))out.push(st);else try{xstr(d,out);}catch(e){}}else break;}}
3737
`.trim();
3838

0 commit comments

Comments
 (0)