fix: move LLMError into the llm package (#1096)#1112
Draft
CoronRing wants to merge 1 commit into
Draft
Conversation
8b7d2e6 to
a01c83a
Compare
LLMError now lives in railtracks.llm.errors and inherits from RTLLMError, eliminating the dependency the llm package had on railtracks.exceptions. Also replaces a NodeInvocationError raised inside _litellm_wrapper with ModelError to fix the same cross-package violation. All built_nodes, related tests, and exception tests updated to import from the new location. Closes #1096
a01c83a to
3174685
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
LLMErrorfromrailtracks.exceptionsintorailtracks.llm.errors, inheriting fromRTLLMErrorinstead ofRTError, so thellmpackage no longer imports fromrailtracks.exceptionsNodeInvocationError(a railtracks exception) was being raised insidellm/models/_litellm_wrapper.py; replaced withModelErrorfrom within the llm packagebuilt_nodes, tests) to importLLMErrorfromrailtracks.llmorrailtracks.llm.errorsLLMErrorfromrailtracks.llm.__init__for discoverabilityFiles changed
llm/errors.pyLLMError(RTLLMError)definitionllm/__init__.pyLLMErrorllm/models/_litellm_wrapper.pyLLMErrorfrom..errors; replaceNodeInvocationErrorwithModelErrorexceptions/errors.pyLLMErrorclassexceptions/__init__.pyLLMErrorexportbuilt_nodes/concrete/*.pyNodeInvocationError→ModelErrortest expectationTest plan
test_litellm_wrapper.py— all tests pass, including the updatedModelErrorexpectation for invalid tool parameterstest_structured_tool_call_llm.py— all tests passtest_exceptions.py—LLMErrortests pass with new locationCloses #1096