Skip to content

Commit 91d5a92

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into zai-coding-plan-glm-anthropic
2 parents 390213b + 57bd47a commit 91d5a92

File tree

46 files changed

+451
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+451
-234
lines changed

.github/workflows/update-nix-hashes.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,25 @@ jobs:
4141
- name: Update flake.lock
4242
run: |
4343
set -euo pipefail
44+
echo "📦 Updating flake.lock..."
4445
nix flake update
46+
echo "✅ flake.lock updated successfully"
4547
4648
- name: Update node_modules hash
4749
run: |
4850
set -euo pipefail
51+
echo "🔄 Updating node_modules hash..."
4952
nix/scripts/update-hashes.sh
53+
echo "✅ node_modules hash updated successfully"
5054
5155
- name: Commit hash changes
5256
env:
5357
TARGET_BRANCH: ${{ github.head_ref || github.ref_name }}
5458
run: |
5559
set -euo pipefail
5660
61+
echo "🔍 Checking for changes in tracked Nix files..."
62+
5763
summarize() {
5864
local status="$1"
5965
{
@@ -71,16 +77,24 @@ jobs:
7177
FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json)
7278
STATUS="$(git status --short -- "${FILES[@]}" || true)"
7379
if [ -z "$STATUS" ]; then
80+
echo "✅ No changes detected. Hashes are already up to date."
7481
summarize "no changes"
75-
echo "No changes to tracked Nix files. Hashes are already up to date."
7682
exit 0
7783
fi
7884
85+
echo "📝 Changes detected:"
86+
echo "$STATUS"
87+
echo "🔗 Staging files..."
7988
git add "${FILES[@]}"
89+
echo "💾 Committing changes..."
8090
git commit -m "Update Nix flake.lock and hashes"
91+
echo "✅ Changes committed"
8192
8293
BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}"
94+
echo "🌳 Pulling latest from branch: $BRANCH"
8395
git pull --rebase origin "$BRANCH"
96+
echo "🚀 Pushing changes to branch: $BRANCH"
8497
git push origin HEAD:"$BRANCH"
98+
echo "✅ Changes pushed successfully"
8599
86100
summarize "committed $(git rev-parse --short HEAD)"

.opencode/command/commit.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
description: Git commit and push
3-
subtask: true
43
---
54

65
commit and push

.opencode/opencode.jsonc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
33
"plugin": ["opencode-openai-codex-auth"],
4-
"enterprise": {
5-
"url": "http://localhost:3000",
6-
},
4+
// "enterprise": {
5+
// "url": "http://localhost:3000",
6+
// },
77
"provider": {
88
"opencode": {
99
"options": {

STATS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@
150150
| 2025-11-22 | 837,269 (+10,960) | 780,996 (+11,689) | 1,618,265 (+22,649) |
151151
| 2025-11-23 | 846,609 (+9,340) | 795,069 (+14,073) | 1,641,678 (+23,413) |
152152
| 2025-11-24 | 856,733 (+10,124) | 804,033 (+8,964) | 1,660,766 (+19,088) |
153+
| 2025-11-25 | 869,423 (+12,690) | 817,339 (+13,306) | 1,686,762 (+25,996) |

bun.lock

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"packages/console/app": {
2121
"name": "@opencode-ai/console-app",
22-
"version": "1.0.108",
22+
"version": "1.0.110",
2323
"dependencies": {
2424
"@cloudflare/vite-plugin": "1.15.2",
2525
"@ibm/plex": "6.4.1",
@@ -46,7 +46,7 @@
4646
},
4747
"packages/console/core": {
4848
"name": "@opencode-ai/console-core",
49-
"version": "1.0.108",
49+
"version": "1.0.110",
5050
"dependencies": {
5151
"@aws-sdk/client-sts": "3.782.0",
5252
"@jsx-email/render": "1.1.1",
@@ -73,7 +73,7 @@
7373
},
7474
"packages/console/function": {
7575
"name": "@opencode-ai/console-function",
76-
"version": "1.0.108",
76+
"version": "1.0.110",
7777
"dependencies": {
7878
"@ai-sdk/anthropic": "2.0.0",
7979
"@ai-sdk/openai": "2.0.2",
@@ -97,7 +97,7 @@
9797
},
9898
"packages/console/mail": {
9999
"name": "@opencode-ai/console-mail",
100-
"version": "1.0.108",
100+
"version": "1.0.110",
101101
"dependencies": {
102102
"@jsx-email/all": "2.2.3",
103103
"@jsx-email/cli": "1.4.3",
@@ -121,7 +121,7 @@
121121
},
122122
"packages/desktop": {
123123
"name": "@opencode-ai/desktop",
124-
"version": "1.0.108",
124+
"version": "1.0.110",
125125
"dependencies": {
126126
"@kobalte/core": "catalog:",
127127
"@opencode-ai/sdk": "workspace:*",
@@ -162,7 +162,7 @@
162162
},
163163
"packages/enterprise": {
164164
"name": "@opencode-ai/enterprise",
165-
"version": "1.0.108",
165+
"version": "1.0.110",
166166
"dependencies": {
167167
"@opencode-ai/ui": "workspace:*",
168168
"@opencode-ai/util": "workspace:*",
@@ -188,7 +188,7 @@
188188
},
189189
"packages/function": {
190190
"name": "@opencode-ai/function",
191-
"version": "1.0.108",
191+
"version": "1.0.110",
192192
"dependencies": {
193193
"@octokit/auth-app": "8.0.1",
194194
"@octokit/rest": "22.0.0",
@@ -204,7 +204,7 @@
204204
},
205205
"packages/opencode": {
206206
"name": "opencode",
207-
"version": "1.0.108",
207+
"version": "1.0.110",
208208
"bin": {
209209
"opencode": "./bin/opencode",
210210
},
@@ -232,8 +232,8 @@
232232
"@opencode-ai/sdk": "workspace:*",
233233
"@opencode-ai/util": "workspace:*",
234234
"@openrouter/ai-sdk-provider": "1.2.5",
235-
"@opentui/core": "0.1.49",
236-
"@opentui/solid": "0.1.49",
235+
"@opentui/core": "0.1.50",
236+
"@opentui/solid": "0.1.50",
237237
"@parcel/watcher": "2.5.1",
238238
"@pierre/precision-diffs": "catalog:",
239239
"@solid-primitives/event-bus": "1.1.2",
@@ -291,7 +291,7 @@
291291
},
292292
"packages/plugin": {
293293
"name": "@opencode-ai/plugin",
294-
"version": "1.0.108",
294+
"version": "1.0.110",
295295
"dependencies": {
296296
"@opencode-ai/sdk": "workspace:*",
297297
"zod": "catalog:",
@@ -311,7 +311,7 @@
311311
},
312312
"packages/sdk/js": {
313313
"name": "@opencode-ai/sdk",
314-
"version": "1.0.108",
314+
"version": "1.0.110",
315315
"devDependencies": {
316316
"@hey-api/openapi-ts": "0.81.0",
317317
"@tsconfig/node22": "catalog:",
@@ -322,7 +322,7 @@
322322
},
323323
"packages/slack": {
324324
"name": "@opencode-ai/slack",
325-
"version": "1.0.108",
325+
"version": "1.0.110",
326326
"dependencies": {
327327
"@opencode-ai/sdk": "workspace:*",
328328
"@slack/bolt": "^3.17.1",
@@ -335,7 +335,7 @@
335335
},
336336
"packages/tauri": {
337337
"name": "@opencode-ai/tauri",
338-
"version": "1.0.108",
338+
"version": "1.0.110",
339339
"dependencies": {
340340
"@tauri-apps/api": "^2",
341341
"@tauri-apps/plugin-opener": "^2",
@@ -348,7 +348,7 @@
348348
},
349349
"packages/ui": {
350350
"name": "@opencode-ai/ui",
351-
"version": "1.0.108",
351+
"version": "1.0.110",
352352
"dependencies": {
353353
"@kobalte/core": "catalog:",
354354
"@opencode-ai/sdk": "workspace:*",
@@ -380,7 +380,7 @@
380380
},
381381
"packages/util": {
382382
"name": "@opencode-ai/util",
383-
"version": "1.0.108",
383+
"version": "1.0.110",
384384
"dependencies": {
385385
"zod": "catalog:",
386386
},
@@ -390,7 +390,7 @@
390390
},
391391
"packages/web": {
392392
"name": "@opencode-ai/web",
393-
"version": "1.0.108",
393+
"version": "1.0.110",
394394
"dependencies": {
395395
"@astrojs/cloudflare": "12.6.3",
396396
"@astrojs/markdown-remark": "6.3.1",
@@ -1081,21 +1081,21 @@
10811081

10821082
"@opentelemetry/api": ["@opentelemetry/[email protected]", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
10831083

1084-
"@opentui/core": ["@opentui/[email protected].49", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "jimp": "1.6.0", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.49", "@opentui/core-darwin-x64": "0.1.49", "@opentui/core-linux-arm64": "0.1.49", "@opentui/core-linux-x64": "0.1.49", "@opentui/core-win32-arm64": "0.1.49", "@opentui/core-win32-x64": "0.1.49", "bun-webgpu": "0.1.4", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-KcyORwJLARmzfx+87M+pKtVjcl5YtYHluymbRb8BgOBHRjWxABv8U6EzwxHNyARG9MxAvR/pHQg3xtNBN09KmQ=="],
1084+
"@opentui/core": ["@opentui/[email protected].50", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "jimp": "1.6.0", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.50", "@opentui/core-darwin-x64": "0.1.50", "@opentui/core-linux-arm64": "0.1.50", "@opentui/core-linux-x64": "0.1.50", "@opentui/core-win32-arm64": "0.1.50", "@opentui/core-win32-x64": "0.1.50", "bun-webgpu": "0.1.4", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-QhjwT2f8AIQj0gbL/WQ2M93sl2/qp9+Kqxyh4dOhp8z3qnTc5D7J105VrMyeWZW7/P27ubgbFAqqWXrZ4FsuLw=="],
10851085

1086-
"@opentui/core-darwin-arm64": ["@opentui/[email protected].49", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5sTNGf3aH5XwoJmIMqs5C03TFODWTxML4qozogrG1DsDU8/7vKsyA26dhG7hzyYLL8NYCfTsokTWQoY6K4DCZw=="],
1086+
"@opentui/core-darwin-arm64": ["@opentui/[email protected].50", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FKqTDOsZl9TXF7KN2SdZKoRHQNvqKSY27AG3jhKCoiyLGdaNCAsaeBWqAmpnL4E4kMkV3aiQSCrKTrYsaevvOg=="],
10871087

1088-
"@opentui/core-darwin-x64": ["@opentui/[email protected].49", "", { "os": "darwin", "cpu": "x64" }, "sha512-or12m7M2Wegc1kN2XWLX1QMpygjuUVZdMqOvEjQ3SOAt/wtpu2cN0GbzfFAb4voQgXcnNpti/hbN8ZTkjYBugA=="],
1088+
"@opentui/core-darwin-x64": ["@opentui/[email protected].50", "", { "os": "darwin", "cpu": "x64" }, "sha512-GczVNqqpM/HtsgeBB08K6zL1B7oc6Y5G2cMklo06LrYRdDkFdDtY5fNNnJR2/psZWzTrI3M+sLnKWgUGD5CxUQ=="],
10891089

1090-
"@opentui/core-linux-arm64": ["@opentui/[email protected].49", "", { "os": "linux", "cpu": "arm64" }, "sha512-Lt4wMYwYArETPoTtB5Pr/2txdW/f2W4Dr1KaYBcwP97EKS9IPPsbJvPher90EL0JGhK3SauKmRxrnBeeSSiGZQ=="],
1090+
"@opentui/core-linux-arm64": ["@opentui/[email protected].50", "", { "os": "linux", "cpu": "arm64" }, "sha512-+CKMhweEXH0tLGM6qqaqk6DyCEmwrTVubTtez/pSM3GgcROSXIBui9TEZpIlPgSCVmjbotGS6eSIg4oU+p9o7w=="],
10911091

1092-
"@opentui/core-linux-x64": ["@opentui/[email protected].49", "", { "os": "linux", "cpu": "x64" }, "sha512-UkeYCsCl+aza38htjzT6LfH7B2unl7sme0Q+3sgPNI1HWthMPbPL8bRUnj0fdAq2W9CH0hxF77eiwjmdZm36Rg=="],
1092+
"@opentui/core-linux-x64": ["@opentui/[email protected].50", "", { "os": "linux", "cpu": "x64" }, "sha512-yv5KWiMohAK9bsi1gth9DDZDpoJA1EDHexjhThsPT8EH82g13T088dnJZuJWUE9dr1OwTCQG8DyorNxX3ViEGQ=="],
10931093

1094-
"@opentui/core-win32-arm64": ["@opentui/[email protected].49", "", { "os": "win32", "cpu": "arm64" }, "sha512-SQ/xdNCG9csEMebWgxXrHh7PPhtOw681/CvNgJXO5lzqJuAi6epUGAMuliFpPjZpo8UiGP2dAAUeXCRo/s/tiA=="],
1094+
"@opentui/core-win32-arm64": ["@opentui/[email protected].50", "", { "os": "win32", "cpu": "arm64" }, "sha512-6/6pURTRNTLFKF8IhYVi7U+T/HGMeURav9LIYw7yfcOibd0kLMthmemhS0Lzyk5dmtp0T4V4NmRmtlq/fIzyjQ=="],
10951095

1096-
"@opentui/core-win32-x64": ["@opentui/[email protected].49", "", { "os": "win32", "cpu": "x64" }, "sha512-WUDmgbn18aaqrKN2Gca6NqbPzXzoowSHk2UNkBJqJ4Oqryf3cXcKTNJGH/TqPcNCIzxgNJNA0cwT0ZKzkPmF7Q=="],
1096+
"@opentui/core-win32-x64": ["@opentui/[email protected].50", "", { "os": "win32", "cpu": "x64" }, "sha512-EME8GBFq9uCLbH5js8fH7/xY4ZtLIZlt3bkYKT6lPiCNdaf/6ebg+F/ObPXFkJrc8VeV1ql2bXhQ6RLi7izvAA=="],
10971097

1098-
"@opentui/solid": ["@opentui/[email protected].49", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.49", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-s4XPKE0aeHkgHTrcbDrjcfLDsskRH7RlD4gplXGjVPHvlmqg0rfbyUgASYR6QGErLljYnPgEiirsfNzdjdjWhA=="],
1098+
"@opentui/solid": ["@opentui/[email protected].50", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.50", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-q778kp/eksh8UOPSQO2h8h9CGGDqepTf9u2WYTS2HYHRAI2SRtUWpN9L7Euyt3BtG9L/wpsIOHK/ufPhQH1X6A=="],
10991099

11001100
"@oslojs/asn1": ["@oslojs/[email protected]", "", { "dependencies": { "@oslojs/binary": "1.0.0" } }, "sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA=="],
11011101

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"nodeModules": "sha256-m7hL9Uzqk+oa2/FtgkzEPgi+m/VZP1SvjpgYHNjiS1c="
2+
"nodeModules": "sha256-EikMl2CESyJpTT48CGq8xr/N+WTkvCj05N6enXQmRbI="
33
}

packages/console/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencode-ai/console-app",
3-
"version": "1.0.108",
3+
"version": "1.0.110",
44
"type": "module",
55
"scripts": {
66
"typecheck": "tsgo --noEmit",

packages/console/app/src/routes/zen/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Legal } from "~/component/legal"
1818
import { Footer } from "~/component/footer"
1919
import { Header } from "~/component/header"
2020
import { getLastSeenWorkspaceID } from "../workspace/common"
21-
import { IconGemini } from "~/component/icon"
21+
import { IconGemini, IconZai } from "~/component/icon"
2222

2323
const checkLoggedIn = query(async () => {
2424
"use server"
@@ -116,6 +116,9 @@ export default function Home() {
116116
/>
117117
</svg>
118118
</div>
119+
<div>
120+
<IconZai width="24" height="24" />
121+
</div>
119122
</div>
120123
<a href="/auth">
121124
<span>Get started with Zen </span>

packages/console/app/src/routes/zen/util/handler.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function handler(
6666
await rateLimiter?.check()
6767

6868
const retriableRequest = async (retry: RetryOptions = { excludeProviders: [], retryCount: 0 }) => {
69-
const providerInfo = selectProvider(zenData, modelInfo, ip, retry)
69+
const providerInfo = selectProvider(zenData, modelInfo, sessionId, retry)
7070
const authInfo = await authenticate(modelInfo, providerInfo)
7171
validateBilling(authInfo, modelInfo)
7272
validateModelSettings(authInfo)
@@ -275,7 +275,7 @@ export async function handler(
275275
return { id: modelId, ...modelData }
276276
}
277277

278-
function selectProvider(zenData: ZenData, modelInfo: ModelInfo, ip: string, retry: RetryOptions) {
278+
function selectProvider(zenData: ZenData, modelInfo: ModelInfo, sessionId: string, retry: RetryOptions) {
279279
const provider = (() => {
280280
if (retry.retryCount === MAX_RETRIES) {
281281
return modelInfo.providers.find((provider) => provider.id === modelInfo.fallbackProvider)
@@ -286,9 +286,13 @@ export async function handler(
286286
.filter((provider) => !retry.excludeProviders.includes(provider.id))
287287
.flatMap((provider) => Array<typeof provider>(provider.weight ?? 1).fill(provider))
288288

289-
// Use the last 2 characters of IP address to select a provider
290-
const lastChars = ip.slice(-2)
291-
const index = parseInt(lastChars, 16) % providers.length
289+
// Use the last 4 characters of session ID to select a provider
290+
let h = 0
291+
const l = sessionId.length
292+
for (let i = l - 4; i < l; i++) {
293+
h = (h * 31 + sessionId.charCodeAt(i)) | 0 // 32-bit int
294+
}
295+
const index = (h >>> 0) % providers.length // make unsigned + range 0..length-1
292296
return providers[index || 0]
293297
})()
294298

0 commit comments

Comments
 (0)