Skip to content

feat: configure web search availability for all providers - #12369

Merged
lambertjosh merged 10 commits into
mainfrom
feat/websearch-config-setting
Jul 30, 2026
Merged

feat: configure web search availability for all providers#12369
lambertjosh merged 10 commits into
mainfrom
feat/websearch-config-setting

Conversation

@lambertjosh

@lambertjosh lambertjosh commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What

Adds a top-level web_search config option that lets users expose the built-in websearch tool to models from any provider. It defaults to off for third-party providers, preserving the existing managed-provider behavior; set web_search: true to opt in. The KILO_ENABLE_EXA / KILO_ENABLE_PARALLEL env flags continue to enable it as before.

The option is controllable from three surfaces sharing one source of truth (kilo.json):

  • Config: { "web_search": true }
  • VS Code: the Browser settings tab is renamed to Web Tools with separate Web Search and Browser Automation sections, localized across all supported languages
  • Kilo Console: a Web Search card on the Tools page with overlay source badges, project/global inheritance, and revert support

Why

Web search is available automatically for the managed Kilo provider, while third-party providers previously required backend environment flags. Search requests go directly from the client to Exa/Parallel, so users can now make an explicit choice to enable them from normal settings instead.

Notes for reviewers

  • This is a stable provider-availability option, not an experimental feature.
  • Registry integration tests verify that a configured OpenAI provider with a test API key does not receive websearch by default and receives it with web_search: true.
  • The shared packages/opencode/src/tool/registry.ts delta remains a single marked early-return at the existing upstream call site.
  • Cloud does not expose or store CLI settings. The companion schema PR fix(web): add web search CLI config schema cloud#4798 updates https://app.kilo.ai/config.json solely for editor $schema validation.

Companion: Kilo-Org/cloud#4798

Adds an experimental.websearch config flag that exposes the websearch
tool to models from any provider, not only the Kilo gateway. The flag
is editable from the VS Code Web Tools settings tab (renamed from
Browser) and the Kilo Console Tools page, with project/global overlay
inheritance and revert support. Environment flags KILO_ENABLE_EXA and
KILO_ENABLE_PARALLEL keep working as before.
Comment thread packages/core/src/v1/config/config.ts Outdated
Comment thread packages/opencode/src/tool/registry.ts Outdated
Comment thread packages/opencode/test/kilocode/config/config.test.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/src/i18n/en.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental update

Since the last review, one new commit was added: 3a2309cff0 (fix(vscode): clarify web search config scope), addressing @johnnyeric's review comment on BrowserTab.tsx about the global/project scope split not being surfaced in the UI.

The fix:

  • Switches BrowserTab.tsx from the generic config/updateConfig to globalConfig/projectConfig/updateGlobalConfig, mirroring the pattern already used elsewhere in the settings UI.
  • Adds a second, disabled SettingsRow tagged "Local" that appears only when the project config overrides web_search, so users can see when a project-level value is shadowing the global toggle.
  • Updates the Web Tools description/copy in en.ts and all other locale files (plus fa.ts, which previously lacked the Web Tools strings) to drop the now-inaccurate claim that search requests "connect directly to Exa or Parallel" — consistent with the recently merged Kilo-proxy routing change for websearch.
  • Trims the corresponding openapi.json description text (SDK regen artifact, out of scope per CI exclusions) and a small console copy tweak in ToolsRoute.tsx.

This is a small, correctly scoped follow-up that reuses existing global/project config infrastructure rather than introducing new patterns. No new issues found in the incremental diff.

Files Reviewed (2 primary files in this incremental commit)
  • packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/*.ts (copy-only changes across all locales)
Previous Review Summaries (6 snapshots, latest commit b71a9c0)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit b71a9c0)

Status: No Issues Found | Recommendation: Merge

Incremental update

Since the last review, the branch merged origin/main (commit 4a34d7b5d0, upstream sync noise only, no PR-authored logic) and added one new commit: b71a9c0c23 (fix(vscode): include web search in config exports), which adds "web_search" to the KNOWN_KEYS allowlist in packages/kilo-vscode/webview-ui/src/components/settings/settings-io.ts so the new setting is included in config export/import, consistent with the other config surfaces this PR touches. This is a correct, minimal, appropriately-scoped one-line fix.

All previously open inline findings on this PR have already been resolved by earlier commits (91d87588bf, c5d3032118) per the author's replies, and the corresponding review threads are now outdated on GitHub (no current line anchors). No new issues found in this incremental diff.

Files Reviewed (1 file in this incremental commit)
  • packages/kilo-vscode/webview-ui/src/components/settings/settings-io.ts

Previous review (commit 605dc48)

Status: No Issues Found | Recommendation: Merge

Incremental update

Commit 605dc483e8 (chore(sdk): minimize web search schema diff) only regenerates packages/sdk/openapi.json via bun dev generate to realign the SDK schema with the current base branch (moving the web_search boolean property to its correct location with a description, and picking up unrelated upstream endpoint/schema changes). This is a generated artifact and out of scope per repo review guidance (SDK regeneration drift / generated-artifact freshness are CI-checked, not human-reviewed). No source logic changed in this commit.

No new issues found in the incremental diff.

Files Reviewed (1 file in this incremental commit)
  • packages/sdk/openapi.json (generated SDK schema, no logic changes)

Previous review (commit c5d3032)

Status: No Issues Found | Recommendation: Merge

Incremental update

Commit c5d3032118 (fix: keep third-party web search opt-in) resolves the previously flagged WARNING: web_search is reverted from opt-out (!== false) back to opt-in (=== true), consistently across packages/core/src/v1/config/config.ts, packages/kilo-console/src/routes/config/ToolsRoute.tsx, packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx, and packages/opencode/src/tool/registry.ts, with matching test and changeset updates. Third-party providers now default to no web search, preserving existing privacy behavior. The companion Cloud schema PR (Kilo-Org/cloud#4798) has also been updated to default: false, matching this change.

No new issues found in the incremental diff.

Files Reviewed (7 files in this incremental commit)
  • .changeset/enable-websearch-config.md
  • packages/core/src/v1/config/config.ts
  • packages/kilo-console/src/routes/config/ToolsRoute.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx
  • packages/opencode/src/tool/registry.ts
  • packages/opencode/test/kilocode/config/config.test.ts
  • packages/opencode/test/tool/registry.test.ts

Previous review (commit 34e787e)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/tool/registry.ts 380 Web search is now enabled by default for every provider, sending queries unauthenticated to Exa/Parallel unless explicitly opted out; the changeset doesn't call out this default-behavior change

This incremental commit (34e787e5ac) inverts the web_search default from opt-in (=== true) to opt-out (!== false), consistently across the CLI registry, VS Code BrowserTab, and Kilo Console ToolsRoute, with matching test and schema-description updates. The mechanics are consistent across all three surfaces; the one open concern is that this is a meaningful default-behavior/privacy change for existing users that isn't reflected in the changeset text.

Fix these issues in Kilo Cloud

Files Reviewed (6 files in this incremental commit)
  • packages/core/src/v1/config/config.ts
  • packages/kilo-console/src/routes/config/ToolsRoute.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx
  • packages/opencode/src/tool/registry.ts
  • packages/opencode/test/kilocode/config/config.test.ts
  • packages/opencode/test/tool/registry.test.ts

Previous review (commit 91d8758)

Status: No Issues Found | Recommendation: Merge

All three actionable findings from the previous review were addressed in commit 91d87588bf:

  • packages/opencode/test/tool/registry.test.ts now has direct ToolRegistry.Service.tools() coverage for the web_search visibility-gating branch (hidden by default for a third-party provider, shown when web_search: true).
  • packages/opencode/test/kilocode/config/config.test.ts moved the schema test into its own "kilocode web search config" describe block.
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts (and all other locale files) removed the orphaned settings.browser.title key and added fully localized Web Tools / Web Search strings.

The config key was also renamed from experimental.websearch to a stable top-level web_search, consistently threaded through packages/core/src/v1/config/config.ts, the overlay allowlist, the VS Code webview, and Kilo Console.

One prior thread remains intentionally open per the author: the companion Cloud extras.ts schema mirror for the new web_search key is still pending in a separate PR (not enforced by CI, tracked in the existing discussion on packages/core/src/v1/config/config.ts).

Files Reviewed (10 files in this incremental commit)
  • packages/core/src/v1/config/config.ts
  • packages/kilo-console/src/routes/config/ToolsRoute.tsx
  • packages/kilo-vscode/tests/settings-accessibility.spec.ts
  • packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/*.ts (all 24 locales)
  • packages/kilo-vscode/webview-ui/src/types/messages/config.ts
  • packages/opencode/src/kilocode/config/overlay.ts
  • packages/opencode/src/tool/registry.ts
  • packages/opencode/test/kilocode/config/config.test.ts
  • packages/opencode/test/kilocode/server/config-overlay.test.ts
  • packages/opencode/test/tool/registry.test.ts

Previous review (commit 44f1373)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
packages/core/src/v1/config/config.ts 281 New kilocode_change config key needs the cloud extras.ts schema mirror (already flagged as a follow-up in the PR description); also a minor websearch vs web_search naming-convention nit

SUGGESTION

File Line Issue
packages/opencode/src/tool/registry.ts 380 No direct test for the new tools() visibility-gating branch (experimental.websearch)
packages/opencode/test/kilocode/config/config.test.ts 155 New websearch schema test is placed inside the unrelated "kilocode indexing config" describe block
packages/kilo-vscode/webview-ui/src/i18n/en.ts 1179 settings.browser.title becomes an orphaned i18n key after the tab rename
Files Reviewed (13 files)
  • .changeset/enable-websearch-config.md
  • packages/core/src/v1/config/config.ts - 1 issue
  • packages/kilo-console/src/routes/config/ToolsRoute.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/BrowserTab.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/Settings.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts - 1 issue
  • packages/kilo-vscode/webview-ui/src/types/messages/config.ts
  • packages/opencode/src/kilocode/config/overlay.ts
  • packages/opencode/src/tool/registry.ts - 1 issue
  • packages/opencode/test/kilocode/config/config.test.ts - 1 issue
  • packages/opencode/test/kilocode/server/config-overlay.test.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json (regeneration drift only, not flagged per CI-skip rules)

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5 · Input: 34 · Output: 4.7K · Cached: 781.5K

Review guidance: REVIEW.md from base branch main

@lambertjosh

lambertjosh commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Moved Browser to a Web Tools page and added search. Defaulted to off (does not route through gateway).

Setting is top-level "web_search": false. Cloud PR being opened to add to the hosted schema.

image

Comment thread packages/opencode/src/tool/registry.ts Outdated
@lambertjosh

Copy link
Copy Markdown
Contributor Author

Before

image

After

image


const updateWebsearch = (checked: boolean) => {
updateConfig({ web_search: checked })
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found one issue worth addressing: an inconsistency between project and global configuration.

The toggle displays the effective merged value but always writes to the global configuration. When a project override exists, clicking the toggle may have no effect because the project value continues to take precedence. The toggle should either update the project setting or display the global value and indicate when it is overridden.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Implemented the global/project split:

image

@johnnyeric

Copy link
Copy Markdown
Contributor

Other than just just a few minor fixes after merging with latest main:

  • Update the web-search copy because Exa requests may now be routed through Kilo rather than connecting directly. (due to recent change feat(opencode): route websearch Exa through Kilo proxy #12470)
  • Add missing Farsi translations (recent community contribution) for the new settings.
  • Regenerate the OpenAPI/SDK artifacts so the committed output matches the generator.

@lambertjosh

Copy link
Copy Markdown
Contributor Author

@johnnyeric - thanks for the review, I think I've addressed your comments. Would be great for a re-review!

@lambertjosh
lambertjosh merged commit bd0d1f0 into main Jul 30, 2026
31 checks passed
@lambertjosh
lambertjosh deleted the feat/websearch-config-setting branch July 30, 2026 11:30
unixcrh pushed a commit to unixcrh/kilocode that referenced this pull request Aug 1, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…-setting

feat: configure web search availability for all providers
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.

2 participants