30 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
9e7f44f978 Merge PR #2616: feat(search): add SearchApi provider with web, news and scholar modes
Remove the obsolete Google News link=resolved parameter; preserve returned redirect URLs and verify them with a realistic response fixture.
2026-11-14 23:06:04 +08:00
Bingxi Zhao (Frank)
7af36949bb Merge PR #2654: feat(search): make the Zhipu request engine configurable (#2617)
Keep all four supported Zhipu engines, including saved Sogou and Quark profiles; verify config aliases and request overrides and format tests.
2026-11-14 23:05:33 +08:00
Bingxi Zhao (Frank)
4c67b87018 Merge PR #2529: feat: add SpecStream as a web search provider
Register both independently added search providers and preserve both provider test cases and display labels.
2026-11-14 23:00:45 +08:00
wmym
108cddf26d feat(search): make the Zhipu request engine configurable (#2617)
The Zhipu web-search provider hardcoded search_std, leaving search_pro
( higher recall, 3x price ) unreachable from any configuration surface.

- providers/zhipu.py resolves the engine from the call-time value, then
  the provider config's search_engine/engine field, then search_std;
  only search_std/search_pro are allowed and unknown values warn and
  fall back to the default instead of raising.
- The engine rides the resolved search config the same way max_results
  and proxy do: active search profile field first, then
  tools.web_search.search_engine in main.yaml, then None (provider
  default), injected into the provider kwargs by web_search().
- get_current_config() surfaces the resolved engine.

Tests cover the default payload, config-driven search_pro, the engine
alias, invalid values warning and falling back, and the end-to-end
settings -> resolved config -> real ZhipuProvider -> payload flow.
2026-11-13 01:24:43 +08:00
Gabs Ferreira
c027138329 feat(search): add SearchApi provider with web, news and scholar modes
Add SearchApi (searchapi.io) as a web-search provider, following the Serply
shape: one key, three modes (search -> google, news -> google_news,
scholar -> google_scholar) behind a single GET endpoint selected by the
`engine` parameter. Rows are plain SERP results, so consolidation still
writes the answer and Scholar rows render through the shared academic
template via the `searchapi_scholar` -> `serper_scholar` mapping.

- Key travels only as `Authorization: Bearer`, never in the URL; requests
  carry `Accept: application/json` and `User-Agent: DeepTutor`.
- Google retired `num` for web and news results, so those are cut
  client-side with `max_results`; Scholar still honors `num` (capped at 20).
- News sends `link=resolved` so links point at the publisher instead of a
  Google redirect, and prefers `iso_date` over the relative `date`.
- Scholar maps `publication`, `inline_links.cited_by.total`, `resource.link`
  and `data_cid` onto the Serper attribute keys; a dead `javascript:` PDF
  badge is dropped.
- Non-200 raises with the API's `error` message; a non-JSON body raises too.
- Spec table entry (`requires_api_key=True, soft_fallback=False`), registry
  import, consolidation mapping and `deeptutor init` wizard entry reading
  `SEARCHAPI_API_KEY` / `SEARCH_API_KEY`.
- Nine tests mirroring the Serply block, with fixtures shaped after live
  responses from each engine.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-10 15:58:19 -03:00
evan188199-tech
0a54ec76af feat(search): add DeepSeek standalone SERP provider (POST /v1/tools/search)
Engine-level search provider backed by DeepSeek's /v1/tools/search endpoint,
distinct from the model-side web_search tool mapping: works with any
configured LLM. Rows carry no model-written answer, so consolidation still
supplies it.

- providers/deepseek.py: Bearer auth, count capped 1-50, need_content
  default False (page Markdown kept in SearchResult.content only when
  requested), summary preferred over snippet as the model-facing blurb,
  authority/rerank_score in attributes, proxy honored, base_url used
  verbatim with the documented endpoint as fallback. No new dependency.
- SEARCH_PROVIDERS: label DeepSeek, requires_api_key=True,
  soft_fallback=False (billed per request; a missing key raises instead
  of landing on DuckDuckGo).
- Init wizard entry with DEEPSEEK_API_KEY/SEARCH_API_KEY env keys, keeping
  the wizard set equal to the backend table.
- TracePresentation PROVIDER_LABELS: deepseek -> DeepSeek (titleCase would
  render "Deepseek").
- Tests: row mapping, 401/402/429 paths, missing key fails before network,
  and the base_url/proxy/max_results contract via _NEW_PROVIDERS.
2026-11-09 11:52:03 +08:00
evan188199-tech
70f610a63c feat: add SpecStream as a web search provider
GET /v1/web-search with Bearer auth, answer-first: the confirmed answer
maps onto WebSearchResponse.answer (supports_answer), ranked sources onto
citations/search_results, and list rows ride along in metadata. No count
parameter exists on the endpoint, so max_results caps client-side like
Aliyun IQS. Registered in the SEARCH_PROVIDERS spec table as a paid
provider (soft_fallback=False); tests mock requests offline.

Closes #2516
2026-11-09 07:04:12 +08:00
Bingxi Zhao (Frank)
2c47cc22ce fix(integration): authenticate search and regenerate route contracts 2026-10-29 01:19:18 +08:00
Bingxi Zhao (Frank)
5ad749ac9c Merge pull request #2025: You.com search provider 2026-10-29 01:13:31 +08:00
Bingxi Zhao (Frank)
dd31a77f58 Merge pull request #2076 into validated PR integration 2026-10-29 00:56:11 +08:00
aleekaz
ac742e572f feat(search): add google-browser-scraper as a self-hosted Google provider 2026-10-26 20:46:26 +03:00
Rudy Celekli
d57770ed65 fix(search): don't let flagged long references bypass Moderation
_moderation_rejections keyed its decision dict by text.strip()[:4000] while
filter_web_search_response looked the decision up by the unstripped row text
(_reference_text(...)[:4000]). When a reference exceeded the 4000-char cap and
the cut landed on whitespace, the stripped key differed from the row text, the
lookup missed, and a reference OpenAI Moderation had flagged survived into the
results — the exact fail-open the stage exists to prevent. Key the dict by each
exact submitted text and cap only the payload sent to the API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:33:12 -04:00
XZH
0d26c4b1f4 feat(search): add You.com provider (#1915) 2026-10-22 13:40:22 -07:00
Saleh Alghusson
8efdd87d16 feat(search): send X-Pplx-Integration header to Perplexity 2026-10-08 13:15:06 +00:00
Mohammad Hijjawi
ef3742daf2 fix: consolidate web search results up to the configured max_results
web_search() fetched max_results results from the provider but built
the AnswerConsolidator with its default max_results=5. For providers
without their own answer, the template and LLM consolidation kept only
the first five results, so a search profile set to 6-10 results still
gave the model five sources while the footer reported all of them.

Pass the resolved max_results to the consolidator.
2026-09-28 09:48:40 +01:00
Bingxi Zhao (Frank)
4b68b2b452 Bound Web Risk lookup batches and scope indexing progress per run 2026-09-23 10:49:32 +08:00
ZQR1101
92aea79cd4 feat(search): add Web Risk lookups and renumber filtered citations (#375) 2026-09-10 00:18:59 +08:00
ZQR1101
5e47f0d3de feat(search): filter unsafe web-search titles and snippets (#1205)
Extend source_filter beyond URL hygiene with title/snippet heuristics, optional OpenAI Moderation, and an opt-in educational trusted-domains preset (#375 stage 2).

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-09-03 15:30:21 +08:00
XZH
0cb0a269a7 chore(ci): format dev baseline for ruff 2026-08-31 08:55:52 -07:00
Bingxi Zhao (Frank)
91cfc40456 Merge pull request #1060 from evan188199-tech 2026-08-31 18:49:34 +08:00
Bingxi Zhao (Frank)
8cfec4e685 Merge pull request #1033 from contributor
# Conflicts:
#	deeptutor/tools/prompting/hints/en/exec.yaml
#	deeptutor/tools/prompting/hints/zh/exec.yaml
2026-08-31 18:36:05 +08:00
XZH
57f39ce183 feat(search): add reference safety filtering (#375) 2026-08-27 14:16:23 -07:00
zhou2030109-glitch
b342b63b7a fix: align Windows exec runtime and search readiness 2026-08-27 17:17:03 +08:00
Bingxi Zhao (Frank)
57a2631804 fix(search): align Serply requests with documented API 2026-08-26 01:06:36 +08:00
serply
6c1a615ed1 feat(search): add Serply provider with web, news and scholar modes 2026-08-26 01:05:03 +08:00
Bingxi Zhao (Frank)
f4f2a73b2a feat(search): rebuild the search provider layer and add six providers
Two pieces of work land together because the second is built on the
first: the provider layer was consolidated onto one spec table, then six
new providers were registered against it.

Layer overhaul
- Converge seven separate provider lists (backend registry, runtime
  config, settings router, CLI wizard, frontend catalog, i18n, tests)
  onto a single SEARCH_PROVIDERS spec table; every consumer derives from
  it instead of keeping its own copy.
- Fix three silent defects: serper's `num` never reached the API (it was
  swallowed by **kwargs, so max_results did nothing), serper dropped its
  proxies, and jina had no result-count limit at all.
- A runtime failure (rate limit, timeout, unreachable network) no longer
  fails the whole turn. The request walks the user's other credentialed
  search profiles and finally DuckDuckGo, recording the downgrade under
  a top-level `search_fallback` key so the trace shows what happened.
- Drop three provider modules that were never registered (exa, baidu,
  openrouter). They stay in the deprecated list, so a stale config reads
  as outdated rather than as a misspelled name.

Six new providers
doubao, bocha, zhipu, firecrawl, qianfan, aliyun_iqs — selectable under
Settings > Catalog > Search with their credential fields derived from the
spec table, and offered by `deeptutor init`. All six set
`soft_fallback=False`: five are China-hosted and the DuckDuckGo fallback
is unreachable on those networks, so a missing API key has to fail
loudly instead of silently timing out somewhere else.

Baidu returns as `qianfan` on the official Qianfan API; the old `baidu`
key stays deprecated.
2026-08-13 16:41:39 +08:00
Bingxi Zhao (Frank)
593ddba3fb feat(co-writer): add multi-doc co-writer workspace with backend storage
- Add co-writer storage module and API router for document persistence
- Restructure co-writer page to per-doc routing ([docId]) with sidebar recent list
- Wire CoWriterRecent into sidebar shell and AppShellContext
- Tidy notebook prompts, facade, path service, and builtin tools wiring
- Refresh tests (add missing __init__.py, drop obsolete app_facade test)
- Add favicon/apple-touch-icon assets and minor i18n cleanup

Made-with: Cursor
2026-04-20 19:46:41 +08:00
Bingxi Zhao (Frank)
c15e22a4b3 chore: stable fix, add tutorbot 2026-03-20 20:27:17 +08:00
Bingxi Zhao (Frank)
9e8cea8294 fix: update embeddings config & provide perplexity search 2026-03-14 00:37:52 +08:00
Bingxi Zhao (Frank)
f3779138ae fix: remove lightrag and unify llm & search config 2026-03-13 23:48:49 +08:00