Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.
Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.
Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
`video_lesson` (CLI alias `lesson`) turns a question into a playable
Remotion explainer:
1. code_generation: the lesson writer drafts Lesson.tsx
2. render_check: compile and frame-check it, feeding failures back,
up to three attempts
3. render_output: write the player page and emit it as an html artifact,
along with the lesson's summary and source
npm packages are installed on first use while the first LLM call is
still running. The capability reports itself unavailable when node or
npm is missing. Its LLM budget lives under plugins.video_lesson in
agents.yaml (48k tokens by default: a whole lesson comes back in one
reply).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ship original-source visual practice, recoverable indexing, unified video
Reading, scientific research tools, managed plugins, and a learning journal
as summarized in assets/releases/ver1-6-14.md.
Improve provider setup and protocol-aware endpoints. Restore missing
localized setup and Ukrainian UI text, keep plugin loading in the plugin
layer, harden research XML parsing, and repair isolated test fixtures and
type-checking errors found by the release gate.
Sync README prose and all eleven translations, bump the package version,
and update the stable release announcement.
Validation: 10180 Python tests and 8 subtests passed (28 skipped); 1303
Node tests passed on Node 22; 24 provider UI tests passed. All pre-commit
hooks, ruff, translation checks, documentation checks, and docs build passed.
Adapted the migration foundation from PR #1384 while preserving current workspace, caption and turn-admission safeguards.
Co-authored-by: XZH <cto@xzh.ai>
* fix(embedding): do not serialize requests when batch delay is zero
The spacing lock was held around every embedding HTTP call, so concurrent indexing stayed serial even when batch_delay was 0.
Fixes#1779
* fix(embedding): treat LAN Lemonade endpoints as keyless local servers
OpenAI-compatible profiles pointed at a private Lemonade port were still required to have an API key, so LlamaIndex knowledge bases failed to initialize.
Fixes#1782
* fix(reading): keep headings that follow fenced code examples
The reader treated any line starting with the fence character as a toggle, so an example fence swallowed every later heading.
Fixes#1641
* fix(learning): hide surfaces a learner account cannot use
The auth status already returned the learning policy, but the sidebar ignored it, and model options answered 403 for those accounts.
Fixes#1222
* fix: three bug fixes - embedding local keyless, qwen3-instruct enable_thinking, embedding concurrency lock
- fix#1782: embedding resolver now applies sk-no-key-required fallback for local providers (vllm/ollama/lemonade) matching the LLM resolver behavior; also detects local base URLs before returning 'custom' hint so keyless local endpoints (e.g. Lemonade Server on localhost) are classified as local
- fix#1796: exclude -Instruct model variants from qwen3 enable_thinking pattern matching; Qwen3-Instruct/Qwen3-VL-Instruct models reject enable_thinking parameter (provider error 20015)
- fix#1779: global spacing lock no longer held across HTTP embed calls when batch_delay=0, restoring concurrent embedding; lock now only guards the minimum-interval wait and timestamp update; removed redundant post-batch delay; applied same fix to embed_contents
* fix(reading): respect fence indentation and verify learner navigation
* fix(embedding): share start pacing without serializing requests
* fix(embedding): preserve local endpoint protocols across inference
---------
Co-authored-by: Rockynowzzz <198366628+Rockynowzzz@users.noreply.github.com>
Co-authored-by: dajiaohuang <dajiaohuang@users.noreply.github.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Opper (https://opper.ai) is an EU-hosted AI gateway: 700+ models from
50+ providers behind one OpenAI-compatible API and one key. This adds it
as a named provider. The LLM entry follows the Requesty one (#1631). The
embedding entry follows the OpenRouter one, with a default model and
dimension like the OpenAI entry.
- provider_registry.py: gateway ProviderSpec after FutureInfra. Env
OPPER_API_KEY, base URL https://api.opper.ai/v3/compat. Base URL
detection keys on the api.opper.ai host rather than a bare "opper"
substring, so unrelated URLs that happen to contain it are not claimed.
- Embeddings: Opper serves OpenAI-compatible /embeddings under the same
base URL. Registered in embedding_endpoint.py (label, default endpoint,
/embeddings path rule), provider_runtime.py (default
text-embedding-3-large, 3072 dims) and the GraphRAG OpenAI-compatible
binding set.
- Tests: registry lookup and base detection, runtime resolution for the
opper binding and for an openai binding pointed at Opper, the Settings
LLM choice, native tool calling, the embedding runtime and the GraphRAG
api_base translation.
Like the other recent gateway additions, it stays out of the curated
init menus, the README and the capability table. Opper model ids are
bare names (claude-sonnet-4-6, gpt-5.4-mini, text-embedding-3-large), so
the existing model-level rules for claude-, gpt-5 and gemini apply as
they are, and the text-embedding-3 rule sends dimensions=3072.
Checked: python -m py_compile on the ten changed files, git diff --check.
Not run locally: pytest, ruff and pre-commit.
Disclosure: I work at Opper.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Adds a ProviderSpec for Y-API plus the same three assertions the other
gateway rows carry. Declares the Anthropic Messages endpoint through
api_base_by_format, so profiles on this provider can pick that wire.
Register FutureInfra as an OpenAI-compatible gateway provider (env FUTUREINFRA_API_KEY, base URL https://futureinfra.ai/v1/ai, alias future_infra) with tests mirroring the Cheaper Inference provider.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combine knowledge bootstrap coverage and preserve later progress-isolation tests, native notebook tooltip, and locale-aware tool-hint fallback. Regenerate frontend contracts and align test fixtures with merged APIs.
Keep the streaming 64-char probe strict, then re-read a finished report
reply so an unclosed/over-wide fence or a matching ## n. heading no
longer kills the turn. Raise report_section max_tokens to 12000 and
turn reasoning off for report prose so first attempts stop starving.
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.
Resolves two collisions with the fixes committed locally tonight:
* book/blocks/_llm_writer.py — #1366 threaded a reasoning_effort
through llm_json while 5ac8e2c9 replaced this file's private
_json_has_expected with the shared json_payload_is_usable.
Taking either side alone breaks: origin/dev's calls a helper that no
longer exists, ours drops the caller's explicit effort. Kept the shared
helper and the threading, and the retry now reuses an explicitly given
effort so a round deliberately run without thinking cannot re-enable it.
* runtime/agentic/tool_dispatch.py — #1357 added tool_timeout /
tool_max_retries to execute_tool_call in the same parameter list where
4e816d79 renamed unknown_error_message_factory (tool) to
tool_error_message_factory (tool, error). Both are needed: the
dispatcher already passes the timeout pair through, and every call site
in the tree now uses the renamed factory.
Ask for a quiz with a reasoning model and sometimes one question arrives,
sometimes none, with nothing in the UI and one `LLM returned empty
response` in the log (#1318). Reproduced on both a 35B llama.cpp build
and a 27B vLLM one, so it is not a model or a backend.
The plan step is a single labeled call that must emit a whole JSON object
of templates, and it had the tightest budget in the file — 2000, below
even the 4096 the `question` capability ships with. A reasoning model
pays for its hidden tokens out of that same allowance, so on a rich
exploration trace it can spend the lot before the label. `PLAN_MAX_TOKENS`
is now 6000: the plan itself is a few hundred tokens and the rest is room
to think in.
A bigger number is not the fix, because no number is large enough for
every model. The fix is that the step now says what happened.
`run_labeled_step` strips the scratchpad on the way out — deliberately,
so a truncated one never reaches a reader — which left "starved
mid-thought" and "the model genuinely said nothing" as the same empty
string. `_parse_plan` read it as a plan of zero templates and phase 3,
which iterates them, emitted no questions and no error.
`LabeledStepResult.reasoning_only` separates them: no label ever arrived,
no text, no tool calls, and the model demonstrably did reason (inline
`<think>` or the provider's own channel). Tool calls disqualify it — that
round acted, it just did not narrate, and re-asking would repeat the
call. The plan step spends the signal on one more attempt with thinking
turned down, which is the same escape hatch Book already uses; its
`RETRY_REASONING_EFFORT` moved to `services/llm/reasoning_params` so the
choice of level, and why it is "low" and not "minimal", is stated once.
Every labeled step in the codebase now carries the flag, so `EXPLORE`,
`QUIZ` and `REPAIR` — which share the same exposure on smaller budgets —
are at least diagnosable. Whether an under-filled plan should warn or
fail is a separate question and is deliberately left where it was.
Stop the Ollama a vector KB embeds against, ask a question, and the model
is told "An unknown error occurred while executing rag." The adapter had
already written the answer — `Cannot connect to Ollama at
http://localhost:11434. Make sure Ollama is running. Start it with:
ollama serve` — and the dispatcher was holding it (#1356).
`unknown_error_message_factory` took the tool name and nothing else, so
no caller could have done better. Four capabilities each wrote their own
message from that one argument and three of them called the result
unknown; the fourth, pageindex, restated the dispatcher's own default
minus the cause. The name was the bug: it presumed a cause the runtime
always had.
It is now `ToolErrorMessageFactory`, `(tool, cause) -> str`, and the key
plus the English wording live once in `tool_error_message_factory`, which
each capability wraps around its own `_t`. Capabilities keep their
translations and can no longer keep the cause out of them. pageindex
passes nothing and takes the default. A bundle predating the new
`notices.tool_error` key falls back to English rather than to silence
about what went wrong, which is the reason the fallback carries the cause
too.
This is the same shape as read_skill answering "skill not found" when the
skill resolved and only the file was missing (#1347): a failure the
caller cannot see has no way out, and the model spends its rounds
inventing one.
The regression test is the reporter's turn — a `rag` call raising the
real adapter error — and asserts the endpoint and the remediation reach
the role=tool message.
DeepSeek's thinking models reject a continuation whose history has lost the
previous assistant turn's reasoning:
The `reasoning_content` in the thinking mode must be passed back to the API.
Chat's loop has replayed it since #1058. The shared `runtime/agentic` loop —
the one quiz, research, PageIndex and explore_context all run on — never
did. `LabeledStepResult` had no field for it; the stream reader pulled
`reasoning_content` off each delta, pushed it to the trace UI for display,
and dropped it. All three assistant rebuild sites therefore emitted
reasoning-less turns. Round one cannot fail (system + user only); round two
always did, which is why this reads as "quiz generation failed".
The message builder's own docstring said as much: "The provider has always
known how to read this field off a message — nothing ever wrote it."
v1.6.5 made it visible rather than causing it. `deepseek-v4-flash` was in
`_THINKING_DISABLED_BY_DEFAULT_MODELS` in v1.6.4 and the list was emptied,
so the model now thinks by default — correctly, since suppressing reasoning
to dodge this cost every flash user their reasoning stream. `deepseek-v4-pro`
and `deepseek-reasoner` are sent `thinking: enabled` by our own code and were
already broken in v1.6.4. Re-adding flash to that list would hide it again
and still leave those two broken, so this fixes the replay instead.
The reasoning is accumulated for every label, not only the pre-label prelude
the trace happens to render — whether it was displayed is a display question,
and the provider wants the whole round back. Anthropic's signed thinking
blocks are read off `provider_specific_fields`, where the adapter puts them,
because a signature cannot be rebuilt from text. `_append_repair_messages`
now takes the step rather than its text, since a repair round is still a
round. Rounds with no reasoning append no field, so ordinary models see a
byte-identical history.
Deliberately NOT setting `_provider_response_state` alongside: the shared
loop posts its messages straight into `chat.completions.create` on what is
usually a raw AsyncOpenAI client, and the private-key stripping lives inside
`OpenAICompatProvider._sanitize_messages` — so it would be serialized into
the request body for every model off the adapter route.
Also reorders `_classify_failure`: a provider quoting the field it objected
to was landing in `prompt_leak`, which is not retryable and told the user the
model had leaked a prompt. `"prompt" in lower` goes with it — it matches
`prompt_tokens`.
Still open: `_sanitize_messages(responses_api=True)` ignores `reasoning_content`
entirely, so a surface that mounts native web search (which routes DeepSeek
to the Responses API) is not covered by this and falls back to Chat
Completions. The book quiz mounts no tools, so it is not that surface.
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
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.
Release notes: assets/releases/ver1-6-4.md
When a required string key is present but blank, tell the model it sent an empty value instead of framing it as omitted — thinking models otherwise retry the identical call. Also clarify obsidian_create_note.content must be non-empty.