Skip to content

Conversation

@ryanhoangt
Copy link
Collaborator

@ryanhoangt ryanhoangt commented Nov 3, 2025

Fix #1074


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:f7e54e7-python

Run

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

All tags pushed for this build

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

About Multi-Architecture Support

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

@ryanhoangt ryanhoangt requested a review from xingyaoww November 3, 2025 10:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/llm/mixins
   fn_call_converter.py45540411%79–81, 371–386, 388–389, 391, 400–401, 403–406, 408–409, 411–412, 414–415, 417–420, 422–423, 425–426, 428–430, 432, 439, 441, 462–469, 471–475, 479–485, 487–492, 499–500, 502–504, 506–521, 525, 529, 536–541, 545–553, 556–559, 563–568, 571–573, 576, 578–579, 585–586, 590–597, 601–610, 614–615, 618, 623–624, 626–628, 630–633, 635–636, 638–639, 641, 645–653, 655–658, 660–663, 665, 669–671, 673, 677–679, 682, 684–685, 694, 696–697, 701–705, 709–714, 716, 718, 723, 726, 728–729, 732, 735, 737–741, 747, 769, 774, 784–787, 793–796, 801–807, 809, 811, 815, 818, 820–821, 823–826, 831, 833, 837–838, 842, 848, 850, 853, 861, 863–865, 867–869, 871–873, 879–882, 885–886, 893–898, 901–905, 910, 913, 917, 921, 926–927, 930–932, 935, 940–942, 944–945, 961, 973–975, 979–980, 982–985, 987–988, 990–992, 994, 997, 999, 1001–1003, 1005–1006, 1009–1010, 1013–1015, 1017–1020, 1023, 1027, 1034–1035, 1038–1039, 1053, 1059–1061, 1064–1065, 1069–1070, 1076–1077, 1080, 1092, 1095–1102, 1106–1107, 1112–1113, 1118, 1124–1127, 1137–1138, 1143, 1149–1150, 1155–1156, 1163, 1166–1168, 1171–1172, 1174, 1180, 1185, 1188, 1192, 1200, 1202–1203, 1206–1208, 1210–1211, 1217–1219, 1221–1222, 1224, 1226, 1230, 1232, 1237, 1239–1240, 1243
TOTAL11864551553% 

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

Did you try to migrate stuff from this PR? OpenHands/OpenHands#11497

@ryanhoangt
Copy link
Collaborator Author

Ah I didn't see that PR, I've ported the ICL examples into this PR, the schema formatting of this PR is more comprehensive so I keep it as-is. Tested with qwen/qwen3-235b-a22b-2507 with native_tool_calling=False and it seems to work correctly now!

Screenshot 2025-11-03 at 21 45 51

@ryanhoangt ryanhoangt requested a review from xingyaoww November 3, 2025 14:52
@ryanhoangt ryanhoangt requested a review from xingyaoww November 4, 2025 06:41
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you for this! LGTM and I'm happy we continue unit testing this converter, it really helps.

I'd suggest maybe we can get first Edward's fix ported from a two-weeks old PR, if that's okay, which seems like a part of this?

@enyst
Copy link
Collaborator

enyst commented Nov 7, 2025

@OpenHands We just merged a PR doing something like this PR is doing. Try to merge main into this PR branch ht/handle-nested-params-for-tools-desc, and fix the conflicts, then tell me what you think: do you think we need this PR as follow-up?

@openhands-ai
Copy link

openhands-ai bot commented Nov 7, 2025

I'm on it! enyst can track my progress at all-hands.dev

…nflicts in fn_call_converter and tests

- Reconcile schema formatting logic with new recursive formatter
- Preserve legacy labels for task_list to satisfy existing tests
- Clean up conflict markers and fix imports

Co-authored-by: openhands <[email protected]>
@openhands-ai
Copy link

openhands-ai bot commented Nov 7, 2025

Final summary

What I did

  • Merged main into ht/handle-nested-params-for-tools-desc and resolved conflicts.
  • Resolved conflicts in:
    • openhands-sdk/openhands/sdk/llm/mixins/fn_call_converter.py
    • tests/sdk/llm/test_llm_fncall_converter.py
  • Reconciled the new recursive schema formatter with main and kept the more comprehensive nested/union/object formatting from this branch.
  • Added a small compatibility shim so descriptions still include the literal line "task_list array item structure:" to satisfy an existing test.
  • Cleaned up imports and conflict markers.

Validation

  • Ran pre-commit (ruff format, ruff lint, pycodestyle, pyright) on changed files — all passed.
  • Built the environment: make build — completed.
  • Ran targeted tests: uv run pytest tests/sdk/llm/test_llm_fncall_converter.py — 27 passed.
  • Pushed the resolved merge to the branch (commit: cdbac32).

Checklist (per your instructions)

  1. Request addressed:
    • Merge main into PR branch: done
    • Fix conflicts: done
    • Provide assessment whether this PR is still needed: done (see below)
  2. Changes are concise:
    • Only conflict resolutions and a minimal compatibility shim in fn_call_converter.py, plus test import cleanup. No extraneous edits beyond what the merge required.
  3. Summary focuses on new changes since last message:
    • Completed and pushed the final commit after ensuring pre-commit and tests were green.

Answer to “Do we still need this PR as follow-up?”
Yes. The formatter in this branch is more comprehensive for nested schemas (arrays of objects, unions, additionalProperties) and improves tool description clarity when native tool calling is disabled. It adds robust tests for these deeper cases. I recommend keeping and merging this PR.

View full conversation

… and adapt tests

- Drop special-case label for task_list; rely on generic recursive formatter
- Update test expectations to match nested array/object formatting

Co-authored-by: openhands <[email protected]>
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

LGTM in general, but please take another look @ryanhoangt , I'm not sure the agent merge didn't miss something, though I checked some. You know best the details here!

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.

[Bug]: convert_tools_to_description does not parse nested parameters of tools

4 participants