feat: NormalizedProvider

This commit is contained in:
leokun committed 2026-08-25 20:50:57 +08:00
1 parent 5f87357681
commit 081e1f50e2
8 files changed
+169 -14

No files matched your search

+2 -1
View File
@@ -308,7 +308,8 @@ pub async fn consume_model_cycle(
usage,
));
}
if matches!(finish_reason, FinishReason::ToolUse) != !calls.is_empty() {
let has_tool_calls = !calls.is_empty();
if matches!(finish_reason, FinishReason::ToolUse) != has_tool_calls {
return Err(failure(
RunFailure::Protocol("finish reason and tool calls disagree".into()),
text,