Skip to content

Comments

feat: multi-turn Predict + grouped Message model#81

Merged
darinkishore merged 2 commits intomainfrom
multi-turn-predict
Feb 22, 2026
Merged

feat: multi-turn Predict + grouped Message model#81
darinkishore merged 2 commits intomainfrom
multi-turn-predict

Conversation

@darinkishore
Copy link
Collaborator

Summary

  • Refactor Message from flat enum to Role + Vec
  • Preserve reasoning continuity through rig round-trips
  • Make From trivial (no data loss) and remove RigChatMessage
  • Split Predict API into forward(input) and forward_continue(chat)
  • Add ToolLoopMode::CallerManaged for caller-controlled loops
  • Return full conversation history in LMResponse.chat
  • Replace unsafe set_var usage in tests with temp_env
  • Add 14 tests covering round-trip conversion, CallerManaged conversation flow, and reasoning preservation

Notes

  • Branch: multi-turn-predict

darin added 2 commits February 19, 2026 18:46
- Refactor Message from flat enum to Role + Vec<ContentBlock>

- Reasoning continuity preserved through rig round-trips

- From<RigMessage> trivial (no data loss), RigChatMessage removed

- Predict API split: forward(input) + forward_continue(chat)

- ToolLoopMode::CallerManaged for caller-controlled tool loops

- Full conversation history in LMResponse.chat

- temp_env replaces unsafe set_var in all tests

- 14 new tests: round-trip, CallerManaged conversation, reasoning preservation
Two trybuild tests (render_invalid_jinja, render_non_literal) failed on CI
because syn::Error::new(span, msg) with .span() produces different underline
widths on stable (CI) vs nightly (local). Switch to
syn::Error::new_spanned(tokens, msg) which reliably spans from first to last
token regardless of compiler version.
@darinkishore darinkishore merged commit 3c850e6 into main Feb 22, 2026
8 of 10 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.

1 participant