Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/last-synced-tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.170
v1.0.171
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ jobs:
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Setup Git Identity
run: |
git config --global user.email "opencode@sst.dev"
git config --global user.name "opencode"
git remote set-url origin https://x-access-token:${{ secrets.SST_GITHUB_TOKEN }}@github.com/${{ github.repository }}

- name: Publish
id: publish
run: ./script/publish.ts
Expand Down
566 changes: 388 additions & 178 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nix/hashes.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"nodeModules": "sha256-Z+eNK5D8Wt//ywysj/VCzOa2232fPwD0M+QX2C7DSBY="
"nodeModules": "sha256-cpXmqJQJeFj3eED/aOb4YLUdkZFV//7u4f0STBxzUhk="
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"vite": "7.1.4",
"@solidjs/meta": "0.29.4",
"@solidjs/router": "0.15.4",
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@57aeb22",
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@dfb2020",
"solid-js": "1.9.10",
"vite-plugin-solid": "2.11.10"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/console/app/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./index.css"
import { Title, Meta, Link } from "@solidjs/meta"
import { HttpHeader } from "@solidjs/start"
//import { HttpHeader } from "@solidjs/start"
import video from "../asset/lander/opencode-min.mp4"
import videoPoster from "../asset/lander/opencode-poster.png"
import { IconCopy, IconCheck } from "../component/icon"
Expand Down Expand Up @@ -42,7 +42,7 @@ export default function Home() {

return (
<main data-page="opencode">
<HttpHeader name="Cache-Control" value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400" />
{/*<HttpHeader name="Cache-Control" value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400" />*/}
<Title>OpenCode | The open source AI coding agent</Title>
<Link rel="canonical" href={config.baseUrl} />
<Meta property="og:image" content="/social-share.png" />
Expand Down
4 changes: 2 additions & 2 deletions packages/console/app/src/routes/zen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./index.css"
import { createAsync, query, redirect } from "@solidjs/router"
import { Title, Meta, Link } from "@solidjs/meta"
import { HttpHeader } from "@solidjs/start"
//import { HttpHeader } from "@solidjs/start"
import zenLogoLight from "../../asset/zen-ornate-light.svg"
import { config } from "~/config"
import zenLogoDark from "../../asset/zen-ornate-dark.svg"
Expand Down Expand Up @@ -30,7 +30,7 @@ export default function Home() {
const loggedin = createAsync(() => checkLoggedIn())
return (
<main data-page="zen">
<HttpHeader name="Cache-Control" value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400" />
{/*<HttpHeader name="Cache-Control" value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400" />*/}
<Title>OpenCode Zen | A curated set of reliable optimized models for coding agents</Title>
<Link rel="canonical" href={`${config.baseUrl}/zen`} />
<Meta property="og:image" content="/social-share-zen.png" />
Expand Down
6 changes: 5 additions & 1 deletion packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ export function Sidebar(props: { sessionID: string }) {
</box>
<Show when={sync.data.lsp.length <= 2 || expanded.lsp}>
<Show when={sync.data.lsp.length === 0}>
<text fg={theme.textMuted}>LSPs will activate as files are read</text>
<text fg={theme.textMuted}>
{sync.data.config.lsp === false
? "LSPs have been disabled in settings"
: "LSPs will activate as files are read"}
</text>
</Show>
<For each={sync.data.lsp}>
{(item) => (
Expand Down
8 changes: 3 additions & 5 deletions packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ export namespace ProviderTransform {
}

if (
model.providerID === "deepseek" ||
model.api.id.toLowerCase().includes("deepseek") ||
(model.capabilities.interleaved &&
typeof model.capabilities.interleaved === "object" &&
model.capabilities.interleaved.field === "reasoning_content")
model.capabilities.interleaved &&
typeof model.capabilities.interleaved === "object" &&
model.capabilities.interleaved.field === "reasoning_content"
) {
return msgs.map((msg) => {
if (msg.role === "assistant" && Array.isArray(msg.content)) {
Expand Down
5 changes: 5 additions & 0 deletions packages/opencode/test/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
import os from "os"
import path from "path"
import fs from "fs/promises"
import fsSync from "fs"
import { afterAll } from "bun:test"

const dir = path.join(os.tmpdir(), "opencode-test-data-" + process.pid)
await fs.mkdir(dir, { recursive: true })
afterAll(() => {
fsSync.rmSync(dir, { recursive: true, force: true })
})
process.env["XDG_DATA_HOME"] = path.join(dir, "share")
process.env["XDG_CACHE_HOME"] = path.join(dir, "cache")
process.env["XDG_CONFIG_HOME"] = path.join(dir, "config")
Expand Down
56 changes: 3 additions & 53 deletions packages/opencode/test/provider/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ describe("ProviderTransform.message - DeepSeek reasoning content", () => {
toolcall: true,
input: { text: true, audio: false, image: false, video: false, pdf: false },
output: { text: true, audio: false, image: false, video: false, pdf: false },
interleaved: false,
interleaved: {
field: "reasoning_content",
},
},
cost: {
input: 0.001,
Expand Down Expand Up @@ -229,58 +231,6 @@ describe("ProviderTransform.message - DeepSeek reasoning content", () => {
expect(result[0].providerOptions?.openaiCompatible?.reasoning_content).toBe("Let me think about this...")
})

test("DeepSeek model ID containing 'deepseek' matches (case insensitive)", () => {
const msgs = [
{
role: "assistant",
content: [
{ type: "reasoning", text: "Thinking..." },
{
type: "tool-call",
toolCallId: "test",
toolName: "get_weather",
input: { location: "Hangzhou" },
},
],
},
] as any[]

const result = ProviderTransform.message(msgs, {
id: "someprovider/deepseek-reasoner",
providerID: "someprovider",
api: {
id: "deepseek-reasoner",
url: "https://api.someprovider.com",
npm: "@ai-sdk/openai-compatible",
},
name: "SomeProvider DeepSeek Reasoner",
capabilities: {
temperature: true,
reasoning: true,
attachment: false,
toolcall: true,
input: { text: true, audio: false, image: false, video: false, pdf: false },
output: { text: true, audio: false, image: false, video: false, pdf: false },
interleaved: false,
},
cost: {
input: 0.001,
output: 0.002,
cache: { read: 0.0001, write: 0.0002 },
},
limit: {
context: 128000,
output: 8192,
},
status: "active",
options: {},
headers: {},
release_date: "2023-04-01",
})

expect(result[0].providerOptions?.openaiCompatible?.reasoning_content).toBe("Thinking...")
})

test("Non-DeepSeek providers leave reasoning content unchanged", () => {
const msgs = [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/Lander.astro
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ if (image) {
</div>
<div class="col4">
<h3>Mise</h3>
<button class="command" data-command="mise use -g ubi:sst/opencode">
<button class="command" data-command="mise use -g github:sst/opencode">
<code>
<span>mise use -g</span> <span class="highlight">ubi:sst/opencode</span>
<span>mise use -g</span> <span class="highlight">github:sst/opencode</span>
</code>
<span class="copy">
<CopyIcon />
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can also install it with the following commands:
- **Using Mise**

```bash
mise use -g ubi:sst/opencode
mise use -g github:sst/opencode
```

- **Using Docker**
Expand Down
Loading