Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

961 B
Raw Blame

Streamed LLM failures are now scrubbed where they are actually raised. A provider error that surfaces mid-stream — a 429 whose message quotes the API key, for instance — used to propagate out of the rate-limiting wrapper with the credential intact: BaseChatModel.stream is a generator function, so the call returns before the request is made and the guard around it never saw the error. Each advance of the stream is now guarded individually, with yield outside the guard so an exception thrown back in by the consumer is not mis-attributed to the provider.

The async surface was unprotected for a different reason: the wrapper defined _astream, which LangChain never calls, so astream resolved through __getattr__ to the unscrubbed raw model. It is now defined as astream. _acall_rate_limited also awaits the call inside the retry wrapper instead of returning the coroutine, which restores both retry and scrubbing to the async invoke path.