fix(deps): upgrade ai-sdk provider family and force-patch @hono/node-server#217
Conversation
WalkthroughUpdated AI SDK dependency ranges in core, removed obsolete AI SDK-related CLI development dependencies, added a root override for ChangesDependency and SDK warning updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 48-50: Update the package.json overrides entry for
`@hono/node-server` to remain within the `@modelcontextprotocol/sdk-supported`
^1.19.9 range, or add an MCP integration test that validates compatibility with
the 2.x override; do not retain the current unsupported override without
coverage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 26abeb00-14ca-4285-b324-64e9cae84c71
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonrunners/cli/ui/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
core/package.jsonpackage.jsonrunners/cli/package.json
…tible is on-spec The `@ai-sdk/openai-compatible` bump in this PR (v1 -> v2, LanguageModelV2/V3) aligns it with ai@6, so the global AI_SDK_LOG_WARNINGS spec-compatibility warning no longer fires. The suppression was dead code (and its comment stale/misleading); verified no AI SDK warning surfaces via providerFactory tests + full build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…audit # Conflicts: # package-lock.json
The @ai-sdk/* providers, ai, yaml and zod are already runtime dependencies of @keyvaluesystems/agent-opfor-core, which the cli bundle inlines via esbuild. Re-declaring them in the cli forced version bumps in two places (as this PR did). Removed the 9 duplicates; kept the direct imports, build tooling, and core's optional anthropic peer deps. Verified with a clean build, typecheck and opfor smoke run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Resolves the remaining Dependabot-flagged vulnerabilities that couldn't be fixed by a plain
npm audit fix:@ai-sdk/anthropic,@ai-sdk/google,@ai-sdk/openai,@ai-sdk/openai-compatible: bumped from 2.x/1.x to theai-v6-tagged 3.x/2.x releases (matching the major generation ourai@^6.0.0dependency already uses), which resolves the@ai-sdk/provider-utilsuncontrolled resource consumption issue (GHSA-866g-f22w-33x8). Deliberately chosen overnpm audit fix --force, which would have jumped two majors to 4.x and also silently downgraded@anthropic-ai/claude-agent-sdk.@hono/node-server: added anoverridesentry pinning it to^2.0.5, since@modelcontextprotocol/sdk's own declared range (^1.19.9) excludes the patched 2.x line (GHSA-frvp-7c67-39w9). Verified this package isn't even reachable in our own code paths (we useStdioServerTransport/StreamableHTTPClientTransport, not the MCP SDK's HTTP-server transport that pulls this in), so risk was already low — this closes the alert regardless.Follow-up cleanup in
core/src/providers/factory.ts: removed the globalAI_SDK_LOG_WARNINGS = falsesuppression. It existed only because the old@ai-sdk/openai-compatible@1.ximplemented an older provider spec thanai@6and warned on every model instance. With the v2 bump in this PR that mismatch is gone, so the suppression is now dead code (and its comment stale) — dropping it also stops silently muting genuine AI SDK warnings for all other providers.Follow-up cleanup in
runners/cli/package.json: dropped the 9@ai-sdk/*,ai,yamlandzodentries that were duplicated fromcore. These are already runtimedependenciesof@keyvaluesystems/agent-opfor-core, which the CLI bundle inlines via esbuild (they resolve from the hoisted install), and the CLI's own source imports none of them directly — re-declaring them only forced the version bumps above to be made in two places. Kept the CLI's direct imports, build tooling, and core's optional@anthropic-ai/*peer deps. This aligns the CLI with how the MCP/SDK runners already work. Verified with a cleannpm run build,npm run typecheck, and anopforsmoke run.Also includes an unrelated stray version sync in
runners/cli/ui/package-lock.json(0.10.0 → 0.10.1) picked up during the dependency install.Resolves: https://github.com/KeyValueSoftwareSystems/agent-opfor/security/dependabot/59, https://github.com/KeyValueSoftwareSystems/agent-opfor/security/dependabot/65, https://github.com/KeyValueSoftwareSystems/agent-opfor/security/dependabot/20
Test plan
npm run build,npm run typecheck,npm run lint,npm run format:checkall passnpm testpasses (163/163) — re-verified after removing the warning suppression;providerFactorytests instantiate the groq + openai-compatible models and noAI SDK Warningline surfacesnpm audit— down to 1 pre-existing low-severity, unfixable-without-breaking issue (esbuild, pinned bytsx)opfor runend-to-end withopenaiandopenai-compatibleattacker LLMsopfor hunt(autonomous mode)opfor runagainst a live MCP target (remote server)initialize+tools/list) responds correctlyanthropic/googleattacker LLM providers verified by typecheck only (no live call) — no test API keys available for this pass; recommend a live smoke test by someone with those keys before/after mergeSummary by CodeRabbit