Skip to content

Feature: Configurable web search provider #36513

Description

@BitFlaviano

Problem

The built-in websearch tool uses Exa AI as the only search provider, with no configuration option to switch to other search engines (e.g., Google, Bing, DuckDuckGo).

Proposed Solution

Add a configuration option in opencode.json to allow users to choose their preferred search provider:

{
  "websearch": {
    "provider": "google",
    "apiKey": "..."
  }
}

Or at minimum, support a WEBSEARCH_PROVIDER environment variable.

Use Case

Many users prefer Google search results for accuracy and relevance. Currently the only workaround is:

  1. Creating a custom tool that scrapes Google
  2. Setting up a local MCP server for Google search
  3. Using webfetch directly with Google URLs

A native configurable option would be much cleaner.

Alternatives Considered

  • Custom tools (works but requires per-project setup)
  • MCP servers (adds complexity and context overhead)
  • Webfetch fallback (manual, not automatic)

Thank you!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions