Skip to content

fix(provider): preserve Azure tool call history#308

Merged
duguwanglong merged 1 commit into
devfrom
fix/azure-openai-tool-message-sequence
May 22, 2026
Merged

fix(provider): preserve Azure tool call history#308
duguwanglong merged 1 commit into
devfrom
fix/azure-openai-tool-message-sequence

Conversation

@JohnYin-hub
Copy link
Copy Markdown
Contributor

Summary

修复 Azure OpenAI 在子 agent/tool 调用后的下一轮请求中丢失 tool_calls / tool_call_id 历史字段的问题,避免 Azure 返回 role="tool" 消息缺少前置 tool_calls 的 400 错误。

Test

  • source .venv/bin/activate && pytest tests/provider/test_openai_base_provider.py tests/provider/test_azure_provider.py

Co-authored-by: Cursor <cursoragent@cursor.com>
@duguwanglong duguwanglong merged commit 53a9726 into dev May 22, 2026
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