#10345·dspy

[错误] `dspy.LM(stream=True)` 在拒绝 LiteLLM 的实时流之前对其进行缓存

作者: amitxy创建于 2026年9月6日更新于 2026年9月11日
标签bug
  1. dspy.LM(..., stream=True) accepts stream through **kwargs; BaseLM stores those kwargs in self.kwargs (base_lm.py:171-206).
  2. LM.forward() merges self.kwargs into the request, wraps the completion function with request_cache when cache=True, and invokes it (lm.py:232-257).
  3. With no dspy.streamify() side channel, litellm_completion() returns the direct litellm.completion(..., **request) result (lm.py:454-458, …

内容来源: stanfordnlp/dspy