News for hackers. Stuff that matters.
Re:Hypermode Model Router Preview – OpenRouter Alternative by KTibow on Thursday May 08, 2025 @04:32PM (#43930996)
`post` automatically releases the connection. `with` only makes sense when you use a `requests.Session()`.
Re:Hypermode Model Router Preview – OpenRouter Alternative by threeducks on Monday May 12, 2025 @01:28AM (#43959901)
You are right! https://github.com/psf/requests/blob/c65c780849563c891f35ffc...

The post function calls request the request function which uses its own context manager that will call the close function of the connection object.