This commit is contained in:
Timothy Jaeryang Baek
2026-07-15 15:58:59 -04:00
Unverified
parent 07f35e7060
commit c4a0fb304b
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -36,7 +36,6 @@ def _reasoning_output_item(text: str = "", *, status: str = "in_progress") -> di
"type": "reasoning",
"id": f"rs_{uuid.uuid4().hex}",
"status": status,
"source": "provider",
"content": [{"type": "text", "text": text}],
}
@@ -684,7 +683,7 @@ def _replayable_reasoning_items(items: list[dict] | None, *, provider_type: str)
for item in items or []:
if not _reasoning_item_has_replayable_state(item):
continue
if str(item.get("id", "")).startswith("reasoning-") and item.get("source") != "provider":
if str(item.get("id", "")).startswith("reasoning-"):
continue
out = copy.deepcopy(item)
if provider_type == "llama.cpp" and not _reasoning_text_from_blocks(out.get("content")):
@@ -928,7 +927,6 @@ async def stream_openai_responses(
}
elif item["type"] == "reasoning":
# Reasoning items must be round-tripped for reasoning models
item.setdefault("source", "provider")
if (
active_reasoning_item is not None
and active_reasoning_item.get("id") == item.get("id")
+1 -1
View File
@@ -1145,7 +1145,7 @@ def _is_provider_replayable_reasoning_item(item: dict) -> bool:
return False
if item.get("status") not in (None, "completed"):
return False
if str(item.get("id", "")).startswith("reasoning-") and item.get("source") != "provider":
if str(item.get("id", "")).startswith("reasoning-"):
return False
if item.get("encrypted_content") or item.get("reasoning_details"):
return True