fix: vision slot filters to image-capable + custom models (was relaxing for all providers)
The prior change made the vision slot show every model (image-capable first), which relaxed the filter for built-in providers too — built-in text-only models became selectable for Vision. Centralize the vision rule in ModelMenuList: built-ins must report image input; custom-endpoint models stay selectable (their capability may be unreported). Image-capable still float first.
This commit is contained in:
@@ -172,13 +172,15 @@ describe("setup polish interactions", () => {
|
||||
assert.equal(closed, 0);
|
||||
});
|
||||
|
||||
it("the vision slot lists unknown-capability models (image-capable first, nothing hidden)", async () => {
|
||||
it("the vision slot filters out built-in text-only models (image-capable or custom only)", async () => {
|
||||
await mount({ keyed: true });
|
||||
await click(element('[data-testid="setup-trigger-vision"]'));
|
||||
// The text-only fixture stays selectable in the vision slot: the slot
|
||||
// orders image-capable first but no longer filters, so a custom endpoint
|
||||
// that reports no modality can still be picked for Vision.
|
||||
assert.ok(element('[data-testid="setup-menu-vision"]').textContent?.includes("fixture-text"));
|
||||
// The text-only openrouter fixture is neither image-capable nor a custom-
|
||||
// endpoint model, so the vision slot filters it out (built-ins must report
|
||||
// image input; only custom models stay selectable when capability is unknown).
|
||||
const menu = element('[data-testid="setup-menu-vision"]');
|
||||
assert.ok(!menu.textContent?.includes("fixture-text"));
|
||||
assert.ok(menu.textContent?.includes("No models match."));
|
||||
});
|
||||
|
||||
it("catalog failure uses the approved two-sentence error", async () => {
|
||||
|
||||
Reference in New Issue
Block a user