Conversation
…nds prices on unmapped ones
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — Clearing a model mapping across environments no longer requires prices in environments already using automatic pricing. Those environments generate no settings change, keeping the additional exposure limited. Needs human approval because:
Notes:
You can add or adjust custom eligibility rules. Learn more. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web app, Chromium, 1280×800, light theme; fresh databases and two writable real servers labelled Scenario. Pair two writable environments. Open Usage → All environments → Model prices. Select only one environment, add example → example-model without prices, and save. Select All environments, fill Map to with example-model, select all and Backspace without editing prices. Inspect Save changes; on head, save and verify both environments have no example alias or price override. Scenario: Clearing a mixed mapping keeps automatic pricesProven: the scenario fails on base ab091dfedd and passes on head 53d0013010.
| Interaction recording (⅓ speed) | Before | After | Scenario source. The automatic failure screenshot was taken after second-server teardown; the paired screenshot above captures the actual assertion state. |



Problem
In Usage → All environments → Model prices, clearing an existing mapping can demand an input price on another selected environment that already uses automatic pricing. The row error disables Save changes even though the unmapped environment needs no write.
Deterministic repro on
origin/main(54e81819cbe825bfa36808c783c84758890e4ca0)vp test run apps/web/src/components/usage/usagePriceTable.test.ts -t "clears a mapping across mapped and automatically priced environments". The fixture has two available targets withprices: {}:Env Ahasaliases: { example: "example-model" }, andEnv Bhasaliases: {}. It callsusagePriceTableErrorswith both targets and[{ id: "model:example", model: "example", isNew: false, alias: "", values: {} }].exampleon only one of two writable environments. With both selected, type the alias into the Map to field showingMixed, then erase it without entering prices.UsagePriceOverridesstages the blank alias and renders the result ofusagePriceTableErrorson the row and in the Save button's disabled state.Map { "model:example" => "Input is required on Env B." }. The dialog shows the error and disables Save changes.{ model: "example", alias: null }) and leaves the automatically priced environment unchanged.Change
After planning any existing alias removal, skip price validation for an existing row's mapping clear when the target has no custom price and the draft contains no nonblank price edits. This fixes the dialog in both web and the shared Electron renderer; new rows and actual price edits still validate.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
Input is required on Env B.and passed with the fix.vp run check:changedexited 0, including all 12 price-table tests.Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).