Skip to content

Python: Python A2A rejects data URIs with media type parameters #6820

Description

@VectorPeak

Valid RFC 2397-style data URIs can include media type parameters before the ;base64 marker, for example:

data:text/plain;charset=utf-8;base64,SGVsbG8sIFdvcmxkIQ==

In the Python A2A package, get_uri_data() currently rejects that shape because its data URI regex only accepts a bare media type followed immediately by ;base64.

Affected path:

A2A content conversion -> get_uri_data(...) -> URI_PATTERN -> ValueError

Expected behavior:

Parameterized media types such as text/plain;charset=utf-8 should be accepted when the URI is otherwise a base64 data URI.

Actual behavior:

get_uri_data() raises ValueError("Invalid data URI format: ...") for parameterized media types.

Impact:

A2A conversion can fail for inline data payloads from clients that include common media parameters such as charset or file metadata parameters.

Metadata

Metadata

Assignees

Labels

pythonUsage: [Issues, PRs], Target: PythonreproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflow

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions