Skip to content

fix(combos): remove open-sse imports from controlCenter.ts client boundary (#13474) - #13482

Closed
KooshaPari wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
KooshaPari:pr/13474-controlcenter-client-boundary
Closed

KooshaPari wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
KooshaPari:pr/13474-controlcenter-client-boundary

Conversation

@KooshaPari

Copy link
Copy Markdown
Contributor

Closes #13474

Problem

controlCenter.ts is imported by the "use client" component ComboControlCenterClient.tsx. PR #13283 added imports of resolveComboTargetModelStr (open-sse/services/combo/) and resolveProviderAlias (open-sse/services/model.ts) which transitively pull the DB/playwright/sharp chain into the browser bundle, causing 168 Turbopack "Module not found" errors on npm run build:release.

Fix

Remove both open-sse imports and simplify providerFromModel() to extract the provider prefix directly from the model string (slash-delimited). This matches the approach already taken on main.

The label accuracy trade-off (no alias resolution in the control center display) is acceptable -- the control center shows the prefix the caller used, not the resolved upstream id.

Changes

  • src/lib/combos/controlCenter.ts: remove resolveComboTargetModelStr and resolveProviderAlias imports, simplify providerFromModel()
  • tests/unit/controlcenter-client-boundary-13474.test.ts: 2 new tests verifying no open-sse/services/ or open-sse/config/ imports

All 2 new tests pass. Existing combo-control-center.test.ts passes (0 regressions).

…ndary (diegosouzapw#13474)

controlCenter.ts is imported by the "use client" component
ComboControlCenterClient.tsx. PR diegosouzapw#13283 added imports of
resolveComboTargetModelStr (open-sse/services/combo/) and
resolveProviderAlias (open-sse/services/model.ts) which transitively
pull the DB/playwright/sharp chain into the browser bundle, causing
168 Turbopack "Module not found" errors on npm run build:release.

Fix: remove both open-sse imports and simplify providerFromModel() to
extract the provider prefix directly from the model string (slash-
delimited). This matches the approach already taken on main.

The label accuracy trade-off (no alias resolution in the control
center display) is acceptable — the control center shows the prefix
the caller used, not the resolved upstream id.

Changes:
- src/lib/combos/controlCenter.ts: remove resolveComboTargetModelStr
  and resolveProviderAlias imports, simplify providerFromModel()
- tests/unit/controlcenter-client-boundary-13474.test.ts: 2 new tests
  verifying no open-sse/services/ or open-sse/config/ imports

Fixes diegosouzapw#13474
Copilot AI lite review requested due to automatic review settings September 12, 2026 23:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KooshaPari KooshaPari closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: release/v3.8.51 no longer builds: #13283 makes a "use client" module import the DB/playwright chain

2 participants