fix: honor LangGraph chat model kwargs#713
Open
Kovbo wants to merge 1 commit into
Open
Conversation
f6d160d to
f63ba5d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #474
Fixes ART's LangGraph
init_chat_modelwrapper so it no longer silently ignores the model argument, provider kwargs, or timeout configuration. Also clarifies that RULER's default judge calls OpenAI unless callers choose a different LiteLLM judge model.Changes
init_chat_model(..., **kwargs)toChatOpenAI, including provider-leveltimeout,temperature, and other supported kwargs.invoke_timeoutfor ART's outerasyncio.wait_fortimeout, keeping it separate from provider request timeout.ChatOllama, for non-OpenAI providers.model_providervalues instead of silently constructingChatOpenAIanyway.bind_tools(),with_structured_output(), andwith_config().Test plan
uv run ruff format --check src/art/rewards/ruler.py src/art/langgraph/llm_wrapper.py tests/unit/test_langgraph_llm_wrapper.pyuv run ruff check src/art/rewards/ruler.py src/art/langgraph/llm_wrapper.py tests/unit/test_langgraph_llm_wrapper.pyuv run ty check src/art/rewards/ruler.py src/art/langgraph/llm_wrapper.py tests/unit/test_langgraph_llm_wrapper.pyuv run pytest tests/unit/test_langgraph_llm_wrapper.py tests/unit/test_ruler_metrics.py -quv run pytest tests/unit/test_langgraph_llm_wrapper.py tests/unit/test_ruler_metrics.py tests/unit/test_model_openai_client_costs.py -quv run pytest tests/unit -q --ignore=tests/unit/test_pipeline_trainer_local_backend.py --ignore=tests/unit/test_tinker_renderers.py --ignore=tests/unit/test_moe_routing_replay.py(251 passed, 7 skipped)Full
uv run pytest tests/unit -qis blocked in this local environment by missing optional dependencies (megatron,tinker_cookbook); the unignored failures were limited to tests requiring those packages.