Checks
Strands Version
1.9.1
Python Version
3.13
Operating System
Ubuntu
Installation Method
pip
Steps to Reproduce
import httpx
from strands.models.openai import OpenAIModel
from strands import Agent
model = OpenAIModel(
client_args={
"api_key": "EMPTY",
"base_url" : "https://localhost:8000/v1",
"http_client": httpx.AsyncClient(verify=False),
},
model_id="openai/gpt-oss-20b",
params={
"tool_choice": "auto"
}
)
agent = Agent(
model=model,
)
agent("Hello")
print("Works fine")
agent("Hello again")
print("This print is not reached")
This code is working fine on 1.7.1 and was introduced in 1.9.0 in the next PR:
@pgrayy could you help with this issue please?
Expected Behavior
Expect to call same agent multiple times.
Actual Behavior
Only first agent is called correctly. Subsequent calls get failed saying that the connection is already closed
Additional Context
No response
Possible Solution
No response
Related Issues
https://github.com/strands-agents/sdk-python/pull/856/files
Checks
Strands Version
1.9.1
Python Version
3.13
Operating System
Ubuntu
Installation Method
pip
Steps to Reproduce
This code is working fine on 1.7.1 and was introduced in 1.9.0 in the next PR:
@pgrayy could you help with this issue please?
Expected Behavior
Expect to call same agent multiple times.
Actual Behavior
Only first agent is called correctly. Subsequent calls get failed saying that the connection is already closed
Additional Context
No response
Possible Solution
No response
Related Issues
https://github.com/strands-agents/sdk-python/pull/856/files