enhance: align media modes and consolidate output negotiation#364
Merged
liujuanjuan1984 merged 4 commits intomainfrom Apr 2, 2026
Merged
enhance: align media modes and consolidate output negotiation#364liujuanjuan1984 merged 4 commits intomainfrom
liujuanjuan1984 merged 4 commits intomainfrom
Conversation
Collaborator
Author
|
审查结果:
|
Collaborator
Author
|
补充说明:本轮已基于当前分支继续实现 新增结论:
验证: |
Collaborator
Author
|
审查结果:
|
Collaborator
Author
|
补充审查与实现同步:已处理此前评论里提到的低风险点。 本次提交: 结论:
验证:
|
Collaborator
Author
|
本轮基于当前 PR 再做了一次聚焦审查,结论如下。 审查结论:
残余风险:
关联关系复核:
验证:
|
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.
概述
本 PR 聚焦审查并修正 Agent Card 中 input/output modes 的声明,并进一步补齐 runtime 对
acceptedOutputModes的协商处理,同时将相关规范化逻辑收敛为单点复用,使声明、协商与执行行为保持一致,并更贴近 A2A 协议关于 media types 的最佳实践。模块变更
Agent Card
opencode.chat显式声明input_modes与output_modesapplication/json输入/输出text/plain补齐为text/plain+application/jsonRuntime
message/send与message:stream入口校验acceptedOutputModestext/plain时,显式拒绝聊天请求,避免返回与协商不兼容的主响应text/plain时,抑制流式结构化DataPart/ tool-call 更新acceptedOutputModes或接受application/json时,保持现有宽松行为Shared Utilities
acceptedOutputModes的规范化与匹配判断Tests
acceptedOutputModes相关测试,覆盖请求级拒绝与流式结构化输出收敛相关 Commits
7d56050align agent card media modes with runtime behavior4858346respect accepted output modes for chat responsesa381aaadeduplicate accepted output mode normalization审查结论
application/json输出能力,但 runtime 不按acceptedOutputModes收敛输出”的偏差#363的关系使用Closes #363是准确的,本次改动已完成该 issue 目标范围内的修正验证
./scripts/doctor.sh475 passed,coverage91.36%关联