feat(llm-replay): indexed override patches for error injection

The override sidecar now accepts { patches: [{ at, entry }] } alongside the
legacy whole-script ReplayEntry[] replacement: the JSONL-derived script is
kept and only the named call indexes are swapped (at == length appends, for
a retry attempt following an injected transient throw). Out-of-range or
non-integer indexes fail loud with the derived length in the diagnostic.
This is the mock-LLM error capability the web e2e scenarios drive: 'call N
throws AUTH/SERVER, everything else replays as recorded'.
This commit is contained in:
Tianyi Cui
2026-07-26 03:26:41 +08:00
parent ee25ccf38b
commit 2e52c0670c
4 changed files with 97 additions and 15 deletions

View File

@@ -688,7 +688,7 @@ export interface ReplayModelConfig {
}
```
Source: [`packages/support/llm-replay/src/index.ts:459`](../packages/support/llm-replay/src/index.ts)
Source: [`packages/support/llm-replay/src/index.ts:496`](../packages/support/llm-replay/src/index.ts)
## `@deepseek-ai/dsh-llm-retry`