-
Notifications
You must be signed in to change notification settings - Fork 62
Honor configured session timeout for Copilot dialog turns #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2468,12 +2468,13 @@ def on_event(event: Any) -> None: | |||||
| session.on(on_event) | ||||||
| await session.send(full_prompt) | ||||||
|
|
||||||
| dialog_timeout = self._idle_recovery_config.max_session_seconds | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bumps the default dialog-turn timeout from 120s to 1800s for anyone who hasn't set Would a shorter, dialog-specific default (or at least a log line once |
||||||
| try: | ||||||
| await asyncio.wait_for(done.wait(), timeout=120.0) | ||||||
| await asyncio.wait_for(done.wait(), timeout=dialog_timeout) | ||||||
| except TimeoutError as exc: | ||||||
| raise ProviderError( | ||||||
| "Dialog turn timed out after 120s", | ||||||
| is_retryable=False, | ||||||
| f"Dialog turn timed out after {dialog_timeout:g}s", | ||||||
| is_retryable=True, | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither If there's a future retry path planned for dialog turns, a short comment here explaining the divergence would help the next person who reads this. Otherwise I'd lean toward keeping this
Suggested change
|
||||||
| ) from exc | ||||||
|
|
||||||
| if error_message: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: the "so console and web dialogs can continue without losing history" part already happens today regardless of
is_retryable— both dialog call sites roll back the user turn and continue on any exception, not just retryable ones. Might be worth tightening this to just describe the timeout fix itself.