Repository navigation
fix(server): preserve reasoning_content in chat history - #268
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clients that replay assistant history using
reasoning_contentcurrently lose that text because Ferrum only deserializesreasoning. This affects multi-turn tool histories whose model template retains prior reasoning. The same integration failure was reported in vLLM #38488; vLLM already fixed its input normalization in #42664.Normalize either input name into Ferrum's existing
reasoningfield. A canonical string wins, including an empty string; missing or null canonical input falls back to the alias. Validate the selected value as string or null. Preserve each model template's history behavior and keep response messages and SSE deltas on the existing canonical field.The change is limited to the Chat HTTP wire boundary.
ferrum runuses its own typed history path and is unaffected.Validation on macOS after integrating onto main including #267:
cargo fmt --all -- --checkcargo check --workspace --all-targetscargo test --workspace --all-targets: 2727 passed, 0 failed, 61 ignored.cargo clippy --workspace --all-targets -- -A warningscargo check --workspace --all-targets --features metalThe local build reused a shared Cargo target directory with incremental compilation and dev/test debug information disabled. Ignored cases were not validated. HTTP tests use a capturing engine: they establish protocol and template behavior, not model answer quality or measured performance. Metal validation is a compile check. CUDA compilation is covered by the repository CI with its pinned native operator set.