Implementation:OpenHands OpenHands Summarize Issue Solvability
| Knowledge Sources | |
|---|---|
| Domains | Platform_Integration, GitHub_API |
| Last Updated | 2026-02-11 21:00 GMT |
Overview
Concrete tool for assessing whether a GitHub issue is suitable for automated resolution using LLM-based classification, provided by the OpenHands enterprise integration layer.
Description
summarize_issue_solvability is a standalone async function that evaluates a GitHub issue or comment and produces a markdown-formatted solvability report. The function first gathers contextual information about the issue (title, body, comments, repository metadata) using the helper function fetch_github_issue_context, then submits this context to an LLM with a solvability assessment prompt. The LLM returns a structured analysis of whether the issue can be resolved by an automated agent.
The assessment is bounded by a configurable timeout (default: 300 seconds) to ensure the triage step does not become a bottleneck in the processing pipeline.
Usage
This function is called during the webhook processing pipeline after the view object has been created, typically as an optional enrichment step before conversation creation. It can be used to:
- Provide stakeholders with a preliminary assessment before committing resources
- Filter issues that are unlikely to be resolved automatically
- Attach solvability metadata to the conversation for downstream decision-making
Code Reference
Source Location
- Repository: OpenHands
- File:
enterprise/integrations/github/github_solvability.py - Lines: L63-183 (summarize_issue_solvability), L26-60 (fetch_github_issue_context)
Signature
async def summarize_issue_solvability(
github_view: GithubViewType,
user_token: str,
timeout: float = 300.0,
) -> str:
Helper Signature
def fetch_github_issue_context(
github_view: GithubViewType,
user_token: str,
) -> str:
Import
from integrations.github.github_solvability import summarize_issue_solvability
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| github_view | GithubViewType |
Yes | GithubPRComment | GithubIssueComment | GithubIssue) representing the event that triggered the analysis. Provides the issue number, repository name, and installation ID needed to fetch context. |
| user_token | str |
Yes | A GitHub access token with read permissions on the target repository, used by the context-fetching helper to retrieve issue details, comments, and repository metadata. |
| timeout | float |
No | Maximum time in seconds to wait for the LLM assessment. Defaults to 300.0. If the timeout is exceeded, an asyncio.TimeoutError is raised.
|
Outputs
| Name | Type | Description |
|---|---|---|
| summary | str |
A markdown-formatted solvability report generated by the LLM. Includes a difficulty assessment, confidence level, rationale, and recommendations for whether to proceed with automated resolution. |
Context Gathering
The helper function fetch_github_issue_context collects:
- Issue metadata -- Title, body, labels, assignees, milestone
- Comment thread -- All existing comments on the issue, in chronological order
- Repository information -- Repository name, default branch, primary language
- Related references -- Cross-referenced issues or pull requests mentioned in the body or comments
This context is formatted into a structured text document that the LLM can process effectively.
LLM Configuration
The function uses an LLMConfig object to configure the language model:
- Model selection -- Uses the configured solvability assessment model (typically a fast, cost-effective model)
- Temperature -- Set low (e.g., 0.1) for consistent, deterministic assessments
- Max tokens -- Bounded to prevent excessively long outputs
- System prompt -- Contains the solvability criteria and output format instructions
Usage Examples
Basic Usage
from integrations.github.github_solvability import summarize_issue_solvability
from integrations.github.github_view import GithubIssue
# Assuming github_view is a GithubIssue or other GithubViewType
solvability_report = await summarize_issue_solvability(
github_view=github_view,
user_token=installation_token,
timeout=300.0,
)
print(solvability_report)
# Output example:
# ## Solvability Assessment
# **Difficulty:** Moderate
# **Confidence:** 0.85
# **Rationale:** The issue has a clear description and bounded scope...
# **Recommendation:** Proceed with automated resolution.
With Custom Timeout
import asyncio
try:
report = await summarize_issue_solvability(
github_view=github_view,
user_token=installation_token,
timeout=60.0, # Shorter timeout for faster pipeline
)
except asyncio.TimeoutError:
report = "Solvability analysis timed out. Proceeding with default assessment."