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.
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>
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.
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
- The Add model panel now asks for a model ID (prefilled from provider
defaults and discovered models) and keeps Continue disabled until it is
filled, so an unusable row can no longer reach the draft.
- The model editor marks a blank ID as required, explains it inline, and
blocks "Set as default" until it is fixed.
- Apply now names the first incomplete model and opens the page and row
that can repair it, instead of failing with a message pointing nowhere.
- Add/selection state lives in the URL, so refreshing no longer swaps the
add panel for the list (or vice versa).
- Backend guidance points at the current page names (Language models /
Embedding models / Search) instead of the removed Catalog page.
- Regression tests cover the add flow, URL state, editor validation, and
the Apply preflight; new i18n keys for en/zh/de/pl/fr/uk.
Co-Authored-By: Claude <noreply@anthropic.com>
_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>
Ship the reading, listening, question-bank, parsing, and provider updates
summarized in assets/releases/ver1-6-13.md.
Make speech timeouts configurable, report actionable synthesis failures,
and keep chat attachments discoverable in their selected workspace while
preserving earlier uploads and URLs. Keep reply playback cancellation and
single-audio ownership intact.
Sync README prose and all eleven translations, update the stable install
note, and archive release notes older than one week. Repair stale reading
test fixtures and spawned test imports, and clear the Partner type error.
Validation: 9252 Python tests and 8 subtests passed (28 skipped); 518 web
unit tests, 1253 Node tests, and 62 browser audits passed. Pre-commit, ruff,
typecheck, contracts, architecture, i18n, production build, route budgets,
and the docs build passed.
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.
The interface ships in French and Ukrainian alongside English and
Chinese, and /language pins a reply language for one conversation.
Immersive reading organizes collections as colored folders, adds a
fullscreen learning mode, and turns Explain / Translate / Guide me on a
selection into ordinary messages in the reading chat; "Quiz me on this
page" runs one quiz turn without changing the conversation's mode, which
retires the reading-openers endpoint and its task model. Images embedded
in DOCX, PPTX and PDF are extracted in place and reach vision models.
Office files preview as paged PDFs through LibreOffice (now in the Docker
image), falling back to the in-browser renderers without it. Web sources
re-sync on a durable schedule, linked folders sync on demand, .bib files
index, and a zotero_search tool queries Zotero. Settings gains Learning
progress and credential-free presets; admins import users from CSV;
split deployments can hand a session to a public device. Grok CLI joins
the subagents, Unifically the providers, ChatGPT exports the importers.
Gate cleanup: mypy/bandit findings in the new launcher, audio-overview,
web-source, reading-store and textbook modules; the task-model copy test
follows the retired reading_openers kind.
See assets/releases/ver1-6-11.md for the full notes, and the README
Releases row plus its eleven translations.
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.
Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.
Release notes: assets/releases/ver1-6-5.md
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.
- Remove CONSOLIDATION_TYPES and explicit consolidation parameter;
auto-consolidate for providers without native answer support.
- Build LLM/Embedding/Search configs directly from resolved runtime
config in ConfigTestRunner instead of relying on global cache.
- Clean up default settings by removing unused consolidation fields.
Made-with: Cursor
- Modified _get_template_for_provider() to return None instead of raising ValueError
- Added _format_simple_results() as provider-agnostic fallback formatter
- Modified _consolidate_with_template() to use fallback when no template exists
- Fixes searxng (and other providers) failing with 'no template consolidation available' error