Skip to content

Commit e79e0bd

Browse files
authored
fix(openai): add max_retries parameter to ChatOpenAI for handling 503 capacity errors (#32286)
Some integration tests were failing
1 parent c55294e commit e79e0bd

File tree

1 file changed

+1
-0
lines changed
  • libs/partners/openai/tests/integration_tests/chat_models

1 file changed

+1
-0
lines changed

libs/partners/openai/tests/integration_tests/chat_models/test_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def test_openai_invoke() -> None:
221221
llm = ChatOpenAI(
222222
model="o4-mini",
223223
service_tier="flex", # Also test service_tier
224+
max_retries=3, # Add retries for 503 capacity errors
224225
)
225226

226227
result = llm.invoke("Hello", config=dict(tags=["foo"]))

0 commit comments

Comments
 (0)