fix: 修复 antigravity 在 stream2nostream 模式下 functionCall 丢失导致工具调用中断 #318
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.
背景
在 antigravity 非流式请求(内部走 stream2nostream)场景下,流收集器只合并了 thought/text,未保留 functionCall/functionResponse。
这会导致工具调用信息丢失,表现为:
变更内容
collect_streaming_response中补充保留工具相关 part:functionCallfunctionResponsefunction_call(兼容键)验证
python3 -m py_compile src/api/utils.py影响范围
风险与回滚
src/api/utils.py的本次改动