Repository navigation
Commit 3c94b9a
committed
fix(routing): check noVisionModels before deriving the image modality
Review feedback on #2100: the migration resolved `modelInputModalities`
without first consulting `noVisionModels`, so the evidence still disagreed
with the resolver it claims to describe. Given
noVisionModels: ["gpt-oss"]
modelInputModalities: { "gpt-oss:120b": ["text", "image"] }
`isModelTextOnly` matches the no-vision list and returns true before it ever
reads the modality map (src/vision/index.ts:32), so the runtime says text-only
while `candidateCapabilityEvidence` reported `image: true`.
This is worse here than on the CLI surface #2086 fixed: routing acts on this
evidence, so it can select a candidate for image work that execution then
refuses. Same ordering, same primitives as the merged #2086.
Also strengthens the window oracle the review flagged: `not.toBe(8_000)` also
passed for `undefined` and for any other wrong value, so it is now the exact
expected number.
Two new tests. The positive one is red without this change; the negative one
(a model outside noVisionModels keeps its declared image modality) passes
either way on purpose -- it guards the fix from over-reaching rather than
demonstrating the defect.
Against origin/dev the file is 5 fail / 3 pass; against this branch's previous
commit, 1 fail / 7 pass.1 parent b01ed5f commit 3c94b9a
2 files changed
Lines changed: 54 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
103 | 138 | | |
104 | 139 | | |
105 | 140 | | |
| |||
0 commit comments