Commit 93abc4c
committed
fix(agent): address the pre-landing review of retry-then-fallback
Review fixes: the executor judges the final try once per iteration; the
skip-warn is one helper; the fallback warn names the candidate position
rather than reusing `attempt`; the BlockLog.modelFallbacks doc matches the
final-try semantics; the viability check resolves a provider once through
the new providerRequiresFamilyCredentials; editor handlers read rows via a
ref so a keystroke in one row no longer re-renders every row, and tuning
options keep their identity across renders.
Two consistency fixes from the red-team pass: a sim-auto fallback takes
the projected system prompt rather than the raw input, and a row key is
honoured at runtime only when the block stored it as a whole {{NAME}}
reference, the one form the editor, the validator, and an export agree on.
Tests now cover the composed executor-plus-handler sequence (three tries on
the selected model, then each fallback once), the node-taking handler
signature, a fallback whose provider cannot take the attachments, the
per-provider hydration cache, a stop during a skipped candidate, the
un-primed stream when no candidate follows, a non-retryable failure on a
non-final try, a numeric tuning value, and an unresolved temperature.1 parent dbf585c commit 93abc4c
11 files changed
Lines changed: 425 additions & 68 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list
- blocks
- executor
- execution
- handlers/agent
- lib/workflows
- blocks
- editing
Lines changed: 49 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
| |||
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | | - | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
136 | | - | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| |||
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
199 | | - | |
200 | | - | |
| 208 | + | |
| 209 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
| |||
306 | 315 | | |
307 | 316 | | |
308 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
309 | 327 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
313 | 333 | | |
314 | | - | |
| 334 | + | |
315 | 335 | | |
316 | 336 | | |
317 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
318 | 341 | | |
319 | | - | |
320 | | - | |
| 342 | + | |
| 343 | + | |
321 | 344 | | |
322 | 345 | | |
323 | | - | |
324 | | - | |
| 346 | + | |
| 347 | + | |
325 | 348 | | |
326 | 349 | | |
327 | | - | |
328 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
329 | 353 | | |
330 | 354 | | |
331 | 355 | | |
332 | | - | |
333 | | - | |
| 356 | + | |
| 357 | + | |
334 | 358 | | |
335 | 359 | | |
336 | 360 | | |
337 | 361 | | |
338 | | - | |
| 362 | + | |
339 | 363 | | |
340 | | - | |
| 364 | + | |
341 | 365 | | |
342 | 366 | | |
343 | 367 | | |
| |||
347 | 371 | | |
348 | 372 | | |
349 | 373 | | |
350 | | - | |
| 374 | + | |
| 375 | + | |
351 | 376 | | |
352 | 377 | | |
353 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
154 | 178 | | |
155 | 179 | | |
156 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| 572 | + | |
572 | 573 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 574 | + | |
578 | 575 | | |
579 | 576 | | |
580 | 577 | | |
| |||
596 | 593 | | |
597 | 594 | | |
598 | 595 | | |
599 | | - | |
600 | 596 | | |
601 | 597 | | |
602 | 598 | | |
| |||
0 commit comments