Skip to content

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Nov 29, 2025

This PR contains the model-aware default-tool mapping and wiring split out from #1166 as requested.

Summary

  • Add get_default_tools_for_model() to sdk.llm.utils.model_features for model-specific default tools
  • Update tools preset default to take a model_name and select apply_patch over file_editor for GPT-5 family
  • Add tests to verify GPT-5 mapping and browser flag behavior

Rationale

  • Keep feat(tools): Add GPT-5.1 ApplyPatch tool #1166 focused on the ApplyPatch tool, the LLM Responses formatter method, and the example script
  • Move default-tool selection (model-specific wiring) into this separate PR to avoid impacting agent server until validated

Notes

  • Uses simple substring match for 'gpt-5' family mapping
  • No change for non-GPT-5 models (file_editor remains the default)

Related PR: #1166

Co-authored-by: openhands openhands@all-hands.dev

@enyst can click here to continue refining the PR


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:2c3f345-python

Run

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

All tags pushed for this build

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

About Multi-Architecture Support

  • Each variant tag (e.g., 2c3f345-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., 2c3f345-python-amd64) are also available if needed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/llm/utils
   model_features.py42392%149, 153, 172
openhands-tools/openhands/tools/preset
   default.py46295%64, 72
TOTAL13274631852% 

@OpenHands OpenHands deleted a comment from openhands-ai bot Nov 30, 2025
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.

2 participants