Conversation
Agent-Logs-Url: https://github.com/joseph-mpo-yeti/OpenMAIC/sessions/099e53fb-e1db-49f4-af7f-4f17cb3d364a Co-authored-by: joseph-mpo-yeti <55380155+joseph-mpo-yeti@users.noreply.github.com>
Agent-Logs-Url: https://github.com/joseph-mpo-yeti/OpenMAIC/sessions/e1ab8fe2-fe0d-45a5-a0af-30945b99c268 Co-authored-by: joseph-mpo-yeti <55380155+joseph-mpo-yeti@users.noreply.github.com>
Agent-Logs-Url: https://github.com/joseph-mpo-yeti/OpenMAIC/sessions/e1ab8fe2-fe0d-45a5-a0af-30945b99c268 Co-authored-by: joseph-mpo-yeti <55380155+joseph-mpo-yeti@users.noreply.github.com>
Agent-Logs-Url: https://github.com/joseph-mpo-yeti/OpenMAIC/sessions/09469d80-8e91-449b-8bc2-9c11f83555df Co-authored-by: joseph-mpo-yeti <55380155+joseph-mpo-yeti@users.noreply.github.com>
Agent-Logs-Url: https://github.com/joseph-mpo-yeti/OpenMAIC/sessions/0aa49d19-df5b-4a08-a7e1-2295ae9cfc38 Co-authored-by: joseph-mpo-yeti <55380155+joseph-mpo-yeti@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a Claude (Anthropic Messages + web_search tool) web-search provider and refactors the app’s web search feature to support multiple providers across settings storage, UI selection, and server/API generation flows (with SSRF protections for URL fetching).
Changes:
- Introduces
searchWithClaude(including page-content enrichment + SSRF guard) and registers Claude/Tavily as web search providers. - Refactors web search settings/state/UI to support provider selection, enable/disable toggle, Claude model/tool configuration, and server/env API-key resolution.
- Updates API + classroom generation + preview/toolbar flows to pass
providerIdandproviderConfig, with added tests and provider icons.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/web-search/claude.test.ts | Adds unit coverage for Claude search behavior (tools defaults, page enrichment, SSRF blocks, errors). |
| tests/store/settings-web-search.test.ts | Tests web-search store defaults/rehydration and Claude tools persistence. |
| tests/server/provider-config.test.ts | Extends provider-config tests for provider-specific web search API key resolution (Tavily + Claude). |
| public/logos/tavily.svg | Adds Tavily logo asset for provider UI. |
| lib/web-search/types.ts | Extends web-search provider typing (adds claude, model metadata). |
| lib/web-search/tavily.ts | Refactors Tavily search to accept configurable baseUrl. |
| lib/web-search/constants.ts | Registers Tavily/Claude providers, icons, and Claude model list. |
| lib/web-search/claude.ts | Implements Claude web-search provider (Messages API + SSRF-guarded page fetching). |
| lib/types/web-search.ts | Makes WebSearchSource.score optional to support providers without scoring. |
| lib/store/settings.ts | Adds multi-provider web search settings (enabled toggle, provider selection, model/tools/models config, rehydrate helpers). |
| lib/server/provider-config.ts | Adds web-search provider/env mapping and provider-aware API key resolution. |
| lib/server/classroom-generation.ts | Wires provider selection/config into classroom generation web-search step (with SSRF baseUrl validation). |
| lib/server/api-response.ts | Adds MISSING_PROVIDER error code for API responses. |
| lib/i18n/locales/en-US.json | Updates web-search strings and adds new Claude/model/tool configuration labels. |
| lib/i18n/locales/ja-JP.json | Same as above for Japanese locale. |
| lib/i18n/locales/ru-RU.json | Same as above for Russian locale. |
| lib/i18n/locales/zh-CN.json | Same as above for Simplified Chinese locale. |
| components/settings/web-search-settings.tsx | Expands settings UI for per-provider keys/baseUrl plus Claude tools/models management and connection testing. |
| components/settings/web-search-model-dialog.tsx | Adds dialog to create/edit/test Claude models. |
| components/settings/tool-edit-dialog.tsx | Adds dialog to create/edit Claude tool definitions. |
| components/settings/index.tsx | Updates settings dialog state/selection to support nullable web search provider selection. |
| components/generation/generation-toolbar.tsx | Adds web-search toggle + provider/model selection popover (multi-provider aware). |
| app/page.tsx | Migrates old localStorage web-search toggle into Zustand store and routes toolbar toggle through store. |
| app/generation-preview/page.tsx | Sends providerId + providerConfig when calling /api/web-search. |
| app/api/web-search/route.ts | Updates web-search API to require providerId, validate baseUrl via SSRF guard, and route to Tavily/Claude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wyuc
left a comment
There was a problem hiding this comment.
Rebase onto current main to resolve conflicts.
Two things to fix:
|
Bug: Fix: use the Anthropic SDK ( |
|
The |
…handle duplicated claude model keys
… handle duplicated claude model keys
Keep webSearch in Zustand store (feat/claude-search approach) and interactiveMode in local form state with localStorage persistence (from main). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… instead of adding Anthropic SDK as a direct dependency
Cast mock.calls through unknown to avoid tuple-index type errors on Vitest mock objects whose parameter types are inferred as empty tuples. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Adds a new Claude-based web search provider (via Anthropic Messages + web_search_* tools) and upgrades the app to support multiple web search providers end-to-end (store, UI, API, and server generation), including SSRF protections for page/content fetching.
Related Issues
Closes #392
Changes
Type of Change
Verification
Steps to reproduce / test
Evidence
pnpm check && pnpm lint && npx tsc --noEmit)Before
After
Checklist