From 5a030299c2f650ed794cf7e051851a7a7c7d5b18 Mon Sep 17 00:00:00 2001 From: Giselle van Dongen Date: Mon, 16 Mar 2026 10:49:38 +0700 Subject: [PATCH] By default 10 retries with init duration 1 second --- python/restate/ext/pydantic/_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/restate/ext/pydantic/_agent.py b/python/restate/ext/pydantic/_agent.py index 55d2c10..d27fc23 100644 --- a/python/restate/ext/pydantic/_agent.py +++ b/python/restate/ext/pydantic/_agent.py @@ -2,6 +2,7 @@ from collections.abc import AsyncIterable, AsyncIterator, Iterator, Sequence from contextlib import AbstractAsyncContextManager, asynccontextmanager, contextmanager +from datetime import timedelta from typing import Any, overload from restate import RunOptions, TerminalError @@ -102,7 +103,7 @@ def __init__( self._auto_wrap_tools = auto_wrap_tools if run_options is None: - run_options = RunOptions(max_attempts=3) + run_options = RunOptions(max_attempts=10, initial_retry_interval=timedelta(seconds=1)) self._model = RestateModelWrapper(wrapped.model, run_options, event_stream_handler=event_stream_handler)