fix(openai): add max_retries parameter to ChatOpenAI for handling 503 capacity errors (#32286)

Some integration tests were failing
This commit is contained in:
Mason Daugherty
2025-07-28 13:58:23 -04:00
committed by GitHub
parent c55294ecb0
commit e79e0bd6b4

View File

@@ -221,6 +221,7 @@ def test_openai_invoke() -> None:
llm = ChatOpenAI(
model="o4-mini",
service_tier="flex", # Also test service_tier
max_retries=3, # Add retries for 503 capacity errors
)
result = llm.invoke("Hello", config=dict(tags=["foo"]))