Declare CoderForge file editor tool metadata#259
Conversation
There was a problem hiding this comment.
🟡 Acceptable — The design is sound (metadata-level openhands_tools, the tool_name-before-kwargs fix in map_api_action, and the early-return guard in should_map_to_browser_action are all correct). Two CI failures need to be resolved before merge.
Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/neulab/agent-data-protocol/actions/runs/27097941560
| from agents.openhands_sdk import std_to_sft | ||
| from openhands.tools.file_editor import FileEditorTool | ||
| from schema.trajectory import Trajectory |
There was a problem hiding this comment.
🔴 Critical: Pre-commit (ruff) is failing because openhands.tools is a third-party import and must come before the local agents.* / schema.* imports, with a blank line between the two groups.
| from agents.openhands_sdk import std_to_sft | |
| from openhands.tools.file_editor import FileEditorTool | |
| from schema.trajectory import Trajectory | |
| from openhands.tools.file_editor import FileEditorTool | |
| from agents.openhands_sdk import std_to_sft | |
| from schema.trajectory import Trajectory |
|
|
||
| custom_tools: list[OpenAIToolSpec] = Field(default_factory=list) | ||
| code_enabled: list[str] = Field(default_factory=list) | ||
| openhands_tools: list[OpenHandsToolName] = Field(default_factory=list) |
There was a problem hiding this comment.
🔴 Critical: Any .py change under schema/ (other than schema/version.py and schema/__init__.py) requires a SCHEMA_VERSION bump in schema/version.py. CI's "Check schema version bump" step is currently failing because of this change. Please bump the patch version in schema/version.py and add the previous version to SUPPORTED_SCHEMA_VERSIONS.
437f5da to
7323734
Compare
Summary
Fixes
coderforge_previewOpenHands SDK conversion by declaring the file-editing tool that its standardized rows already use.CoderForge standardized trajectories emit
ApiAction(function="str_replace_editor", ...), but the dataset metadata previously declared no custom tools. Other SWE-style datasets that emitstr_replace_editordeclare it inmetadata.json, which lets the existingstd_to_sftconverter initialize the SDKfile_editortool. This PR makes CoderForge follow that existing pattern instead of changing converter behavior or inferring tool availability from observed actions.Changes
str_replace_editortodatasets/coderforge_preview/metadata.jsonavailable_apisunchanged, because this is a dataset-wide capability rather than per-row tool availabilitystd_to_sftunchangedValidation
pytest tests/test_dataset_structure.py -qfile_editorwith the existing converterIssue
Closes #260
This PR description update was created by an AI agent (OpenHands) on behalf of Graham Neubig.