Provider SDK packages accumulate in cache when switching #7369

Open
opened 2026-02-16 18:06:58 -05:00 by yindo · 1 comment
Owner

Originally created by @jerome-benoit on GitHub (Jan 23, 2026).

Originally assigned to: @thdxr on GitHub.

Problem

When a provider changes its SDK package (e.g., switching from @anthropic-ai/sdk to a different package), the old package remains in the cache indefinitely.

Expected behavior

Old packages should be automatically removed when a provider switches to a different SDK.

Proposed solution

Track provider → package mapping in package.json and remove old package on switch.

Originally created by @jerome-benoit on GitHub (Jan 23, 2026). Originally assigned to: @thdxr on GitHub. ## Problem When a provider changes its SDK package (e.g., switching from `@anthropic-ai/sdk` to a different package), the old package remains in the cache indefinitely. ## Expected behavior Old packages should be automatically removed when a provider switches to a different SDK. ## Proposed solution Track provider → package mapping in `package.json` and remove old package on switch.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6765: Infinite installation loop of @aws-sdk/credential-providers on startup - similar issue where old/latest packages aren't cleaned up properly
  • #6774: Plugins with implied latest version don't auto-update on restart - related issue about version tracking and package management

These issues share the root cause of improper version tracking in the package.json cache, which prevents old packages from being cleaned up when dependencies change.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 23, 2026): This issue might be a duplicate of existing issues. Please check: - #6765: Infinite installation loop of @aws-sdk/credential-providers on startup - similar issue where old/latest packages aren't cleaned up properly - #6774: Plugins with implied latest version don't auto-update on restart - related issue about version tracking and package management These issues share the root cause of improper version tracking in the package.json cache, which prevents old packages from being cleaned up when dependencies change. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7369