Repository navigation
fix(agent-server): apply enable_browser to /server_info usable_tools - #5924
Conversation
/server_info listed browser_tool_set in usable_tools whenever the process found Chromium, even with enable_browser false, while the tool catalog and launches leave the browser out. build_server_info now applies the same configured_browser_available decision as the catalog route (which also covers the docker runtime's conversation image). The F27 map bullet drops its known-bug marker and declares its setup recipes. Fixes #5915 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Reviewed head fc6ebe3 (matches the requested SHA). Scope is correct: the Agent Server REST surface is owned by this repository, and the linked issue #5915 is ready-for-dev (bug, priority:low).
What I verified on the current head:
- The diff does what the description says:
build_server_infotakesbrowser_available, andget_server_infopassesconfigured_browser_available(config)— the same helper the tool-catalog route uses.None(local runtime, browser enabled) keeps the process Chromium probe in charge, and non-browser tools are untouched. - Focused tests:
uv run pytest tests/agent_server/test_server_details_router.py→ 14 passed, including the new disabled-browser test and theNone/True/Falsecoverage ofbuild_server_info. - Live endpoint check with a Chromium available in this environment, comparing
/server_infousable_toolsagainst the browser entry in/api/tools/catalog:- local,
enable_browser=False→ catalogusable=false,server_infoomitsbrowser_tool_set(agree) - local,
enable_browser=True→ both include it - docker, stock image → both include it
- docker,
-minimalimage → both omit it - docker,
conversation_image_has_browser=False→ both omit it
So/server_infonow agrees with the catalog in every configuration, and the disabled case no longer advertises a tool the server will not hand to any conversation. Acceptance criteria 1 and 2 hold.
- local,
- Import order is safe (no circular import between
server_details_routerandlaunch, checked both directions), andcontrol-agent-server map checkpasses statically (935 ids, 0 problems). - Current-head CI: every check run on
fc6ebe3succeeds, includingagent-server-testsandsdk-tests.
The one judgment call the description raises — docker mode with the stock image now lists the browser in usable_tools even though the server process cannot probe it — matches the catalog and the updated F27.catalog-docker-runtime bullet, so it is consistent with usable_tools meaning "usable by this server's conversations".
No material correctness, security, compatibility, or acceptance-criterion defect found.
✅ APPROVED
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMSJNcU77eZ2puc2tntZm5
|
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance. Merged
Generated by Claude Code |
HUMAN:
This PR proposes a fix for a bug uncovered during the first full agentic run of
verify-agent-server.AGENT:
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.
Requested by Engel · project thread
Decision needed
configured_browser_available(config)returnsTruein the docker runtime when the conversation image has the browser (the stock image). This PR applies that decision tousable_toolsin both directions, like the catalog: in docker mode with the stock image,usable_toolsnow listsbrowser_tool_seteven when the server process itself has no Chromium, because conversations (in containers) do get it. A maintainer should confirm thatusable_toolsmeans "usable by this server's conversations" rather than "usable in this process". The alternative is to only remove the browser when config disables it (False) and leave docker-modeTrueto the process probe; that would keep/server_infodisagreeing with the catalog for the stock docker image (the gap the map'sF27.catalog-docker-runtimebullet noted). Other tools in docker mode still come from the process probe either way.Why
On a server started with
enable_browser: false,GET /server_infolistedbrowser_tool_setinusable_toolswhenever the process found a Chromium, althoughGET /api/tools/catalogreports itusable: falseand launched conversations never get the browser. A client readingusable_toolsoffered a tool the server would not provide.Summary
build_server_infotakesbrowser_availableandget_server_infopassesconfigured_browser_available(config), the same decision the catalog route applies;None(local runtime, browser enabled) keeps the Chromium probe.enable_browser=Falseand forbuild_server_infowithNone/True/False.F27.server-info-browser-disableddrops its# bugmarker, declaresRequires: F27.browser-probe, F27.browser-disabled(its setup, so--onlyworks alone), andF27.catalog-docker-runtimenow assertsusable_toolslists the browser for the stock image.Issue Number
Fixes #5915
How to Test
uv run pytest tests/agent_server/test_server_details_router.py: the new disabled-browser test fails on main (browser_tool_setlisted) and passes here; 14 passed. Also rantest_tool_router.py,test_api_authentication.py,test_event_streaming.py,telemetry/: 322 passed.control-agent-server map run --file F27 --only F27.browser-probe,F27.browser-disabled,F27.server-info-browser-disabled --fresh --repeat 2 --checkout <main checkout>->xfailtwice.--checkout->xpasstwice (run's checkout is this worktree).control-agent-server map checkok;map run --file F27 --only F27.server-info-browser-disabled,F27.catalog-docker-runtime --fresh-> bothpass(theRequires:line pulled in the two setup bullets).uv run pre-commit run --files <changed files>: all hooks pass.Video/Screenshots
n/a
Type
Notes
Separate from the Chromium probe fix for
PLAYWRIGHT_BROWSERS_PATH(#5908) and from the sub-agents catalog ignoringenable_browser(F27.subagents-browser-disabled); this PR changes only/server_info.🤖 Generated with Claude Code
https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
Generated by Claude Code
🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdkpython-node-runtimepython-node-runtimepython-node-runtimegolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:c3f2a8e-pythonRun
All tags pushed for this build
About Multi-Architecture Support
c3f2a8e-python) is a multi-arch manifest supporting both amd64 and arm64c3f2a8e-python-amd64) are also available if needed