Skip to content

fix(tools): stop advertising mock web_search to the model - #372

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/hide-mock-web-search
Aug 16, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/hide-mock-web-search

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Mock web_search is no longer advertised to the model. It stays available for tests only.

  • WebSearchConfig::should_register() returns false when the provider is mock, even if enabled is true
  • Session startup uses that gate, so a default install has no web_search tool
  • The TUI search chip is off instead of hardcoded mock
  • Tests construct the backend with web_search_tool_for_tests() / WebSearchTool::new_for_tests

A real search provider can still register later through the existing SearchBackend seam.

Test plan

  • cargo test --package forge-config --lib web_search --locked
  • cargo test --package forge-tools --lib web_search --locked
  • cargo test --package forge-tools --test all_tools --locked
  • cargo test --package forge-core --lib session_omits --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --all-targets --locked
  • CI green on this PR

Mock remains a test backend. Default sessions no longer register
web_search or show a mock chip in the TUI.
@github-actions
github-actions Bot enabled auto-merge (squash) August 16, 2026 20:12
@github-actions
github-actions Bot merged commit eed42ed into main Aug 16, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
Mock remains a test backend. Default sessions no longer register
web_search or show a mock chip in the TUI.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Mock remains a test backend. Default sessions no longer register
web_search or show a mock chip in the TUI.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Mock remains a test backend. Default sessions no longer register
web_search or show a mock chip in the TUI.
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.

1 participant