mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
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>
This commit is contained in:
parent
1378ed1c23
commit
ddce16a438
3 changed files with 12 additions and 12 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.28.1",
|
||||
"version": "0.28.2",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -228,29 +228,29 @@ describe("AgentServerMessage encoding", () => {
|
|||
|
||||
describe("ModelDetails encoding", () => {
|
||||
it("encodes model with all required fields", () => {
|
||||
const model = bmd("claude-4-sonnet", "Claude Sonnet 4");
|
||||
const model = bmd("anthropic/claude-sonnet-4-6", "Claude Sonnet 4.6");
|
||||
const strings: string[] = [];
|
||||
xstr(model, strings);
|
||||
expect(strings).toContain("claude-4-sonnet");
|
||||
expect(strings).toContain("Claude Sonnet 4");
|
||||
expect(strings).toContain("anthropic/claude-sonnet-4-6");
|
||||
expect(strings).toContain("Claude Sonnet 4.6");
|
||||
});
|
||||
|
||||
it("encodes model list response", () => {
|
||||
const models = [
|
||||
[
|
||||
"claude-4-sonnet",
|
||||
"Claude 4",
|
||||
"anthropic/claude-sonnet-4-6",
|
||||
"Claude Sonnet 4.6",
|
||||
],
|
||||
[
|
||||
"gpt-4o",
|
||||
"GPT-4o",
|
||||
"openai/gpt-5.4",
|
||||
"GPT-5.4",
|
||||
],
|
||||
];
|
||||
const response = Buffer.concat(models.map(([id, name]) => em(1, bmd(id, name))));
|
||||
const strings: string[] = [];
|
||||
xstr(response, strings);
|
||||
expect(strings).toContain("claude-4-sonnet");
|
||||
expect(strings).toContain("gpt-4o");
|
||||
expect(strings).toContain("anthropic/claude-sonnet-4-6");
|
||||
expect(strings).toContain("openai/gpt-5.4");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ function ct(){const j=Buffer.from("{}");const t=Buffer.alloc(5+j.length);t[0]=2;
|
|||
function tdf(t){return cf(em(1,em(1,es(1,t))));}
|
||||
function tef(){return cf(em(1,em(14,Buffer.from([8,10,16,5]))));}
|
||||
function bmd(id,n){return Buffer.concat([es(1,id),es(3,id),es(4,n),es(5,n)]);}
|
||||
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))));}
|
||||
function bdr(){return em(1,bmd("anthropic/claude-sonnet-4","Claude Sonnet 4"));}
|
||||
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))));}
|
||||
function bdr(){return em(1,bmd("anthropic/claude-sonnet-4-6","Claude Sonnet 4.6"));}
|
||||
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;}}
|
||||
`.trim();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue