From 2c94bd4ad9f1060d6fa6a7ea65b2173840f41348 Mon Sep 17 00:00:00 2001 From: nmz Date: Fri, 10 Jul 2026 18:16:19 +0300 Subject: [PATCH] feat: add SWE-1.7 to the model catalog Cognition's GetCascadeModelConfigs now includes the SWE-1.7 family. Changes: - add swe-1.7 and swe-1-7 alias to VARIANT_CATALOG - update README curated 7-model block to include swe-1.7 - update install.sh (JS + Python branches) to include swe-1.7 - add swe-1.7 to opencode_config_example.json with 256K context - add/extend variant tests for swe-1.7 resolution --- README.md | 13 ++++++------- install.sh | 16 +++++++--------- opencode_config_example.json | 17 +++++++++++++++++ src/plugin/models.ts | 8 ++++++++ tests/unit/variant.test.ts | 12 ++++++++++-- 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 852c582..ff6e33e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![npm downloads](https://img.shields.io/npm/dw/opencode-windsurf-auth.svg)](https://www.npmjs.com/package/opencode-windsurf-auth) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -> Use Windsurf models in [opencode](https://opencode.ai/): Claude, GPT, Gemini, Kimi, DeepSeek, SWE-1.6, and more with your existing Windsurf subscription. All via Windsurf OAuth, no app required. +> Use Windsurf models in [opencode](https://opencode.ai/): Claude, GPT, Gemini, Kimi, DeepSeek, SWE-1.7, and more with your existing Windsurf subscription. All via Windsurf OAuth, no app required. ## Install @@ -84,12 +84,11 @@ Paste this into `~/.config/opencode/opencode.json`: "modalities": { "input": ["text", "image"], "output": ["text"] }, "variants": { "thinking": {}, "1m": {}, "thinking-1m": {}, "fast": {}, "thinking-fast": {} } }, - "swe-1.6": { - "name": "SWE 1.6", - "limit": { "context": 1000000, "output": 128000 }, + "swe-1.7": { + "name": "SWE 1.7", + "limit": { "context": 256000, "output": 128000 }, "attachment": true, - "modalities": { "input": ["text", "image"], "output": ["text"] }, - "variants": { "fast": {}, "fast-low": {}, "fast-medium": {}, "fast-high": {} } + "modalities": { "input": ["text", "image"], "output": ["text"] } }, "deepseek-v4": { "name": "DeepSeek V4", @@ -113,7 +112,7 @@ Want the full catalog (94 models, all variants)? Copy [`opencode_config_example. ## Use ```bash -opencode run --model=windsurf/swe-1.6 "hi" +opencode run --model=windsurf/swe-1.7 "hi" opencode run --model=windsurf/claude-opus-4.7:high "what does this codebase do?" opencode run --model=windsurf/kimi-k2.6 -f screenshot.png -- "describe this image" ``` diff --git a/install.sh b/install.sh index c36eec9..711698c 100755 --- a/install.sh +++ b/install.sh @@ -477,12 +477,11 @@ if [[ "$RUNTIME_KIND" == "js" ]]; then modalities: { input: ["text", "image"], output: ["text"] }, variants: { thinking: {}, "1m": {}, "thinking-1m": {}, fast: {}, "thinking-fast": {} }, }, - "swe-1.6": { - name: "SWE 1.6", - limit: { context: 1000000, output: 128000 }, + "swe-1.7": { + name: "SWE 1.7", + limit: { context: 256000, output: 128000 }, attachment: true, modalities: { input: ["text", "image"], output: ["text"] }, - variants: { fast: {}, "fast-low": {}, "fast-medium": {}, "fast-high": {} }, }, "deepseek-v4": { name: "DeepSeek V4", @@ -645,12 +644,11 @@ if (not has) or force: "modalities": {"input": ["text", "image"], "output": ["text"]}, "variants": {"thinking": {}, "1m": {}, "thinking-1m": {}, "fast": {}, "thinking-fast": {}}, }, - "swe-1.6": { - "name": "SWE 1.6", - "limit": {"context": 1000000, "output": 128000}, + "swe-1.7": { + "name": "SWE 1.7", + "limit": {"context": 256000, "output": 128000}, "attachment": True, "modalities": {"input": ["text", "image"], "output": ["text"]}, - "variants": {"fast": {}, "fast-low": {}, "fast-medium": {}, "fast-high": {}}, }, "deepseek-v4": { "name": "DeepSeek V4", @@ -754,7 +752,7 @@ RESTORE_CONFIG_Q=$(printf '%q' "$CONFIG") printf '\n%s🎉 Installation complete.%s\n\n' "$GREEN" "$RESET" printf '%sTry it:%s\n' "$BLUE" "$RESET" -printf ' opencode run --model=windsurf/swe-1.6 "hi"\n' +printf ' opencode run --model=windsurf/swe-1.7 "hi"\n' printf ' opencode run --model=windsurf/kimi-k2.6 -f screenshot.png -- "describe this image"\n' printf ' opencode run --model=windsurf/claude-opus-4.7:high "what does this codebase do?"\n\n' printf '%sAnything broken?%s\n' "$BLUE" "$RESET" diff --git a/opencode_config_example.json b/opencode_config_example.json index 18a0b9f..5fc9a78 100644 --- a/opencode_config_example.json +++ b/opencode_config_example.json @@ -1044,6 +1044,23 @@ ] } }, + "swe-1.7": { + "name": "SWE 1.7", + "limit": { + "context": 256000, + "output": 128000 + }, + "attachment": true, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + } + }, "gpt-oss-120b": { "name": "GPT-OSS 120B", "limit": { diff --git a/src/plugin/models.ts b/src/plugin/models.ts index bf0c9c3..b91b1c0 100644 --- a/src/plugin/models.ts +++ b/src/plugin/models.ts @@ -387,6 +387,14 @@ const VARIANT_CATALOG: Record = { }, aliases: ['swe-1-6'], }, + 'swe-1.7': { + id: 'swe-1.7', + defaultUid: 'swe-1-7', + variants: { + 'base': { modelUid: 'swe-1-7', description: 'SWE-1.7' }, + }, + aliases: ['swe-1-7'], + }, 'deepseek-v4': { id: 'deepseek-v4', defaultUid: 'deepseek-v4', diff --git a/tests/unit/variant.test.ts b/tests/unit/variant.test.ts index ff1d977..91f6d8c 100644 --- a/tests/unit/variant.test.ts +++ b/tests/unit/variant.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'bun:test'; -import { resolveModel, getModelVariants } from '../../src/plugin/models.js'; +import { resolveModel, getModelVariants, getCanonicalModels } from '../../src/plugin/models.js'; // Pins the variant-resolution contract against the live Cognition model catalog // (see src/plugin/models.ts auto-generated block + family-less manual entries). @@ -33,9 +33,11 @@ describe('resolveModel variants', () => { expect(result.modelUid).toBe('claude-opus-4-7-max-fast'); }); - test('resolves family-less models (swe-1.6 + its fast variant)', () => { + test('resolves family-less models (swe-1.6 + its fast variant, swe-1.7)', () => { expect(resolveModel('swe-1.6').modelUid).toBe('swe-1-6'); expect(resolveModel('swe-1.6:fast').modelUid).toBe('swe-1-6-fast'); + expect(resolveModel('swe-1.7').modelUid).toBe('swe-1-7'); + expect(resolveModel('swe-1-7').modelUid).toBe('swe-1-7'); }); test('resolves multi-segment variants like xhigh-priority', () => { @@ -63,4 +65,10 @@ describe('getModelVariants', () => { const variants = getModelVariants('kimi-k2.6'); expect(variants).toBeUndefined(); }); + + test('getCanonicalModels includes swe-1.7', () => { + const models = getCanonicalModels(); + expect(models).toContain('swe-1.7'); + expect(models).toContain('swe-1.6'); + }); });