a2aproject / a2aproject/a2a-python

[Bug]: `A2A-Version` validation ignores minor versions and the query parameter

未关闭
#1,204 2 条评论 0 个 reaction 已指派 1 人 已被 @rohityan 认领 在 GitHub 查看
component: server status:awaiting response status:stale
主要语言
Python
星标
2.1k
派生
496
平均合并
4 天 17 小时
30 天内合并 PR
12

描述

### What happened?

The specification says:

> “Agents MUST process requests using the semantics of the requested `A2A-Version` (matching `Major.Minor`).”

and

> “Clients MAY provide the `A2A-Version` as a request parameter instead of a header.”

The implementation seems to miss both points.

1. The code compares only `major`:

```python
return actual_v.major == expected_v.major
```

2. The query parameter is ignored.

```python
actual_version = headers.get(
constants.VERSION_HEADER
) or headers.get(constants.VERSION_HEADER.lower())

if not actual_version:
return constants.PROTOCOL_VERSION_0_3

return str(actual_version)
```

A similar issue existed: https://github.com/a2aproject/a2a-python/issues/856 but it was not *fully* fixed.

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。