Add meta to Client methods (#1923)

This commit is contained in:
Marcelo Trylesinski 2026-01-22 14:50:39 +01:00 • committed by GitHub
commit f0ab53e194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,8 +78,8 @@ async def test_run_task_basic_flow() -> None:
ctx.experimental.validate_task_mode(TASK_REQUIRED)
# Capture the meta from the request (if present)
if ctx.meta is not None and ctx.meta.model_extra: # pragma: no branch
received_meta[0] = ctx.meta.model_extra.get("custom_field")
if ctx.meta is not None: # pragma: no branch
received_meta[0] = ctx.meta.get("custom_field")
async def work(task: ServerTaskContext) -> CallToolResult:
await task.update_status("Working...")