feat: compact and other improvements#1
Merged
adamdotdevin merged 8 commits intodevfrom May 2, 2025
Merged
Conversation
aryasaatvik
added a commit
to aryasaatvik/opencode
that referenced
this pull request
Jun 27, 2025
## Summary This PR implements dual model support (main + turbo) for cost-optimized operations and adds model sorting functionality. ### Key Changes #### Dual Model Support - Added `turbo_model` and `turbo_cost_threshold` config options - New dual-pane model selector (Tab to switch panes) - Visual indicators: ⚡ (turbo), 🧠 (reasoning), 🔧 (tools) - Smart turbo model selection with fallback logic - Fixed Anthropic auth showing incorrect turbo status #### Model Sorting - Added `release_date` and `last_updated` fields to model schema - Press 'S' to cycle through sort modes: Name, Last Updated, Release Date - Stable multi-level sorting with consistent ordering - Helps discover newest models and track updates ### Impact Enables cost optimization for PRs anomalyco#269 (status verbs) and anomalyco#275 (window titles) to use configured turbo models instead of hardcoded ones. ### Demo https://github.com/user-attachments/assets/d076e840-d790-4e23-8cf7-a179282d1f0b
rekram1-node
pushed a commit
to drevantonder/opencode
that referenced
this pull request
Aug 31, 2025
Closed
This was referenced Nov 3, 2025
charles-cooper
pushed a commit
to charles-cooper/opencode
that referenced
this pull request
Dec 14, 2025
…ompaction feat: intelligent compaction with model-initiated trigger, handoff prompts, and persistent memory
adolago
referenced
this pull request
in adolago/zee
Jan 11, 2026
- Add VoyageEmbeddingProvider for Voyage AI embeddings - Add MemoryStore with high-level store/search/list API - Configure Nebius cloud API for Qwen3-Embedding-8B (#1 on MTEB) - Fix LocalEmbeddingProvider to support both /v1/embeddings and /embeddings - Fix QdrantVectorStorage to set collection on existing collections Model: Qwen3-Embedding-8B (70.58 MTEB score, 99% zero-shot, 4096 dims) Provider: Nebius API (https://api.tokenfactory.nebius.com/v1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 task
kitlangton
added a commit
that referenced
this pull request
Apr 16, 2026
…ions Add oxlint-tsgolint for type-aware linting and enable the no-floating-promises rule. Fix all 177 unhandled promise warnings by adding `void` to intentional fire-and-forget calls (Bus.publish, clipboard, cleanup, async callbacks in sync contexts). This rule prevents silently dropped promise rejections — the #1 async bug pattern in TypeScript codebases.
kitlangton
added a commit
that referenced
this pull request
Apr 16, 2026
…ions Add oxlint-tsgolint for type-aware linting and enable the no-floating-promises rule. Fix all 177 unhandled promise warnings by adding `void` to intentional fire-and-forget calls (Bus.publish, clipboard, cleanup, async callbacks in sync contexts). This rule prevents silently dropped promise rejections — the #1 async bug pattern in TypeScript codebases.
6 tasks
cychong87
pushed a commit
to cychong87/opencode
that referenced
this pull request
Apr 24, 2026
Pre-ship code review surfaced issues. Highest severity first:
1. P2 false-positive on bare package name inside sibling scoped name
(routing-correctness bug, fix in scorer.ts)
On the opencode repo, the prompt "update @opencode-ai/app" was firing
P2=2 because the bare name "opencode" (from packages/opencode/package.json)
matched via \bopencode\b inside "@opencode-ai/app" — @ and - both count
as word boundaries. That inflated C4 (cross-package breadth) from 0 to 2
and pushed a single-package prompt toward coordinator. Concrete case:
"update all the handlers in @opencode-ai/app" went from primary=0.91
(lean-single) to primary=2.12 (lean-coordinator) purely on the false
second match.
Fix: widen the boundary class for non-scoped, non-common-word packages
from \b to (?<![a-zA-Z0-9_@/\\-])name(?![a-zA-Z0-9_@/\\-]). Keeps legit
bare matches like "fix the opencode setup" working; blocks matches
inside scoped siblings and slash-path contexts. Regression test added
in scorer-prompt.test.ts.
2. inherit.ts held a duplicate copy of mutationVerbs (maintenance hazard)
Inheritance archetype classification would silently disagree with the
main scoring if the lists drifted. Almost happened with translate/rewrite.
Fix: import mutationVerbs from weights.json, delete the local constant.
3. readPyprojectName subtable + CRLF tests
Reviewer flagged [project.urls]-before-[project] as a potential hole.
Traced through the code — it works correctly. Added 3 regression tests
(subtable-before, subtable-after, CRLF) to prove it stays that way.
4. build-classifier silent fallback on malformed modelRef
If a user sets tiebreaker.modelRef to "claude-haiku" (no slash), the
loader silently falls back to the default model. Now sets
LAST_CLASSIFIER_ERROR so `opencode debug router --full` surfaces the
misconfiguration.
5. Drift test cleanup robustness
Replaced .catch(() => {}) with fs.rm force:true to prevent a failed
cleanup silently leaving _drift_test_dir behind (which would mutate the
shared tmpWorkspace fingerprint for subsequent tests).
6. tuiEmit test fixture signature matches AnnounceOptions
Trivial — added _variant arg so a future 3rd required arg breaks at
compile time instead of runtime.
Deferred:
- Reviewer flagged "add" substring matching "address" — same shape as the
P2 issue, but for mutation verbs. Fixing it requires either word-boundary
matching (loses inflection like "refactoring" matching "refactor") or
curated inflection lists. Behavior change with calibration impact —
logged as future work.
- Reviewer's Critical anomalyco#1 (debug router C-signal display) — verified
empirically to be incorrect. Debug output agrees with route() in all
cases where route() computes non-zero C-signals, because P2 fires
whenever any package matches and the debug filter re-runs the same
matcher.
Router tests: 210 -> 214. Typecheck green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
|
Just wanted to say thanks for building this awesome tool! Beer on me next time we're in the same city. (Not a bug report - just appreciation for a great product!) |
viniraioli
referenced
this pull request
in viniraioli/opencode
Apr 27, 2026
5 tasks
zoulukuang
pushed a commit
to zoulukuang/deskfox
that referenced
this pull request
May 3, 2026
bootstrap 元改动:装 fork 自用的跨平台配置和 git 护栏,让后续所有 feature 分支继承。零触碰 upstream 源码。 新增文件: - .gitattributes 全仓 EOL=LF + Windows 脚本 CRLF + 二进制标记 - .husky/pre-commit 3 道护栏(白名单/diff阈值200/大小写冲突) - scripts/install-hooks.sh husky 验证脚本 - 改动日志.md 本仓改动记录簿,含 anomalyco#1 本次记录 baseline: upstream-baseline 关联: 改动日志.md anomalyco#1 回归点: R1-R4 影响范围: 上游源码零影响;hook 在下次 bun install (husky prepare) 后生效 例外说明:本次直 push 到 dev 而非 feature 分支,理由 = bootstrap, 必须进 dev 让所有未来 feature 分支继承本配置。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zoulukuang
pushed a commit
to zoulukuang/deskfox
that referenced
this pull request
May 3, 2026
anomalyco#1 Rust write_text_file 接 root+path 用 PathBuf::join,因为 opencode 的 pathFromTab 返回相对 workspace root 的路径, 之前直接传给 std::fs::write 会相对进程 cwd 解析失败 (Phase 2 时用绝对路径测试,没暴露此 bug) anomalyco#2 saveEdit 写盘成功后 await file.load(p, { force: true }) 强制从磁盘重读,否则 UI 显示改前 stale 内容 user 已亲验 anomalyco#1 修复("保存生效"),anomalyco#2 待本 commit rebuild 后验。 详见 改动日志.md anomalyco#4。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
zoulukuang
pushed a commit
to zoulukuang/deskfox
that referenced
this pull request
May 3, 2026
GetBot 接入(feat-id: getbot-接入)开发过程暴露 v1 规范痛点:改动日志单条 9 段必填仪式重、
planning + execution + record 混在一条不利追溯、200 行阈值导致 [large-diff] 频繁覆盖、
sprite/types 当黑名单造成误报。
主要改动:
- .husky/pre-commit: 200 → 500;EXCEPTION_REGEX 豁免 packages/ui/src/components/provider-icons/{sprite.svg,types.ts}
- CLAUDE.md: "完整文档链路"段重写,加三文档结构 + commit message 加 [feat: <feat-id>] 格式 + 改动规模分级(tiny/medium/large);末尾加"规范修订记录"段
- 新建 docs/features/INDEX.md 作为 feature 池总索引
- 新建 docs/features/规范-v2/{1-spec,2-plan,3-changelog}.md(本笔修订自身的三文档,首笔 v2 commit 同时落地)
老的 R1-R4 / P1-P5 / 健康指标不变,改动日志.md 老条目 anomalyco#1-anomalyco#12 保留不动(向后兼容)。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
zoulukuang
pushed a commit
to zoulukuang/deskfox
that referenced
this pull request
May 3, 2026
- docs/features/规范-v2/3-changelog.md 关联 commit 回填 1b669ab - docs/features/getbot-接入/3-changelog.md 关联 commit 回填 8e4aa39 - 改动日志.md 顶部加"规范 v2 起的索引"段,列出 getbot-接入 + 规范-v2 两笔 feature 入口 老条目 anomalyco#1-anomalyco#12 保留不动(规范 v1 时期记录,向后兼容)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
zoulukuang
pushed a commit
to zoulukuang/deskfox
that referenced
this pull request
May 3, 2026
…/history/ [feat: changelog-archive-pre-v2] [large-diff: 990 行内容文件间挪动,无新内容] 改动日志.md 1115 行 → 128 行(-990 行 / 88% 瘦身)。 - v1 时期(2026-04-23 → 2026-04-26)anomalyco#1-anomalyco#12 详细条目迁到 docs/history/changelog-pre-v2.md,只读保留 - 改动日志.md "改动记录" section 替换为 pointer + v2 时期约定说明 - 索引表(规范 v2 起)和仓库基线信息段 不动 不动其他索引行(用户决定不做激进精简)。
1 task
dgokeeffe
referenced
this pull request
in dgokeeffe/opencode-databricks
May 6, 2026
Adds AI Gateway as a first-class surface alongside the existing
/serving-endpoints path. On startup, probe /ai-gateway/anthropic/v1/models
once: 200 → use AI Gateway URLs and the official per-family adapters
(@ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/openai); 404 → fall back to
model-serving with the bundled provider for GPT (current behavior).
Surface can be forced via provider.databricks.options.surface =
"auto" | "ai-gateway" | "model-serving" (default "auto"). Token refresh is
automatic on both paths because databricksFetch calls
dbConfig.authenticate(headers) per request — no background thread needed.
Two new SSE quirks surfaced on the AI Gateway path that the bundled
provider had been hiding (because @databricks/ai-sdk-provider only reads
output_item.done, not the full lifecycle):
1. Item IDs up to ~192 chars exceed OpenAI's 64-char Responses cap.
Truncate id/item_id/call_id deterministically (slice 0..64) in the SSE
patcher so cross-event correlation still works.
2. AI Gateway emits response.output_item.added with one item id and
response.content_part.added / response.output_text.delta for the same
output_index with a DIFFERENT item id, breaking @ai-sdk/openai's text
part correlation ("text part not found"). Track item id per
output_index in a map that persists across TransformStream invocations
and rewrite mismatched item_id fields on dependent events.
Also extend the transform.ts itemId-stripping workaround for #1 to handle
both providerOptions.databricks.itemId (model-serving) and
providerOptions.openai.itemId (AI Gateway), gated on useResponsesApi
rather than on the bundled provider's npm.
GPT routing on the gateway path uses @ai-sdk/openai's responses() against
/ai-gateway/codex/v1, which means the lifecycle/dedupe middleware in
session/llm.ts is inert on that path (already gated on
npm === "@databricks/ai-sdk-provider").
Verified:
Model Serving (logfood) — test-databricks-3-classes.sh passes 3/3 with
no regression.
AI Gateway (aigw workspace) — Claude sonnet-4-6 and GPT-5.5 both
complete tool-use roundtrips, persisted assistant messages have proper
tool parts with completed status, callIDs, and tool outputs.
Co-authored-by: Isaac
dgokeeffe
referenced
this pull request
in dgokeeffe/opencode-databricks
May 6, 2026
…co#12) and surface adoption note The fork now auto-detects AI Gateway and routes per-family (Anthropic native / Gemini native / @ai-sdk/openai-Responses-on-codex) when available, bypassing @databricks/ai-sdk-provider entirely. Two new server-side quirks surfaced once we did: 11. Item IDs up to ~192 chars exceed OpenAI's 64-char Responses cap, causing string_above_max_length 400s on multi-turn echo. 12. response.output_item.added's item.id and the subsequent content_part.added/output_text.delta item_id are not stable for the same output_index, breaking @ai-sdk/openai's text-part correlation with "text part not found". Both were always present on the wire — the bundled provider was hiding them by only reading output_item.done. Note in the bigger-picture section that fixing the bundled provider's lifecycle (asks #1) without also fixing anomalyco#11/anomalyco#12 server-side just shifts the failure to every other AI-SDK v3 consumer; treat as a single workstream. Co-authored-by: Isaac
dgokeeffe
referenced
this pull request
in dgokeeffe/opencode-databricks
May 6, 2026
…xTools cap Add script/probe-aigw-quirks.ts — a reproducible per-family test of every catalogued quirk against AI Gateway, run once and committed so future sessions can re-verify in seconds. Replaces the partly-inferred AI Gateway status column with on-the-wire evidence. Findings (running against the aigw workspace, Claude / GPT / Gemini where applicable): #1 schema strict — STILL ACTIVE on all 3 families (server-side, harmless to opencode because our adapters generate proper schemas) #2/anomalyco#11 oversized itemId — STILL ACTIVE (GPT only) anomalyco#3 asymmetric streaming events — GONE (perfectly symmetric on aigw) anomalyco#4 reasoning_effort — works correctly (reasoning_tokens returned) anomalyco#5 cache_control — works correctly (verified with two-call populate+hit test; my earlier "fail" reading was a 1212-token prompt under the effective cache threshold) anomalyco#6 task=null on Codex/GPT-5 metadata — GONE (all 3 families now return task: "llm/v1/chat" correctly) anomalyco#7 finish_reason "other" — STILL ACTIVE (GPT) anomalyco#8 per-endpoint 89-tool cap — GONE on AI Gateway (verified all 3 families accept 89 tools; cap was a model-serving constraint) anomalyco#9, anomalyco#10 npm package lifecycle bugs — INERT on AI Gateway (we use @ai-sdk/openai, bundled provider not loaded) anomalyco#12 mismatched item IDs — STILL ACTIVE (GPT) Net: of 12 quirks, 4 still bite on AI Gateway (#1, #2/anomalyco#11, anomalyco#7, anomalyco#12), 4 are gone (anomalyco#3, anomalyco#6, anomalyco#8, plus anomalyco#4 always worked), anomalyco#5 works correctly, and 2 are bypassed by adapter choice. Anthropic and Gemini paths through @ai-sdk/anthropic and @ai-sdk/google are clean on AI Gateway. Code change consequence: drop the maxTools: 16 cap in familyDefaults for gpt/codex when on the AI Gateway path (anomalyco#8 is gone there). Cap stays on the model-serving path. 3-class regression test passes 3/3 on both surfaces after the change. Doc: replace the inferred AI Gateway status column with the empirical matrix, citing the probe script and the specific evidence per quirk. Co-authored-by: Isaac
dgokeeffe
referenced
this pull request
in dgokeeffe/opencode-databricks
May 6, 2026
…os for every quirk Every claim in the feedback doc is now backed by a self-contained reproduction: curl commands for the on-the-wire bugs (#1, #2/anomalyco#11, anomalyco#3, anomalyco#5, anomalyco#6, anomalyco#7, anomalyco#8, anomalyco#12) and a small Node script for the in-package bugs (anomalyco#9/anomalyco#10). PM-team recipients only need a Databricks token; no opencode checkout required. Also link the new doc from the main feedback markdown so anyone who opens the PDF sees the standalone-repro path right after the versions-tested header. Co-authored-by: Isaac
zoulukuang
added a commit
to zoulukuang/deskfox
that referenced
this pull request
May 7, 2026
… md-export-pdf-word] [override-blacklist: bun.lock 自动重生 — 本 feat 范围内一次性] bun install 触发的 lockfile 自动重排(3453 ins / 3417 del),不是手动改。 wrapper 不可行性:bun.lock 是 bun 工具链生成,无法 wrapper / 改写;所有"加 dep" feat 都触动。 风险:0(纯 lockfile 重排,运行时行为不变,内容是依赖树规范化)。 本笔 R4 override 范围:仅本 feat anomalyco#1 commit 一笔;后续 anomalyco#2/anomalyco#3/anomalyco#4 不再触动 lockfile。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.