Skip to content

SN-2a: web search through Gecko Suite behind AI_BACKEND - #214

Merged
davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur
Nov 4, 2026
Merged

davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur

Conversation

@davior

@davior davior commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

First piece of SN-2 (speech and image generation follow as their own PRs). With AI_BACKEND=suite, the assistant's web search (search_web_for_user, used by both the browser route and the assistant worker) calls the suite's POST /api/v1/search/web and returns the same shape as before (provider, provider_label, query, results). local is unchanged.

  • The suite chooses the backend (the person's own, else the shared one, else DuckDuckGo) and records the search. Notes writes no usage in this mode, and its Settings → Web search choice does not apply.
  • The settings "Test" button tests the real path in suite mode (a throwaway query through the suite), since testing Notes' own saved backend would pass or fail for the wrong reason.
  • Failures keep the suite's status and {code, message}, which the assistant already turns into a failed-search note. The suite being down is a 503 suite_unavailable.
  • New generic suite.request_json in app/suite.py for the speech and image pieces to reuse.

Test plan

  • pytest -q in backend/: 1365 passed, 1 skipped (Python 3.13 locally; CI is 3.11). 4 new tests in tests/test_suite_proxy.py: forwarded request and credentials, shape and count clamp, no usage written, suite refusal, empty query, test button.
  • Not run against the real suite.

Deployment

Nothing changes unless AI_BACKEND=suite is already set (from #213).

  • Before enabling: the suite's importer does not carry Notes' web search settings. A person who had Brave, Tavily or SearXNG set up in Notes will get DuckDuckGo in suite mode until they add that backend on the suite's Search screen (or an admin adds a shared one).
  • Configuration: none new. Services rebuilt: backend only. Migrations, Caddy: none.
  • Verify: with suite mode on, press Test under Settings → Web search (it should say "Connected through Gecko Suite"), then run an assistant search and see it in the suite's Usage view under app notes.
  • Roll back: AI_BACKEND=local and docker compose up -d.

Generated by Claude Code

search_web_for_user and the settings test route call the suite's POST /search/web in
suite mode and keep their response shapes. The suite picks the backend and records the
search; Notes writes no usage.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
@davior
davior marked this pull request as ready for review November 4, 2026 09:08
@davior
davior merged commit 9e843ba into main Nov 4, 2026
2 checks passed
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