Skip to content

fix(sdk/subagent): fix get_factory_info()#2271

Merged
VascoSch92 merged 1 commit intomainfrom
vasco/fix-get-agent-factory
Mar 3, 2026
Merged

fix(sdk/subagent): fix get_factory_info()#2271
VascoSch92 merged 1 commit intomainfrom
vasco/fix-get-agent-factory

Conversation

@VascoSch92
Copy link
Copy Markdown
Contributor

@VascoSch92 VascoSch92 commented Mar 3, 2026

Summary

This fixes get_factory_info() so the default agent's description is defined in one place (its frontmatter) rather than being duplicated as a special case in the registry code.

  • Remove the hardcoded "default" agent entry from get_factory_info() output, so it only lists user-registered agents
  • Move the "used when no agent type is provided" description into the actual default agent definition files (default.md, default_cli.md) where it belongs
  • Simplify early return when no user agents are registered

Note

This is a beaviouhr change but it is not a problem as we give the default agent to the DelegateTool always, i.e., there is no change in this sense.

Checklist

  • If the PR is changing/adding functionality, are there tests to reflect this?
  • If there is an example, have you run the example to make sure that it works?
  • If there are instructions on how to run the code, have you followed the instructions and made sure that it works?
  • If the feature is significant enough to require documentation, is there a PR open on the OpenHands/docs repository with the same branch name?
  • Is the github CI passing?

Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:7d01015-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-7d01015-python \
  ghcr.io/openhands/agent-server:7d01015-python

All tags pushed for this build

ghcr.io/openhands/agent-server:7d01015-golang-amd64
ghcr.io/openhands/agent-server:7d01015-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:7d01015-golang-arm64
ghcr.io/openhands/agent-server:7d01015-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:7d01015-java-amd64
ghcr.io/openhands/agent-server:7d01015-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:7d01015-java-arm64
ghcr.io/openhands/agent-server:7d01015-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:7d01015-python-amd64
ghcr.io/openhands/agent-server:7d01015-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:7d01015-python-arm64
ghcr.io/openhands/agent-server:7d01015-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:7d01015-golang
ghcr.io/openhands/agent-server:7d01015-java
ghcr.io/openhands/agent-server:7d01015-python

About Multi-Architecture Support

  • Each variant tag (e.g., 7d01015-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 7d01015-python-amd64) are also available if needed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

API breakage checks (Griffe)

Result: Failed

Log excerpt (first 1000 characters)

============================================================
Checking openhands-sdk (openhands.sdk)
============================================================
Comparing openhands-sdk 1.11.5 against 1.11.4
::notice title=openhands-sdk API::Ignoring Field metadata-only change (non-breaking): load_public_skills
::notice title=openhands-sdk API::Ignoring Field metadata-only change (non-breaking): temperature
::warning file=openhands-sdk/openhands/sdk/llm/llm.py,line=196,title=LLM.top_p::Attribute value was changed: `Field(default=1.0, ge=0, le=1)` -> `Field(default=None, ge=0, le=1, description='Nucleus sampling parameter. Defaults to None (uses provider default). Set to a value between 0 and 1 to control diversity of outputs.')`
::error title=SemVer::Breaking changes detected (1); require at least minor version bump from 1.11.x, but new is 1.11.5

============================================================
Checking openhands-workspace (openhands.workspace)
============================

Action log

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

Agent server REST API breakage checks (OpenAPI)

Result: Passed

Action log

@VascoSch92 VascoSch92 marked this pull request as ready for review March 3, 2026 09:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/subagent
   registry.py94693%76, 154–155, 159, 197–198
TOTAL19600607169% 

all-hands-bot

This comment was marked as off-topic.

@VascoSch92
Copy link
Copy Markdown
Contributor Author

Recommendation: This should be reviewed by a maintainer and ideally verified with lightweight evals before merging to ensure the behavior change does not affect agent decision-making or benchmark performance.

This is pretty nice :-)

@VascoSch92 VascoSch92 requested a review from all-hands-bot March 3, 2026 10:07
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

Taste Rating: 🟡 Acceptable - Eliminates duplication but changes public API behavior

Assessment: This simplifies the code by moving the default agent description to its definition file (good taste - eliminates special case). However, this is a breaking change to get_factory_info()s public API output, which affects tool descriptions.

Key Concern: This PR changes how tools present agent information to LLMs. According to repo policy, changes that "could plausibly affect benchmark/evaluation performance" (including tool calling/execution) should not be approved without human review and lightweight evals.

Verdict: ⚠️ Needs human maintainer review - core refactor is sound, but tool behavior change requires eval verification before merge.

@VascoSch92 VascoSch92 merged commit 5002d7d into main Mar 3, 2026
38 checks passed
@VascoSch92 VascoSch92 deleted the vasco/fix-get-agent-factory branch March 3, 2026 12:05
zparnold added a commit to zparnold/software-agent-sdk that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants