[1.4.1] - 2026-10-26
Fixed
- A sync method, e.g.
extract_all()orchat(), now closes the connections that it opened to the API of the model before it returns. A sync method runs in an event loop of its own, and the HTTP clients thatlitellmkeeps for each event loop stayed open with their connections after the method returned, for ten minutes or more, often until the program exited, when Python reported them as unclosed sockets and transports if its warnings were shown, e.g. with-W default. A program that called sync methods one after another kept a connection open for each call. The clients given tolitellm, e.g.litellm.aclient_session, are left open. The async methods are not affected.