diff --git a/frontend/e2e/best-setup-ux.spec.ts b/frontend/e2e/best-setup-ux.spec.ts index 1a0c6c51..beb541ee 100644 --- a/frontend/e2e/best-setup-ux.spec.ts +++ b/frontend/e2e/best-setup-ux.spec.ts @@ -41,6 +41,20 @@ function candidate(candidateId: string, modelId: string) { runtime_name: null, runtime_version: null, runtime_config_digest: null, + generation_parameter_domains: [ + { + ...API_IDENTITY, + name: modelId === "model-a" ? "temperature" : "top_p", + kind: "float", + scope: "request_generation", + source: "local_llm_server", + provenance: "registry_declared", + minimum: modelId === "model-a" ? 0 : 0.1, + maximum: modelId === "model-a" ? 2 : 1, + step: 0.1, + values: [], + }, + ], source: "configured", }; } @@ -357,6 +371,16 @@ test("J0 campaign: four-stage setup executes and produces policy-backed results" page.getByText("will not invent sweep domains", { exact: false }).first(), ).toBeVisible(); await expect(page.getByRole("radio", { name: /Single configuration/ })).toBeChecked(); + await page.getByText("Customize parameters (advanced)", { exact: true }).click(); + await expect(page.getByText("Declared request domains by model", { exact: true })).toBeVisible(); + await expect(page.getByText("temperature", { exact: true })).toBeVisible(); + await expect(page.getByText("0 → 2 · step 0.1", { exact: false })).toBeVisible(); + await expect(page.getByText("top_p", { exact: true })).toBeVisible(); + await expect(page.getByText("0.1 → 1 · step 0.1", { exact: false })).toBeVisible(); + await expect( + page.getByText("does not combine model-specific domains", { exact: false }), + ).toBeVisible(); + await expect(page.getByRole("radio", { name: /Quick/ })).toBeDisabled(); await page.getByRole("button", { name: "Continue" }).click(); await expect(page.getByRole("heading", { name: "Review your evaluation" })).toBeVisible(); diff --git a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx index fa592ed2..0cc221da 100644 --- a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx +++ b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx @@ -7,6 +7,7 @@ import type { CampaignPlanningContextReadModel, CampaignSearchStrategy, CampaignTargetPlanningReadModel, + GenerationParameterDomainReadModel, } from "../../api"; import { AppShell, @@ -60,6 +61,16 @@ function formatDuration(seconds: number | null, reason: string) { return `~${Math.max(1, Math.round(seconds / 60))} min`; } +function formatDeclaredDomain(domain: GenerationParameterDomainReadModel) { + if (domain.kind === "boolean") { + if (!domain.values.length) return "Values unavailable"; + return domain.values.map(String).join(" / "); + } + if (domain.minimum === null || domain.maximum === null) return "Bounds unavailable"; + const step = domain.step === null ? "" : ` · step ${domain.step}`; + return `${domain.minimum} → ${domain.maximum}${step}`; +} + export function FindBestSetupView({ context, onManualTest, @@ -207,6 +218,10 @@ export function FindBestSetupView({ const customOption = target?.configuration_search_options.find( (option) => option.strategy === "custom", ); + const selectedCandidates = + target?.candidates.filter((candidate) => + candidateIds.includes(candidate.candidate_id), + ) ?? []; const showFixedFallback = Boolean( fixedOption?.available && primaryOptions.every((option) => !option.available), ); @@ -467,11 +482,44 @@ export function FindBestSetupView({ : "No request-level parameter capability list was reported for this target."}
- Bounded search ranges:{" "} + Combined target-level search ranges:{" "} {target.bounded_generation_parameter_ranges.length ? target.bounded_generation_parameter_ranges.join(", ") - : "None reported"} + : "Not derived from model-specific domains"} +
+ ++ Read-only backend evidence for the selected models. Performance Lab does not + combine model-specific domains or enable a sweep until the search strategy + defines an exact deterministic configuration matrix.
+ {selectedCandidates.map((candidate) => ( +No canonical bounded request-generation domains are available.
+ )} +