Skip to content

Commit c53022f

Browse files
committed
feat: add option to disable oversized payload check in A2AFastAPIApplication
1 parent e43f469 commit c53022f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/a2a/server/apps/jsonrpc/fastapi_app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def __init__( # noqa: PLR0913
7777
[AgentCard, ServerCallContext], AgentCard
7878
]
7979
| None = None,
80+
disable_content_length_check: bool = False,
8081
) -> None:
8182
"""Initializes the A2AFastAPIApplication.
8283
@@ -94,6 +95,8 @@ def __init__( # noqa: PLR0913
9495
extended_card_modifier: An optional callback to dynamically modify
9596
the extended agent card before it is served. It receives the
9697
call context.
98+
disable_content_length_check: An optional, if True disables the check
99+
for oversized payloads.
97100
"""
98101
if not _package_fastapi_installed:
99102
raise ImportError(
@@ -108,6 +111,7 @@ def __init__( # noqa: PLR0913
108111
context_builder=context_builder,
109112
card_modifier=card_modifier,
110113
extended_card_modifier=extended_card_modifier,
114+
disable_content_length_check=disable_content_length_check,
111115
)
112116

113117
def add_routes_to_app(

0 commit comments

Comments
 (0)