Skip to content

fix(chat): raise ModelNotFoundError on legacy discovery-miss#996

Closed
tudormatei1 wants to merge 4 commits into
mainfrom
feat/model-not-found-error
Closed

fix(chat): raise ModelNotFoundError on legacy discovery-miss#996
tudormatei1 wants to merge 4 commits into
mainfrom
feat/model-not-found-error

Conversation

@tudormatei1

Copy link
Copy Markdown

The legacy chat model factory raised a bare ValueError when a model was not returned by the discovery API, indistinguishable from other ValueErrors without matching on the error message text.

Raise uipath-llm-client's ModelNotFoundError instead (added in uipath-llm-client 1.17.1). It subclasses ValueError, so existing except ValueError handlers keep working.

Bumps the uipath-llm-client / uipath-langchain-client floors to >=1.17.1 and the package version to 0.14.11.

The legacy chat model factory raised a bare ValueError when a model was
not returned by the discovery API, indistinguishable from other
ValueErrors without matching on the error message text.

Raise uipath-llm-client's ModelNotFoundError instead (added in
uipath-llm-client 1.17.1). It subclasses ValueError, so existing
`except ValueError` handlers keep working.

Bumps the uipath-llm-client / uipath-langchain-client floors to >=1.17.1
and the package version to 0.14.11.
Copilot AI review requested due to automatic review settings July 17, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the legacy chat model factory to raise a more specific exception when a requested model is not returned by the discovery API, aligning behavior with uipath-llm-client’s newer ModelNotFoundError while keeping backward compatibility with except ValueError handlers.

Changes:

  • Raise uipath.llm_client.utils.exceptions.ModelNotFoundError (instead of a bare ValueError) on discovery “model not found”.
  • Bump uipath-llm-client and uipath-langchain-client minimum versions to >=1.17.1.
  • Bump package version to 0.14.11.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/uipath_langchain/chat/_legacy/chat_model_factory.py Switches the “no matching models” error to ModelNotFoundError for clearer, typed handling.
pyproject.toml Raises dependency floors to ensure ModelNotFoundError is available and bumps package version.

Comment thread src/uipath_langchain/chat/_legacy/chat_model_factory.py
@tudormatei1
tudormatei1 force-pushed the feat/model-not-found-error branch from b376951 to f8e9053 Compare July 20, 2026 08:29
@tudormatei1
tudormatei1 force-pushed the feat/model-not-found-error branch from f62a138 to 39ed135 Compare July 20, 2026 08:33
@sonarqubecloud

Copy link
Copy Markdown

@tudormatei1
tudormatei1 deleted the feat/model-not-found-error branch July 20, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants