Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5a9f4e5
fix: ensure checkUpgrade sets `init:` (#5040)
code-yeongyu Dec 4, 2025
2e63fed
chore: format code
actions-user Dec 4, 2025
6b80fff
ci: use blacksmith runners in review workflow too (#5042)
wsx99outlook Dec 4, 2025
bcf740f
zen: make session provider sticky
Dec 4, 2025
088ebb9
ci: only maintainer can trigger
rekram1-node Dec 4, 2025
45bc7a6
ci: cleaner
rekram1-node Dec 4, 2025
efbb973
ignore: update download stats 2025-12-04
actions-user Dec 4, 2025
1d6e3d4
fix(tui): cursor color
adamdotdevin Dec 4, 2025
27c99b4
Preserve prompt input when creating new session (#4993)
DanielFGray Dec 4, 2025
350a322
fix: model not being passed correctly to tool
rekram1-node Dec 4, 2025
a607f33
tweak: bash tool messages regarding timeouts and truncation more clea…
shantur Dec 4, 2025
a32cf70
tui: fix /new slash command being persisted in prompt input
rekram1-node Dec 4, 2025
7f86fe3
add optional prompt Input to Github Action (#4828)
dbpolito Dec 4, 2025
8a0c86c
bump: builtin plugin versions
rekram1-node Dec 4, 2025
b9c1f10
feat: Add SAP AI Core provider support (#5023)
jerome-benoit Dec 4, 2025
668d5a7
core: ensure model npm package falls back to dev models config when n…
thdxr Dec 4, 2025
48dc520
docs: add CodeCompanion.nvim integration instructions (#5079)
casonadams Dec 4, 2025
d469d7d
tweak: bash tool description re commit stuff
rekram1-node Dec 4, 2025
b1202ac
core: add test for custom model npm package inheritance
thdxr Dec 4, 2025
d763c11
feat(desktop): terminal pane (#5081)
adamdotdevin Dec 4, 2025
f9dcd97
Revert "feat(desktop): terminal pane (#5081)"
rekram1-node Dec 4, 2025
49800a0
release: v1.0.133
Dec 4, 2025
bda2329
sync: merge upstream v1.0.133 into integration
opencode-agent[bot] Dec 4, 2025
d953c4b
sync: record last synced tag v1.0.133
opencode-agent[bot] Dec 4, 2025
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.132
v1.0.133
23 changes: 4 additions & 19 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
name: Guidelines Check

on:
pull_request_target:
types: [opened, ready_for_review]
issue_comment:
types: [created]

jobs:
check-guidelines:
if: |
(github.event_name == 'pull_request_target' &&
github.event.pull_request.draft == false) ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/review'))
runs-on: ubuntu-latest
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/review') &&
contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association)
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
pull-requests: write
steps:
- name: Check if user has write permission
if: github.event_name == 'issue_comment'
run: |
PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/${{ github.event.comment.user.login }}/permission --jq '.permission')
if [[ "$PERMISSION" != "write" && "$PERMISSION" != "admin" ]]; then
echo "User does not have write permission"
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get PR number
id: pr-number
run: |
Expand Down
1 change: 1 addition & 0 deletions STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,4 @@
| 2025-12-01 | 925,898 (+9,782) | 876,500 (+6,306) | 1,802,398 (+16,088) |
| 2025-12-02 | 939,250 (+13,352) | 890,919 (+14,419) | 1,830,169 (+27,771) |
| 2025-12-03 | 952,249 (+12,999) | 903,713 (+12,794) | 1,855,962 (+25,793) |
| 2025-12-04 | 965,611 (+13,362) | 916,471 (+12,758) | 1,882,082 (+26,120) |
30 changes: 15 additions & 15 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
description: "Share the opencode session (defaults to true for public repos)"
required: false

prompt:
description: "Custom prompt to override the default prompt"
required: false

runs:
using: "composite"
steps:
Expand All @@ -26,5 +30,6 @@ runs:
env:
MODEL: ${{ inputs.model }}
SHARE: ${{ inputs.share }}
PROMPT: ${{ inputs.prompt }}
OPENCODE_BIN_PATH: ${{ github.workspace }}/packages/opencode/dist/shuvcode-linux-x64/bin/opencode
run: bun packages/opencode/bin/opencode github run
2 changes: 1 addition & 1 deletion packages/console/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-app",
"version": "1.0.132",
"version": "1.0.133",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand Down
14 changes: 13 additions & 1 deletion packages/console/app/src/routes/zen/util/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { oaCompatHelper } from "./provider/openai-compatible"
import { createRateLimiter } from "./rateLimiter"
import { createDataDumper } from "./dataDumper"
import { createTrialLimiter } from "./trialLimiter"
import { createStickyTracker } from "./stickyProviderTracker"

type ZenData = Awaited<ReturnType<typeof ZenData.list>>
type RetryOptions = {
Expand Down Expand Up @@ -68,9 +69,11 @@ export async function handler(
const isTrial = await trialLimiter?.isTrial()
const rateLimiter = createRateLimiter(modelInfo.id, modelInfo.rateLimit, ip)
await rateLimiter?.check()
const stickyTracker = createStickyTracker(modelInfo.stickyProvider ?? false, sessionId)
const stickyProvider = await stickyTracker?.get()

const retriableRequest = async (retry: RetryOptions = { excludeProviders: [], retryCount: 0 }) => {
const providerInfo = selectProvider(zenData, modelInfo, sessionId, isTrial ?? false, retry)
const providerInfo = selectProvider(zenData, modelInfo, sessionId, isTrial ?? false, retry, stickyProvider)
const authInfo = await authenticate(modelInfo, providerInfo)
validateBilling(authInfo, modelInfo)
validateModelSettings(authInfo)
Expand Down Expand Up @@ -121,6 +124,9 @@ export async function handler(
dataDumper?.provideModel(providerInfo.storeModel)
dataDumper?.provideRequest(reqBody)

// Store sticky provider
await stickyTracker?.set(providerInfo.id)

// Scrub response headers
const resHeaders = new Headers()
const keepHeaders = ["content-type", "cache-control"]
Expand Down Expand Up @@ -289,12 +295,18 @@ export async function handler(
sessionId: string,
isTrial: boolean,
retry: RetryOptions,
stickyProvider: string | undefined,
) {
const provider = (() => {
if (isTrial) {
return modelInfo.providers.find((provider) => provider.id === modelInfo.trial!.provider)
}

if (stickyProvider) {
const provider = modelInfo.providers.find((provider) => provider.id === stickyProvider)
if (provider) return provider
}

if (retry.retryCount === MAX_RETRIES) {
return modelInfo.providers.find((provider) => provider.id === modelInfo.fallbackProvider)
}
Expand Down
16 changes: 16 additions & 0 deletions packages/console/app/src/routes/zen/util/stickyProviderTracker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Resource } from "@opencode-ai/console-resource"

export function createStickyTracker(stickyProvider: boolean, session: string) {
if (!stickyProvider) return
if (!session) return
const key = `sticky:${session}`

return {
get: async () => {
return await Resource.GatewayKv.get(key)
},
set: async (providerId: string) => {
await Resource.GatewayKv.put(key, providerId, { expirationTtl: 86400 })
},
}
}
2 changes: 1 addition & 1 deletion packages/console/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/console-core",
"version": "1.0.132",
"version": "1.0.133",
"private": true,
"type": "module",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/console/core/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export namespace ZenData {
cost: ModelCostSchema,
cost200K: ModelCostSchema.optional(),
allowAnonymous: z.boolean().optional(),
stickyProvider: z.boolean().optional(),
trial: z
.object({
limit: z.number(),
Expand Down
2 changes: 1 addition & 1 deletion packages/console/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-function",
"version": "1.0.132",
"version": "1.0.133",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/console/mail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-mail",
"version": "1.0.132",
"version": "1.0.133",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/desktop",
"version": "1.0.132",
"version": "1.0.133",
"description": "",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enterprise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/enterprise",
"version": "1.0.132",
"version": "1.0.133",
"private": true,
"type": "module",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions packages/extensions/zed/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "opencode"
name = "OpenCode"
description = "The AI coding agent built for the terminal"
version = "1.0.132"
version = "1.0.133"
schema_version = 1
authors = ["Anomaly"]
repository = "https://github.com/sst/opencode"
Expand All @@ -11,26 +11,26 @@ name = "OpenCode"
icon = "./icons/opencode.svg"

[agent_servers.opencode.targets.darwin-aarch64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.132/opencode-darwin-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.133/opencode-darwin-arm64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.darwin-x86_64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.132/opencode-darwin-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.133/opencode-darwin-x64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-aarch64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.132/opencode-linux-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.133/opencode-linux-arm64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-x86_64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.132/opencode-linux-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.133/opencode-linux-x64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.windows-x86_64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.132/opencode-windows-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.133/opencode-windows-x64.zip"
cmd = "./opencode.exe"
args = ["acp"]
2 changes: 1 addition & 1 deletion packages/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/function",
"version": "1.0.132",
"version": "1.0.133",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.0.132",
"version": "1.0.133",
"name": "opencode",
"type": "module",
"private": true,
Expand Down
5 changes: 5 additions & 0 deletions packages/opencode/src/cli/cmd/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ export const GithubRunCommand = cmd({
}

async function getUserPrompt() {
const customPrompt = process.env["PROMPT"]
if (customPrompt) {
return { userPrompt: customPrompt, promptFiles: [] }
}

const reviewContext = getReviewCommentContext()
let prompt = (() => {
const body = payload.comment.body.trim()
Expand Down
Loading