Skip to main content

WebSearch Fallback

Third-party profiles cannot use Anthropic’s native WebSearch. CCS provides automatic web search via CLI tools with intelligent fallback.

Overview

CCS intercepts WebSearch requests from Claude Code and routes them through available CLI tools.
WebSearch Configuration - Dark

How It Works

Profile TypeWebSearch Method
Claude (native)Anthropic WebSearch API
Third-party profilesCLI Tool Fallback Chain

Fallback Chain

CCS tries tools in priority order until one succeeds:
PriorityToolAuthInstall
1stGemini CLIOAuth (free)npm install -g @google/gemini-cli
2ndOpenCodeOAuth (free)curl -fsSL https://opencode.ai/install | bash
3rdGrok CLIAPI Keynpm install -g @vibe-kit/grok-cli

Configuration

Configure via dashboard (Settings page) or ~/.ccs/config.yaml:
websearch:
  enabled: true                    # Enable/disable (default: true)
  gemini:
    enabled: true                  # Use Gemini CLI (default: true)
    model: gemini-2.5-flash        # Model to use
  opencode:
    enabled: true                  # Use OpenCode as fallback
  grok:
    enabled: false                 # Requires XAI_API_KEY

Setup

1

Install Gemini CLI

npm install -g @google/gemini-cli
2

Authenticate

Run once to complete OAuth:
gemini
3

Verify

Check that websearch works:
ccs gemini "search for the latest TypeScript features"

Provider Details

  • Auth: Free OAuth
  • Limit: Varies
  • Quality: Good for code-related searches
  • Setup: Follow installer prompts
  • Auth: Requires XAI_API_KEY
  • Limit: Based on API plan
  • Quality: Real-time web access
  • Setup: Set env var and install

Troubleshooting

Verify CLI tools are installed:
which gemini opencode grok
Re-authenticate the failing tool:
gemini  # Opens browser for OAuth
Switch to a faster fallback:
websearch:
  gemini:
    model: gemini-2.0-flash-lite
Gemini CLI is recommended - free OAuth authentication with 1000 requests/day. Just run gemini once to authenticate via browser.