Repository navigation
Commit 1f3cdf2
committed
test(api): cover the accepted prompt cache TTL on the gateway call site
What: add a dedicated `anthropic/claude-3.5-sonnet` catalog row carrying
`promptCacheTtlSupport: ["1h"]`, and a test asserting the third argument to
`addCacheBreakpoints` resolves to `"1h"` when the knob is set.
Why: the existing pair only proved the reject path (`lastCall[2]` undefined)
and a bare `toHaveBeenCalled`. Nothing proved the accept path, so a regression
that dropped the third argument at the call site stayed invisible. The real
gateway catalog never sets `promptCacheTtlSupport`, so the capability has to be
injected by the test catalog rather than assumed from a real model.
Impact: test-only. The shared haiku row keeps no TTL capability, so the
existing reject-path test still asserts fail-closed behavior.1 parent 1f98244 commit 1f3cdf2
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
101 | 117 | | |
102 | 118 | | |
103 | 119 | | |
| |||
472 | 488 | | |
473 | 489 | | |
474 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
475 | 509 | | |
476 | 510 | | |
477 | 511 | | |
| |||
0 commit comments