OpenHands / OpenHands/software-agent-sdk
Add typed retry and LLM delegation contracts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
Parent tracking issue: #4904
Desired Behavior
Retry state, retry stop conditions, exception retry metadata, and router fallback delegation should use explicit SDK-owned contracts. Exceptions should declare retry metadata rather than receiving attributes dynamically, and LLM/router subclasses should expose shared capabilities through inheritance or protocols.
Scope
openhands-sdk/openhands/sdk/llm/utils/retry_mixin.pyopenhands-sdk/openhands/sdk/llm/router/base.py- Related agent/base LLM capability access where the same contract applies
- Focused retry/router tests and baseline updates
Acceptance Criteria
- SDK exception types declare retry attempt and maximum retry metadata explicitly.
- Retry-state and stop-condition access is normalized through typed contracts.
- Router delegation has a typed surface or an explicitly documented narrow compatibility boundary.
- Tests cover bounded/unbounded retries, exception metadata, and fallback delegation.
- Relevant forbidden dynamic-attribute baseline entries are removed and type checks pass.
This issue was created by an AI agent (OpenHands) on behalf of the user.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openhands-sdk/openhands/sdk/llm/utils/retry_mixin.py and openhands-sdk/openhands/sdk/llm/router/base.py, then inspect the related agent/base LLM capability access. Run the focused retry/router tests and review the baseline entries. Done means typed retry metadata, normalized retry and delegation contracts, passing type checks, and coverage for bounded and unbounded retries, exception metadata, and fallback delegation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, backend-api-design, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100