Summarize progress counts reasoning tokens: thinking models stream most of the run in reasoning_content, which the ticker ignored — UI sat at 'waiting for model' then jumped to done with no percentage
This commit is contained in:
parent
8f7e1f9ea5
commit
0a0702f15d
3 changed files with 43 additions and 4 deletions
|
|
@ -117,9 +117,13 @@ async def _collect_reply(resp: httpx.Response, ticker) -> str:
|
|||
except ValueError:
|
||||
continue
|
||||
piece = (obj.get("message") or {}).get("content") or ""
|
||||
if piece:
|
||||
# Like the openai_compat adapter: a thinking channel is real
|
||||
# work and must move the progress ticker even when the server
|
||||
# ignored think:false.
|
||||
thinking = (obj.get("message") or {}).get("thinking") or ""
|
||||
if piece or thinking:
|
||||
parts.append(piece)
|
||||
total += len(piece)
|
||||
total += len(piece) + len(thinking)
|
||||
ticker(total)
|
||||
if obj.get("done"):
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue