Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HKUDS/DeepTutor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.6
Choose a base ref
...
head repository: HKUDS/DeepTutor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.7
Choose a head ref
  • 12 commits
  • 26 files changed
  • 5 contributors

Commits on Apr 30, 2026

  1. fix: fallback content to reasoning_content when DeepSeek returns empt…

    …y content field
    
    DeepSeek models (v4-flash, reasoner, etc.) return the actual response in the
    reasoning_content field while leaving content empty when thinking mode is
    enabled. The _parse() method only fell back to m.reasoning (DashScope-style),
    causing "LLM returned empty response" errors.
    
    Also fix idea_agent to handle LLM responses that are JSON arrays instead of
    objects with an "ideas" key.
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    cf9d021 View commit details
    Browse the repository at this point in the history
  2. fix: add reasoning_content fallback in streaming path and align prece…

    …dence
    
    - Swap reasoning_content/reasoning fallback order in _parse() to match
      the precedence used when extracting reasoning_content (per Copilot review)
    - Add reasoning_content → content fallback in _parse_chunks() for both
      provider_core and tutorbot providers
    - Fix streaming path in factory.py: when only reasoning chunks are
      emitted (no direct content), fall back to response.content so
      downstream consumers receive non-empty responses
    - Harden idea_agent against non-dict JSON payloads
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    96070fa View commit details
    Browse the repository at this point in the history
  3. feat: support LLM_REASONING_EFFORT env var for controlling thinking mode

    - Read LLM_REASONING_EFFORT from environment in config.py
    - Pass config.reasoning_effort to chat_with_retry/chat_stream_with_retry
      in both complete() and stream() (was previously dropped)
    - Set to "low"/"medium"/"high" to enable thinking, leave empty to use
      automatic detection based on reasoning_model_patterns
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    bb5cd2c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3e0de96 View commit details
    Browse the repository at this point in the history
  5. docs: fix LLM_REASONING_EFFORT value descriptions per DeepSeek API docs

    DeepSeek only supports high/max for reasoning_effort; minimal is a
    DeepTutor convention that maps to thinking.type=disabled. Update comments
    to be accurate for each provider.
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    44686ab View commit details
    Browse the repository at this point in the history
  6. fix: use robust JSON parser in book block generators

    Replace fragile json.loads() with parse_json_response() in code,
    flash_cards, timeline, and deep_dive generators. Handles LLM
    responses with markdown fences, preamble text, and malformed JSON.
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    ed9e810 View commit details
    Browse the repository at this point in the history
  7. fix: apply LLM_REASONING_EFFORT env var via resolver path as well

    get_llm_config() prefers the resolver path over .env, so the env var
    was silently ignored. Apply it as an override regardless of which path
    produced the config.
    Starfie1d1272 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    66d0f62 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2026

  1. fix(chat): forward extra_headers to all LLM calls in agentic pipeline

    The chat capability silently dropped `extra_headers` from the active
    LLM profile because three downstream call sites in `AgenticChatPipeline`
    did not forward them:
    
    - `_build_openai_client()` constructed `AsyncOpenAI` /
      `AsyncAzureOpenAI` without `default_headers`, so custom headers
      required by some gateways (e.g. a `User-Agent` override to bypass
      WAF allowlists that block `OpenAI/Python <ver>`) were lost on the
      native-tool-calling path.
    - `_stream_messages` and `_run_react_fallback` invoked `llm_stream()`
      with `model`, `api_key`, `base_url`, `binding` but no
      `extra_headers`. The factory's `_resolve_call_config` treats this
      set of caller-provided fields as an explicit override and rebuilds
      `LLMConfig` with empty `extra_headers`, bypassing the catalog value
      loaded by `get_llm_config()`.
    
    Pulls `extra_headers` from `llm_config` once in `__init__` and
    forwards it from all three call sites.
    
    Reproduce: configure an OpenAI-compatible gateway whose WAF rejects
    the default `OpenAI/Python <ver>` User-Agent; set
    `extra_headers: { "User-Agent": "Mozilla/5.0 ..." }` on the active
    LLM profile in `model_catalog.json`. Before this change, chat returns
    HTTP 403 "Your request was blocked." After, the override reaches the
    gateway and chat succeeds.
    zuoliangyu committed May 2, 2026
    Configuration menu
    Copy the full SHA
    51f8299 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2026

  1. Merge pull request #436 from zuoliangyu/fix/chat-extra-headers

    fix(chat): forward extra_headers to all LLM calls in agentic pipeline
    pancacake authored May 4, 2026
    Configuration menu
    Copy the full SHA
    5520e21 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/dev' into fix/deepseek-reasoning…

    …-content-fallback
    
    # Conflicts:
    #	deeptutor/book/blocks/code.py
    #	deeptutor/book/blocks/deep_dive.py
    #	deeptutor/book/blocks/flash_cards.py
    #	deeptutor/book/blocks/timeline.py
    pancacake committed May 4, 2026
    Configuration menu
    Copy the full SHA
    d23ea03 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #428 from Starfie1d1272/fix/deepseek-reasoning-con…

    …tent-fallback
    
    fix: fallback content to reasoning_content when DeepSeek returns empty content field
    pancacake authored May 4, 2026
    Configuration menu
    Copy the full SHA
    b1faa72 View commit details
    Browse the repository at this point in the history
  4. prepare v1.3.7 release

    Co-authored-by: Cursor <cursoragent@cursor.com>
    pancacake and cursoragent committed May 4, 2026
    Configuration menu
    Copy the full SHA
    9389178 View commit details
    Browse the repository at this point in the history
Loading