mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
fix(openai): add max_retries parameter to ChatOpenAI for handling 503 capacity errors (#32286)
Some integration tests were failing
This commit is contained in:
@@ -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"]))
|
||||
|
||||
Reference in New Issue
Block a user