Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand All @@ -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"
```
Expand Down
16 changes: 7 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions opencode_config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 8 additions & 0 deletions src/plugin/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ const VARIANT_CATALOG: Record<string, ModelCatalogEntry> = {
},
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',
Expand Down
12 changes: 10 additions & 2 deletions tests/unit/variant.test.ts
Original file line number Diff line number Diff line change
@@ -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).
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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');
});
});