fix(llm): preserve serving retry policy

This commit is contained in:
Turtle
2026-07-25 13:30:34 +08:00
parent a623ed5183
commit 015ba14bae
27 changed files with 278 additions and 82 deletions

View File

@@ -138,7 +138,9 @@ describe('plan mode through the agent loop', () => {
const agent = ctx.agentLoop.create(SessionId('it-plan-retry-flip'), { provider: 'mock', model: 'mock' })
const recoveryEntered = Promise.withResolvers<true>()
const releaseRecovery = Promise.withResolvers<true>()
ctx.on('agent/request-error', async (subject, _turn, _step, _error, _failure, _history, _signal, next) => {
ctx.on('agent/request-error', async (
subject, _turn, _step, _error, _failure, _history, _retryPolicy, _signal, next,
) => {
if (subject !== agent) return next()
recoveryEntered.resolve(true)
await releaseRecovery.promise