Repository navigation
Commit 9910e95
authored
This reverts merge commit e42af5e.
The slimming approach rewrites conversation history on the codex-lb side (a stateless forwarding proxy) and conflicts with several stateful surfaces that have to stay consistent with the upstream view:
- Prompt-cache invalidation: every slimmed turn changes the input prefix and forces a cache miss against the upstream prompt cache, silently re-billing input tokens. This intersects with #515's pin / affinity work and is invisible to the user.
- Assistant-role omission notice ('[codex-lb omitted N items]'): the model treats this as its own prior speech and starts apologising for missing context, hallucinating that earlier history is known, or contradicting the trimmed turns.
- WebSocket turn_state mismatch: the Codex WS path is stateful through previous_response_id. After slimming, codex-lb's request view diverges from the upstream session view; replays of the slimmed payload can reference items the upstream copy expected but we already trimmed.
These are not knobs we can tune: history compaction belongs in the Codex client (or upstream Responses API), not in a forwarding proxy. The 413 -> slim transition is strictly better for the immediate symptom, but it shifts the failure mode from a clear hard fail into silent degradation of cache cost, model trust, and WS continuity.
Reverting before this lands in a release. Tracking the broader follow-up in #568. The original 413 reporter (#556) reopens for now while we route this through Codex CLI / file-upload paths instead.
1 parent e42af5e commit 9910e95
6 files changed
Lines changed: 13 additions & 482 deletions
File tree
- app
- core/clients
- modules/proxy
- openspec/changes/slim-oversized-response-create-history
- specs/responses-api-compat
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
1331 | 1328 | | |
1332 | 1329 | | |
1333 | 1330 | | |
1334 | | - | |
| 1331 | + | |
1335 | 1332 | | |
1336 | 1333 | | |
1337 | 1334 | | |
1338 | 1335 | | |
1339 | 1336 | | |
1340 | 1337 | | |
1341 | | - | |
1342 | 1338 | | |
1343 | 1339 | | |
1344 | 1340 | | |
| |||
1379 | 1375 | | |
1380 | 1376 | | |
1381 | 1377 | | |
| 1378 | + | |
1382 | 1379 | | |
1383 | 1380 | | |
1384 | 1381 | | |
| |||
1398 | 1395 | | |
1399 | 1396 | | |
1400 | 1397 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
| 1398 | + | |
1414 | 1399 | | |
1415 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
1416 | 1403 | | |
1417 | 1404 | | |
1418 | 1405 | | |
1419 | | - | |
1420 | 1406 | | |
1421 | 1407 | | |
1422 | 1408 | | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
1491 | | - | |
1492 | | - | |
1493 | | - | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
1497 | | - | |
1498 | | - | |
1499 | | - | |
1500 | | - | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | 1409 | | |
1509 | 1410 | | |
1510 | 1411 | | |
| |||
1590 | 1491 | | |
1591 | 1492 | | |
1592 | 1493 | | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | 1494 | | |
1606 | 1495 | | |
1607 | 1496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
9114 | 9115 | | |
9115 | 9116 | | |
9116 | 9117 | | |
9117 | | - | |
9118 | | - | |
9119 | | - | |
9120 | | - | |
9121 | | - | |
9122 | | - | |
9123 | | - | |
9124 | | - | |
9125 | | - | |
9126 | | - | |
| 9118 | + | |
9127 | 9119 | | |
9128 | 9120 | | |
9129 | 9121 | | |
9130 | 9122 | | |
9131 | 9123 | | |
9132 | | - | |
9133 | | - | |
9134 | | - | |
9135 | | - | |
9136 | | - | |
9137 | | - | |
9138 | | - | |
9139 | | - | |
9140 | | - | |
9141 | | - | |
9142 | | - | |
9143 | | - | |
9144 | | - | |
9145 | | - | |
9146 | | - | |
9147 | | - | |
9148 | | - | |
9149 | | - | |
9150 | | - | |
9151 | | - | |
9152 | | - | |
9153 | | - | |
9154 | | - | |
9155 | | - | |
9156 | | - | |
9157 | | - | |
9158 | | - | |
9159 | | - | |
9160 | | - | |
9161 | | - | |
9162 | | - | |
9163 | | - | |
9164 | | - | |
9165 | | - | |
9166 | | - | |
9167 | | - | |
9168 | | - | |
9169 | | - | |
9170 | | - | |
9171 | | - | |
9172 | | - | |
9173 | | - | |
9174 | | - | |
9175 | | - | |
9176 | | - | |
9177 | | - | |
9178 | | - | |
9179 | | - | |
9180 | | - | |
9181 | | - | |
9182 | | - | |
9183 | | - | |
9184 | | - | |
9185 | | - | |
9186 | | - | |
9187 | | - | |
9188 | | - | |
9189 | | - | |
9190 | | - | |
9191 | 9124 | | |
9192 | | - | |
9193 | | - | |
9194 | | - | |
9195 | | - | |
9196 | | - | |
9197 | | - | |
9198 | | - | |
9199 | | - | |
9200 | | - | |
9201 | | - | |
9202 | | - | |
9203 | | - | |
9204 | | - | |
9205 | | - | |
9206 | | - | |
9207 | | - | |
9208 | | - | |
9209 | | - | |
9210 | | - | |
9211 | | - | |
9212 | | - | |
9213 | | - | |
9214 | | - | |
9215 | | - | |
9216 | | - | |
9217 | | - | |
9218 | | - | |
9219 | 9125 | | |
9220 | 9126 | | |
9221 | 9127 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments