Skip to content

Add expert combo configuration mode - #1547

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.0from
rdself:coder/combo-config-mode
Apr 24, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.0from
rdself:coder/combo-config-mode

Conversation

@rdself

@rdself rdself commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an Appearance setting for combo configuration mode with Guided as the default and Expert as an opt-in mode.
  • Reuse the existing combo form to render Expert mode as a single-page editor without wizard progress, recommendations, or helper prompts.
  • Add manual expert model entry for provider-qualified model names such as cx/gpt-5.5 and openrouter/openai/gpt-5.5, using dynamic account selection.
  • Disable cooldown-aware request retry for combo live tests so a single failed test does not fan out into multiple 503 retry attempts.
  • Align the isolated production build with the repository's webpack path and remove the stale compiled src/lib/dataPaths.js artifact that shadowed the TypeScript source during builds.

Impact

  • Existing users stay on the current guided combo builder by default.
  • Advanced users can switch to Expert mode from Appearance and edit all combo fields in one page.
  • Combo health tests now report the first real upstream failure instead of replaying through global cooldown retry settings.

Validation

  • git diff --check
  • node --import tsx/esm --test tests/unit/combo-builder-draft.test.ts tests/unit/settings-schema-routing-strategies.test.ts tests/unit/db-settings-crud.test.ts
  • node --import tsx/esm --test --test-force-exit tests/unit/chat-combo-live-test.test.ts
  • vitest run src/app/api/settings/__tests__/settings.test.ts
  • tests/e2e/combos-flow.spec.ts
  • tsc --pretty false -p tsconfig.typecheck-core.json
  • scripts/build-next-isolated.mjs

Copilot AI review requested due to automatic review settings April 24, 2026 01:35
@rdself
rdself requested a review from diegosouzapw as a code owner April 24, 2026 01:35

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.

Pull request overview

Adds an opt-in “Expert” combo configuration mode (defaulting to Guided) that reuses the existing combo builder UI as a single-page editor, supports manual provider-qualified model entry, and adjusts combo live-test behavior to avoid cooldown-aware retry fan-out.

Changes:

  • Introduces comboConfigMode setting (guided/expert) with validation, defaults, and UI control in Appearance settings.
  • Updates the combos create/edit modal to support an expert single-page layout and manual model entry (with provider alias resolution).
  • Disables cooldown-aware request retry for combo live tests and aligns isolated Next build bundler selection.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/settings-schema-routing-strategies.test.ts Adds coverage for comboConfigMode schema validation.
tests/unit/db-settings-crud.test.ts Asserts comboConfigMode default is exposed via settings DB API.
tests/unit/combo-builder-draft.test.ts Adds unit tests for manual model parsing + provider alias resolution.
tests/unit/chat-combo-live-test.test.ts Verifies combo live tests don’t perform cooldown-aware retries on upstream 503s.
tests/e2e/combos-flow.spec.ts Adds E2E coverage for expert mode single-page form + manual model entry.
src/sse/handlers/chat.ts Disables cooldown-aware retry when forceLiveComboTest is active.
src/shared/validation/settingsSchemas.ts Allows comboConfigMode in settings route schema.
src/shared/validation/schemas.ts Allows comboConfigMode in shared settings schema.
src/shared/constants/comboConfigMode.ts Adds constants + normalization helper for combo config mode.
src/lib/db/settings.ts Adds comboConfigMode: "guided" to defaults.
src/lib/dataPaths.js Removes stale compiled artifact.
src/lib/combos/builderDraft.ts Adds manual model step builder + provider-id resolution helper.
src/app/api/settings/tests/settings.test.ts Adds API test ensuring PATCH updates comboConfigMode.
src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx Adds Appearance UI for selecting guided vs expert combo mode.
src/app/(dashboard)/dashboard/combos/page.tsx Fetches comboConfigMode and renders expert-mode single-page combo form + manual model input.
scripts/build-next-isolated.mjs Adds bundler flag selection for isolated Next builds.
README.md Updates documentation wording to mention guided vs expert builder + direct model entry.

Comment thread src/lib/combos/builderDraft.ts Outdated
);
});

return toTrimmedString(matchedProvider?.providerId) || normalizedProviderId;

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

resolveComboBuilderProviderId currently falls back to returning the raw providerIdOrAlias when it doesn’t match any entry in providers. That means buildManualComboModelStep can produce steps for unknown providers (e.g. foo/bar), which will later fail during model resolution/execution and lets users save broken combos.

Consider returning null when no provider match is found (or adding an explicit allowUnknownProvider flag defaulting to false) so the UI can surface a clear “unknown provider” validation error instead of creating an invalid step.

Suggested change
return toTrimmedString(matchedProvider?.providerId) || normalizedProviderId;
return toTrimmedString(matchedProvider?.providerId) || null;

Copilot uses AI. Check for mistakes.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces an "Expert Mode" for the Combo Builder, allowing users to view all configuration options on a single page and manually enter models. The changes span the UI, settings management, and backend validation, supported by new E2E and unit tests. Review feedback points out that hiding the readiness panel and validation error messages in Expert mode may cause confusion when the "Save" button is disabled, as users will lack feedback on which validation rules are failing.

Comment on lines +3307 to +3311
{!isExpertMode && (
<>
<div className="mt-2">
<ComboReadinessPanel checks={readinessChecks} blockers={saveBlockers} />
</div>

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.

medium

In Expert mode, the ComboReadinessPanel is hidden. While Expert mode aims to reduce clutter, this panel provides a critical summary of whether the combo is valid (e.g., weights totaling 100%, pricing coverage). Without it, users may find the "Save" button disabled without a clear indication of which validation rule is failing, especially since the review stage is also skipped.

)}

{builderStage !== "review" && !canAdvanceFromCurrentStage && (
{!isExpertMode && builderStage !== "review" && !canAdvanceFromCurrentStage && (

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.

medium

The validation warning message is currently hidden in Expert mode. This message is essential for providing feedback when the "Save" button is disabled due to validation errors (like an invalid name or missing steps). Hiding it in Expert mode degrades the user experience as it leaves the user guessing why they cannot persist their changes.

Suggested change
{!isExpertMode && builderStage !== "review" && !canAdvanceFromCurrentStage && (
{(isExpertMode || (builderStage !== "review" && !canAdvanceFromCurrentStage)) && (

@rdself
rdself force-pushed the coder/combo-config-mode branch from 1d90c80 to 5d33a79 Compare April 24, 2026 01:53
@rdself
rdself force-pushed the coder/combo-config-mode branch from 5d33a79 to 4137ec3 Compare April 24, 2026 05:18
@diegosouzapw
diegosouzapw merged commit 4f6f97b into diegosouzapw:release/v3.7.0 Apr 24, 2026
2 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Apr 25, 2026
@rdself
rdself deleted the coder/combo-config-mode branch April 26, 2026 21:04
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 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.

3 participants