fix(claude): stop forcing tool search on Foundry#2477
Conversation
PR governanceThis PR follows the template and is marked ready for human review. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
5873f96 to
5c31657
Compare
JerrettDavis
left a comment
There was a problem hiding this comment.
Reviewed the latest diff against upstream main. The Foundry-specific default is scoped to the no-override path, preserves explicit/pre-existing ENABLE_TOOL_SEARCH values, and keeps the non-Foundry default unchanged. I also checked the adjacent Remote Control sibling-note path; it is only reached on the non-Foundry branch, so the new Foundry default does not make that banner inaccurate.
Local verification: uv run pytest tests/test_cli/test_wrap_claude.py tests/test_cli/test_wrap_claude_vertex_proxy_env.py tests/test_issue_746_tool_search.py -q -> 61 passed.
Description
Foundry sessions launched through
headroom wrap claudecurrently receive Headroom's genericENABLE_TOOL_SEARCH=truedefault when the user did not choose a tool-search mode. That can push Claude Code into a deferred-tool request shape that Azure Foundry rejects withAPI Error: 400 ... Some tools are not available. This narrows the default-only path so Foundry sessions stop forcing deferred-tool mode when the user did not ask for it, while explicit overrides and the existing non-Foundry custom-host behavior stay unchanged.Closes #2464
Type of Change
Changes Made
--tool-searchvalues and pre-setENABLE_TOOL_SEARCHvalues exactlytrueTesting
uv run pytest tests/test_cli/test_wrap_claude.py tests/test_cli/test_wrap_claude_vertex_proxy_env.py tests/test_issue_746_tool_search.py -q)uv run ruff check headroom/cli/wrap.py headroom/providers/claude/runtime.py tests/test_cli/test_wrap_claude.py)uv run mypy headroom)Test Output
Real Behavior Proof
uv, Foundry mode modeled through the wrap helper inputs61 passed;All checks passed!; Foundry mode without an override writesENABLE_TOOL_SEARCH=false, while explicit overrides, existing values, blank handling, and the non-Foundry default remain coveredReview Readiness
Checklist
Additional Notes
CHANGELOG.mdstays untouched because Headroom generates release notes from conventional commits. Live Foundry proof is intentionally left to a real tenant run; the code and focused tests only claim the launch-mode change inside Headroom.