Match Qwen reasoning history across effort changes
This commit is contained in:
1 parent
6507a494bc
commit
7c18e738cd
42 files changed
+3210
-5
No files matched your search
@@ -556,6 +556,7 @@ pub(super) fn parse_chat_request(
|
||||
&request.tools,
|
||||
&request.tool_schemas,
|
||||
tools_enabled,
|
||||
model,
|
||||
protocol,
|
||||
)?;
|
||||
generation.system_prompt = system;
|
||||
|
||||
+3
-1
@@ -327,10 +327,12 @@ pub(super) fn render_messages(
|
||||
tools: &[Value],
|
||||
tool_schemas: &[String],
|
||||
tools_enabled: bool,
|
||||
model: ModelChoice,
|
||||
protocol: Protocol,
|
||||
) -> Result<(String, Vec<ChatTurn>), (u16, String)> {
|
||||
validate_tool_results(state, messages, protocol)?;
|
||||
let preserve_reasoning = tools_enabled
|
||||
let preserve_reasoning = model.is_qwen38()
|
||||
|| tools_enabled
|
||||
|| messages.iter().any(|message| {
|
||||
matches!(message.role.as_str(), "tool" | "function") || !message.tool_calls.is_empty()
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user