mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 14:09:29 +08:00
* update
* fix(mcp): reconnect on credential change; stop masking transport errors as timeouts
Two independent bugs, both surfaced connecting a remote MCP server that
authenticates with a header key.
connection_signature() fingerprints the stored config, which holds
${secret:...} references rather than values, so rotating a credential left
the reload diff byte-identical and the session kept using the replaced key
until the process restarted. _signature() now mixes in a digest of the
materialized config. The digest, never the value, reaches the signature;
configs with no references keep their plain signature, so this does not
invalidate and drop every live session on upgrade.
A transport failure on the POST carrying a tool call is raised inside the
SDK's own anyio task group and never resolves the caller's request, so a
call that failed in under a second was reported as a tool timeout -- the
one explanation that rules out the actual cause. call_tool() now watches
the connection task alongside the call and reports the error that task
recorded. _run_server() routes its post-live failure through the existing
describe_connect_failure(), so that string names the HTTP status rather
than "unhandled errors in a TaskGroup".
Tests: tests/services/mcp/test_call_failures.py
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs: add Open Source Partners section with PageIndex
* docs: replace partner blurb with PageIndex promo code
* docs: link PageIndex subscription to developer portal
* docs: point PageIndex logo at its GitHub repo
* fix: harden Responses stream parsing (#825)
* fix: remove obsolete Typer extra (#817)
* fix: normalize RAG citation payloads (#808)
* fix: decouple mastery paths from chat sessions (#810)
* fix(llm): mark OpenAI Codex as vision capable (#821)
Declare the Codex Responses provider as image-capable so multimodal calls do not silently degrade to text and RAG image indexing can use it. Cover capability resolution, fallback behavior, and input_image conversion.
* fix: return minimal reasoning_effort for Gemini 3 and 2.5 Pro (#809)
Gemini 3 models and Gemini 2.5 Pro reject reasoning_effort="none"
with a 400 INVALID_ARGUMENT error. Per Google's OpenAI-compat docs,
"none" is only valid for the 2.5 Flash family.
Return "minimal" (the lowest valid level) for Gemini 3 and 2.5 Pro,
preserving the cost-intent while avoiding the API error.
Fixes #734
Co-authored-by: 0xtidalbore <ahmed@itcloud.ca>
* fix(mcp): don't orphan a cancelled call, or leak a URL credential
Follow-ups to this branch's own two fixes, both on paths it opened:
- ``asyncio.wait`` — unlike ``gather`` — leaves the futures it waits on
running when the *waiter* is cancelled, and the call was moved into a
free-standing task, so nothing else would ever stop it. Stopping a turn
left the tool running against the server with its result discarded.
Cancel and absorb it whenever the wait is interrupted, sharing one
``_abandon`` helper with the connection-died path.
- A dead transport is now reported to the *model*, not just in settings,
and httpx names the full request URL in its message. ``CredentialTarget``
includes "url_param" and several curated servers use it, so that string
can carry an API key. Redact query and userinfo before it travels.
Also: route the one transient retry through the same watcher (a retry is
if anything more likely to meet a dead transport — the exact failure this
branch exists to stop reporting as a timeout), and skip materializing a
config that holds no ``${secret:...}`` references at all. The latter is
worth it: ``_signature`` runs per live connection on every reload, which
``ensure_scope`` performs once per turn, and resolving does per-reference
mkdir + chmod + read synchronously on that path.
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: NoxsMedia <155662416+NoxsMedia@users.noreply.github.com>
Co-authored-by: 0xTidalBore <142905837+0xTidalBore@users.noreply.github.com>
Co-authored-by: 0xtidalbore <ahmed@itcloud.ca>