Skip to content

Commit ed28b59

Browse files
TadakiAsechiasechi_tadaki
andauthored
fix(rest): send historyLength=0 (avoid falsy omission) (#480)
**What** Ensure `history_length=0` results in `?historyLength=0` being sent by the REST client. **Why** `0` was treated as falsy → the param was omitted → servers returned the full history. **How** Replace truthy check with explicit `is not None`. **Ref** - Permalink: https://github.com/a2aproject/a2a-python/blob/4a4b4a92d7fce6db02f397753ce3ec0dfcd8a597/src/a2a/client/transports/rest.py#L217 Fixes #479 Co-authored-by: asechi_tadaki <asechi_tadaki@infordio.co.jp>
1 parent 4a4b4a9 commit ed28b59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/a2a/client/transports/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async def get_task(
214214
response_data = await self._send_get_request(
215215
f'/v1/tasks/{request.id}',
216216
{'historyLength': str(request.history_length)}
217-
if request.history_length
217+
if request.history_length is not None
218218
else {},
219219
modified_kwargs,
220220
)

0 commit comments

Comments
 (0)