Repository navigation
feat(decopilot): split web research into web_search + deep_research - #4134
Merged
Merged
Conversation
Separate the single "Web research" model tier/tool/mode into two: - `web_search` — quick, streaming search (e.g. Perplexity Sonar) - `deep_research` — slow, multi-source async research (e.g. Gemini Deep Research, perplexity/deep-research) Both tools are registered when configured, so the agent picks the right one per task; the chat Tools popover exposes each as its own mode/pill. The quick `web_search` tool forces the streaming path so a misconfigured deep/async model can never turn a quick lookup into a slow research job. Settings now shows two rows (Web search / Deep research) with capability-aware model filters. Migration 118 splits the existing `web_research` org tier by model id — deep/async models route to `deep_research`, everything else to `web_search` — leaving the other slot to fall back to a curated default rather than blindly copying into both. Co-Authored-By: Claude Opus 4.8 <[email protected]>
… classifier Address review feedback on the web_search/deep_research split: - Add unit tests for migration 118's tier classification and the load-bearing "quick mode never launches an async job" path-selection guarantee in createClusterResearchJob. - Centralize the quick-vs-deep model classifier in @decocms/mesh-sdk (isQuickSearchModel / isDeepResearchModel) and consume it from chat, settings, and the default-picker — was duplicated across three sites. Broaden quick search beyond Perplexity Sonar to also recognize OpenAI *-search-preview and OpenRouter :online models; asyncResearch is now the load-bearing exclusion, name-matching only secondary. - Clarify in comments that mode "quick" is a backstop against launching an async research job, not a latency guarantee — the capability-aware UI filter is the primary guard keeping slow models out of the slot. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Conflict: apps/mesh/migrations/index.ts — main shipped migrations 118-121, colliding with this branch's 118-split-web-research-tier. Renumbered the unmerged migration 118 -> 122 (next free slot) and updated its file names, self-reference, test import, and the 077 back-reference comment. SimpleModeTier in storage/types.ts auto-merged cleanly (web_research -> web_search/deep_research). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
viktormarinho
added a commit
that referenced
this pull request
Jun 25, 2026
#4134 split the `web_research` simple-mode tier into `web_search` + `deep_research`, and SimpleModeConfigSchema requires all six tier keys to be present. The multi-pod cluster seeder still sent the pre-split shape (`web_research: null`, no `web_search`/`deep_research`), so ORGANIZATION_SETTINGS_UPDATE rejected the payload, the org's "smart" tier was never persisted, and every cluster chat/automation fell back and failed with `TierUnavailableError: No model available for tier "smart"`. That broke 3 multi-pod scenarios on main: cross-pod `/attach` and the two automation-webhook tests. Send the post-#4134 tier shape so the smart tier persists. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
viktormarinho
added a commit
that referenced
this pull request
Jun 25, 2026
…tup (#4150) #4134 split the `web_research` simple-mode tier into `web_search` + `deep_research`, and SimpleModeConfigSchema requires all six tier keys to be present. The multi-pod cluster seeder still sent the pre-split shape (`web_research: null`, no `web_search`/`deep_research`), so ORGANIZATION_SETTINGS_UPDATE rejected the payload, the org's "smart" tier was never persisted, and every cluster chat/automation fell back and failed with `TierUnavailableError: No model available for tier "smart"`. That broke 3 multi-pod scenarios on main: cross-pod `/attach` and the two automation-webhook tests. Send the post-#4134 tier shape so the smart tier persists. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
tlgimenes
added a commit
that referenced
this pull request
Jun 25, 2026
main's #4134 (split web_research into web_search + deep_research) changed two registered-workflow files — automations/dbos-workflow.ts and harnesses/decopilot/background-tool-workflow.ts — entirely inside existing step bodies (no DBOS.runStep added or reordered). Recovery-compatible, so no DBOS_WORKFLOW_VERSION bump; just re-baseline the source-hash snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tlgimenes
added a commit
that referenced
this pull request
Jun 25, 2026
…ed stranding (#4143) * feat(dbos): add manually-maintained DBOS_WORKFLOW_VERSION constant * feat(dbos): inject pinned applicationVersion via buildDbosConfig * docs(dbos): tripwire comments linking workflows to DBOS_WORKFLOW_VERSION Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(dbos): source-hash guard forcing a version decision on workflow changes * docs(dbos): note DBOS Cloud bypass + qualify guard's marker-form coverage Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(dbos): log the pinned application version on boot for verifiability * fix(dbos): drop unused exports flagged by knip (guard internals stay module-private) * chore(dbos): re-baseline workflow-source snapshot after main merge main's #4134 (split web_research into web_search + deep_research) changed two registered-workflow files — automations/dbos-workflow.ts and harnesses/decopilot/background-tool-workflow.ts — entirely inside existing step bodies (no DBOS.runStep added or reordered). Recovery-compatible, so no DBOS_WORKFLOW_VERSION bump; just re-baseline the source-hash snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
tlgimenes
pushed a commit
that referenced
this pull request
Jul 16, 2026
…TS.md (#4475) Mined ~300 merged PRs for the delta between the first PR proposal and the work added before merge. The dominant shape: a first draft ships the happy path, then a hardening pass (often a different engineer who takes over the branch and merges — the vibecoder→engineer handoff) adds the same categories every time. Encoded those 9 categories as an actionable first-pass checklist, each citing a real PR (#4008, #4230, #4365, #4409, #4426, #4445, #4357, #4355, #4449, #4350, #4373, #4416, #4446, #4461, #4134, #4469). Covers: variant/edge-case handling, tenant/permission scoping, concurrency & silent-data-loss, test-per-fix + invert-bug-tests + real-PG, dead-code/knip, lifecycle symmetry + state reset, kill-switch/GC/git-exclude for risky infra, input validation vs over-engineering, compile-time type-safety. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Splits the single Web research model tier / tool / chat mode into two distinct ones so the user (and the agent) can choose intent explicitly:
perplexity/deep-research)Why
Today there's one
web_researchslot and oneweb_searchtool; behavior is decided entirely by which model is configured. If a deep-research model is the configured default, every web search — agent-initiated or the chat toggle — kicks off the slow async job, even for trivial questions. This separates the two so a quick lookup stays quick.What changed
Model tiers / config —
web_research→web_search(quick) +deep_research(deep), threaded through schema, storage, SDK defaults,resolveTier,ModelsConfig(models.webSearch+models.deepResearch), per-slot providers, normalize/permissions/dispatch, automations, and background reaction turns.Tools —
web_search(mode"quick", always streaming) + newdeep_research(mode"deep", async when supported), both via the sharedcreateClusterResearchJobfactory. Forcing streaming on the quick tool means a misconfigured deep/async model can't turn a quick lookup into a slow job.Chat modes — added
deep-researchalongsideweb-searchacross the wire schema, persisted run-config, mode-config (tool forcing + instruction prompt), Tools popover (🔭 Deep research item), and composer pills.Settings UI — one "Web research" row → two rows (Web search / Deep research) with capability-aware model filters (quick row hides async-only deep models; deep row favors them).
Migration 118 — capability-aware split of the existing org
web_researchtier: deep/async model ids →deep_research, everything else →web_search, leaving the other slot to fall back to a curated default (rather than blindly copying into both, which would re-create the slow-search bug for orgs on a deep model).Testing notes
bun run check✅ ·bun run lint✅ (0 errors) · unit tests ✅One follow-up: the
deep_researchtool currently reuses the existingdata-web-searchstreaming UI, so its progress card renders identically to web search. Can add a distinct "Deep research" card if desired.🤖 Generated with Claude Code
Summary by cubic
Split “Web research” into two paths:
web_search(quick, streaming) anddeep_research(slow, multi‑source). Users and agents can pick the right intent, and quick lookups no longer trigger slow deep research.New Features
web_researchtier withweb_searchanddeep_researchacross schema, storage,ModelsConfig,resolveTier, permissions, dispatch, automations, and background reactions.web_search(forces streaming) anddeep_research(uses async when supported). Each resolves its own provider (webSearchProvider,deepResearchProvider) and shares thecreateClusterResearchJobfactory.deep-researchchat mode. Both web-search and deep-research modes are one-shot. Updated wire/run-config schemas and the instruction prompt to guide tool choice.WEB_SEARCH_MODEL_PREFERENCESandDEEP_RESEARCH_MODEL_PREFERENCES; addedisQuickSearchModel(Id)andisDeepResearchModel(Id)in@decocms/mesh-sdkand used them in settings, chat pickers, and the default picker. Quick search also recognizes OpenAI*-search-previewand OpenRouter:online, and excludes async‑only deep models.Migration
web_researchintoweb_searchvsdeep_researchbased on model id containing “deepresearch” (punctuation/case‑insensitive).deep_research; everything else (e.g. Sonar) toweb_search. Leaves the other slot empty to fall back to curated defaults, avoiding slow-search regressions.Written for commit 205d330. Summary will update on new commits.