Skip to content

Conversation

@h0rv
Copy link
Contributor

@h0rv h0rv commented Dec 9, 2025

Currently, pydantic-ai cannot infer media type for presigned S3 URLs due to the query parameters added to the URL. This improves the infer method to check just the base URL (query parameters and fragments stripped).

@h0rv
Copy link
Contributor Author

h0rv commented Dec 9, 2025

We can also use urlib from the std lib if we want to introduce a new dep:

from urllib.parse import urlparse def base_url(url: str) -> str: return urlparse(url)._replace(query="", fragment="").geturl() 
@h0rv
Copy link
Contributor Author

h0rv commented Dec 9, 2025

whoops - this is a dupe of #3501

@h0rv h0rv closed this Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant