Skip to content

fix: context placeholder + interrupt reasoning_duration - #930

Merged
alcholiclg merged 22 commits into
modelscope:mainfrom
alcholiclg:feat/webui_refractor
Aug 3, 2026
Merged

fix: context placeholder + interrupt reasoning_duration#930
alcholiclg merged 22 commits into
modelscope:mainfrom
alcholiclg:feat/webui_refractor

Conversation

@alcholiclg

@alcholiclg alcholiclg commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Change Summary

  • The context-restore boundary (_dicts_to_messages) strips the legacy Let me do a tool calling. placeholder, so existing session logs no longer replay that fake utterance into the model input.
  • Stripping only applies when the row carries tool_calls, so a genuine reply that happens to equal the literal is left untouched.
  • _persist_partial_round reuses _last_reasoning_duration when a turn is cancelled after thinking ended (during body streaming), so replay shows the real thinking time instead of 0s.
  • This merges with the existing mid-reasoning branch into one path, so both cancel points preserve reasoning_duration.
  • Tests: added tests/session/test_context_assembler.py and two cancel-point cases in test_partial_round.py22 passed across the related SDK suites.

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Run pre-commit install and pre-commit run --all-files before git commit, and passed lint check.
  • Documentation reflects the changes where applicable

…dir shared memory isolation, mark tool denials as errors
…mpty tool-call content serializes as null/tool_use); mark interrupt filler with content_placeholder; persist reasoning_duration on mid-thinking interrupt; default project skips unused workspace/ subdir
…at/webui_refractor

# Conflicts:
#	ms_agent/agent/llm_agent.py
#	tests/agent/test_partial_round.py
…gs no longer pollute model input); keep reasoning_duration when a turn is cancelled after thinking ends
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

…at/webui_refractor

# Conflicts:
#	ms_agent/agent/llm_agent.py
@alcholiclg alcholiclg changed the title webui bugs fix fix: strip legacy context placeholder; keep reasoning_duration on body-phase interrupt Aug 3, 2026
@alcholiclg alcholiclg changed the title fix: strip legacy context placeholder; keep reasoning_duration on body-phase interrupt fix: context placeholder + interrupt reasoning_duration Aug 3, 2026
@alcholiclg
alcholiclg merged commit 2d967b6 into modelscope:main Aug 3, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants