Repository navigation
chore: patch security advisories, report non-cached input tokens (#146), refresh model data - #147
Merged
Merged
Conversation
…t from real home - @cursor/sdk ^1.1.0, @opencode-ai/plugin + sdk ^1.19.4, vitest ^5.0.5 (vite 8.3.5, @vitest/mocker 5.0.5), postcss -> source-map-js 1.2.2 - overrides: zod ^4.6.6 under @opencode-ai/plugin, toml ^5.0.1; drop the undici override (no longer in the tree) - mcp-config test: mock homedir so the config hook's skill mirror does not read the developer's real skills (crashed pluginLog on machines with skills)
…146) Cursor's inputTokens already includes cache reads/writes, so it stays the V3 inputTokens.total. noCache was left undefined; opencode 2.x reads it directly, so input showed as 0 and was never priced. Derive it as inputTokens - cacheRead - cacheWrite (clamped at 0) and pass the turn's reasoningTokens through as outputTokens.reasoning.
Weekly drift check failed on main. claude-sonnet-5-5 cache read 0.2 -> 0.1; gemini-3.7/3.8-flash output 3.5 -> 3.75.
This was referenced Oct 28, 2026
Merged
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.
Summary
Patches the open security advisories, fixes the missing non-cached input tokens from #146, and regenerates the model data so the weekly drift check passes again. Supersedes Dependabot PRs #139, #143 and #144.
Security (
npm audit: 10 findings → 0)@cursor/sdk1.0.32 → 1.1.0,@connectrpc/connect-node→ 2.3.0@opencode-ai/plugin+@opencode-ai/sdk→ 1.19.4vitest→ 5.0.5 (vite 8.3.5,@vitest/mocker5.0.5), which clears the vite / launch-editor / mocker advisoriessource-map-js→ 1.2.2, through a postcss refreshzod^4.6.6under@opencode-ai/plugin(GHSA-mrhx-c7xc-m3w5)toml^5.0.1(GHSA-4qx8-w7c3-pj3p, GHSA-9j65-hcg3-gc64, GHSA-9qmh-m7c6-f92p).effectonly uses toml inunstable/cli.undicioverride: nothing in the tree depends on undici any more.@cursor/sdk's peer range for zod is^3.25.0 || ^4.0.0, so it now dedupes to zod 4.6.7.@opencode-ai/plugin's pinned versions until upstream bumps them.@ai-sdk/provider4.Fix: non-cached input tokens (#146)
opencode showed 0 input tokens for Cursor models, so that input was never priced. The cause differs from the one in the issue:
inputTokensalready includes cache reads and writes.@cursor/sdk'stoTokenUsagecomputestotalTokens = inputTokens + outputTokens, and Cursor staff confirmed the same for hook payloads. SoinputTokens.totalwas already correct.noCachewas leftundefined. opencode 2.x reads it directly as the non-cached input, so input came out as 0.noCache = inputTokens − cacheRead − cacheWrite, clamped at 0. The turn's optionalreasoningTokenspasses throughaddUsagetooutputTokens.reasoning.Model data
Regenerated
src/model-limits.tswithnpm run sync:model-limits, because the scheduled drift check was failing on main:Test fix
test/mcp-config.test.tsfailed 6 tests on main on any machine with global skills installed. The config hook's skill mirror read the real home directory, and its warning crashedpluginLogon the fake client. The test now mockshomedirto a temp dir, the same wayplugin-skill-mirror.test.tsdoes.Verification
npm run prepublishOnly: typecheck clean, 42 files / 646 tests pass, build OKnpm audit: 0 vulnerabilitiesnpm run sync:model-limits -- --check: up to dateCloses #146