Skip to content

feat(code): model-node retry middleware for transient model errors#4569

Open
Mason Daugherty (mdrxy) wants to merge 10 commits into
mainfrom
open-swe/dcode-model-retry
Open

feat(code): model-node retry middleware for transient model errors#4569
Mason Daugherty (mdrxy) wants to merge 10 commits into
mainfrom
open-swe/dcode-model-retry

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Jul 8, 2026

Copy link
Copy Markdown
Member

Model connection retries now run in dcode's model-node middleware instead of provider constructors, so transient transport failures retry without replaying completed tools. The configured retry count applies to both the main agent and declarative subagents, and retry progress respects the terminal charset.

--max-retries and [retries] settings remain supported; 0 disables retries, while the default is five attempts with bounded exponential backoff. Authentication, permission, validation, and other deterministic client failures are not retried.

Release note

Deep Agents Code now retries transient model connection failures across main-agent and subagent model calls.

Made by Open SWE

Mason Daugherty (mdrxy) and others added 6 commits July 8, 2026 18:11
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
…te retry tests

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
…cstrings

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added dcode Related to `deepagents-code` feature New feature/enhancement or request for one internal User is a member of the `langchain-ai` GitHub organization open-swe size: XL 1000+ LOC labels Jul 8, 2026
@mdrxy Mason Daugherty (mdrxy) marked this pull request as ready for review July 8, 2026 20:20

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 2 potential issues.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/agent.py
Comment thread libs/code/deepagents_code/model_retry.py Outdated
@mdrxy Mason Daugherty (mdrxy) marked this pull request as draft July 13, 2026 13:38
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@johannes117 Johannes du Plessis (johannes117) marked this pull request as ready for review July 14, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` feature New feature/enhancement or request for one internal User is a member of the `langchain-ai` GitHub organization open-swe size: XL 1000+ LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants