fix(combos): remove open-sse imports from controlCenter.ts client boundary (#13474) - #13482
Closed
KooshaPari wants to merge 1 commit into
Closed
KooshaPari wants to merge 1 commit into
KooshaPari wants to merge 1 commit into
Conversation
…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
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.
Closes #13474
Problem
controlCenter.tsis imported by the "use client" componentComboControlCenterClient.tsx. PR #13283 added imports ofresolveComboTargetModelStr(open-sse/services/combo/) andresolveProviderAlias(open-sse/services/model.ts) which transitively pull the DB/playwright/sharp chain into the browser bundle, causing 168 Turbopack "Module not found" errors onnpm 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 onmain.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: removeresolveComboTargetModelStrandresolveProviderAliasimports, simplifyproviderFromModel()tests/unit/controlcenter-client-boundary-13474.test.ts: 2 new tests verifying noopen-sse/services/oropen-sse/config/importsAll 2 new tests pass. Existing
combo-control-center.test.tspasses (0 regressions).