Patrick Gray

Results 7 comments of Patrick Gray

Last note, can you make sure to run `hatch run prepare`. I see there are some unit tests failing.

We have a note about this in the [source](https://github.com/strands-agents/sdk-python/blob/main/src/strands/models/openai.py#L478): > We initialize an OpenAI context on every request so as to avoid connection sharing in the underlying http client. The...

The factory approach would be our recommendation for now. For http_client, you could pass in a factory that returns a new instance of your client on each invocation. I'll see...

So a factory pattern wouldn't work here unfortunately. With the OpenAIModel implementation as given, the only option right now would be to derive an httpx.AsyncClient that doesn't close: ```Python class...

https://github.com/strands-agents/sdk-python/pull/1308/files#r2600186281