mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 03:55:09 +08:00
test(llm): update MultimodalRouterTest for honour-explicit-sidecar behavior
The multimodal sidecar selector change made resolveSidecar honour an explicit sidecar selection even when the built-in capability heuristics don't recognize the model (it now logs a diagnostic and returns the model instead of rejecting to NONE). The test still asserted the old reject->NONE path. Update it to assert SIDECAR and the honoured model, matching the current production behavior.
This commit is contained in:
parent
a9cf3cbd55
commit
c362d12425
@ -145,8 +145,8 @@ class MultimodalRouterTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("Configured sidecar that does not actually support VISION → fallback to NONE")
|
@DisplayName("Explicit sidecar is honoured even when heuristics don't confirm VISION capability")
|
||||||
void sidecarLacksClaimedCapability() {
|
void sidecarHonouredDespiteUnconfirmedCapability() {
|
||||||
ModelConfigEntity primary = chatModel("deepseek", "deepseek-chat", null);
|
ModelConfigEntity primary = chatModel("deepseek", "deepseek-chat", null);
|
||||||
ModelConfigEntity vision = chatModel("acme", "acme-chat", "[]");
|
ModelConfigEntity vision = chatModel("acme", "acme-chat", "[]");
|
||||||
vision.setId(42L);
|
vision.setId(42L);
|
||||||
@ -161,8 +161,12 @@ class MultimodalRouterTest {
|
|||||||
|
|
||||||
MultimodalRoutingDecision decision = router.route(List.of(imagePart("a.png")), primary);
|
MultimodalRoutingDecision decision = router.route(List.of(imagePart("a.png")), primary);
|
||||||
|
|
||||||
assertEquals(MultimodalRoutingDecision.Strategy.NONE, decision.strategy());
|
// An explicit sidecar selection is the user's own capability declaration:
|
||||||
assertEquals("vision_model_unavailable", decision.skipped().get(0).reason());
|
// honour it even when the built-in heuristics don't recognize the model as
|
||||||
|
// vision-capable (a wrong pick degrades gracefully at caption time, rather
|
||||||
|
// than the attachment being silently dropped).
|
||||||
|
assertEquals(MultimodalRoutingDecision.Strategy.SIDECAR, decision.strategy());
|
||||||
|
assertEquals(vision, decision.sidecarModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user