refactor(search): remove the Gemini search backend

The user asked to drop it: nobody had the Gemini CLI login or a key set up,
and Exa then Wikipedia cover the voice use. webSearch is now live Chrome,
Exa, Brave (opt-in), Wikipedia. Removes the CLI/REST backends, the
GEMINI_* settings, the Docker login mount and checks, and updates the specs
and docs/llm_contexts.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-18 09:24:11 +09:00
parent 59c3f33c2c
commit af1276cf6b
26 changed files with 66 additions and 504 deletions

View File

@@ -11,7 +11,6 @@ from src.jarvis.tools.base import ToolContext
from src.jarvis.tools.types import ToolExecutionResult
WS = "src.jarvis.tools.builtin.web_search"
RS = "src.jarvis.tools.builtin.realtime_search"
def _cfg(**overrides):
@@ -20,8 +19,6 @@ def _cfg(**overrides):
cfg.web_search_enabled = True
cfg.voice_debug = False
cfg.stream_browser = False
cfg.gemini_auth = "api_key"
cfg.gemini_api_key = ""
cfg.brave_search_api_key = ""
cfg.wikipedia_fallback_enabled = False
cfg.mcps = {}
@@ -95,11 +92,10 @@ class TestWebSearchTool:
assert "disabled" in result.reply_text.lower()
@patch(f"{WS}._wikipedia_summary")
@patch(f"{RS}.gemini_search")
def test_exa_results_are_fenced_with_links_and_stop_the_chain(self, mock_gemini, mock_wiki):
def test_exa_results_are_fenced_with_links_and_stop_the_chain(self, mock_wiki):
"""Exa's page text lands inside the fence, its links follow it, and no
later provider is consulted."""
self.context.cfg = _cfg(gemini_api_key="key", wikipedia_fallback_enabled=True)
self.context.cfg = _cfg(wikipedia_fallback_enabled=True)
self.exa.return_value = [
("Possessor (film)", "https://exa1.test/possessor",
"Possessor is a 2020 film directed by Brandon Cronenberg."),
@@ -115,7 +111,6 @@ class TestWebSearchTool:
assert begin < text.index("Brandon Cronenberg") < end
assert text.index("https://exa1.test/possessor") > end
assert "https://exa2.test/review" in text
mock_gemini.assert_not_called()
mock_wiki.assert_not_called()
def test_envelope_directs_extraction_when_content_found(self):