Skip to content

Logging tool name in NemotronBBoxError/NemotronLengthError#1279

Merged
jamesbraza merged 1 commit intomainfrom
logging-tool-name
Jan 29, 2026
Merged

Logging tool name in NemotronBBoxError/NemotronLengthError#1279
jamesbraza merged 1 commit intomainfrom
logging-tool-name

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

@jamesbraza jamesbraza commented Jan 29, 2026

Just for traceability/debugging


Note

Low Risk
Only adjusts exception message strings to add context; no functional changes to request/response handling or retry logic.

Overview
Improves error traceability in paperqa_nemotron/api.py by including the originating tool_name in exception messages for NemotronLengthError (when the model returns finish_reason == "length") and NemotronBBoxError (when tool-call arguments fail Pydantic validation).

This is applied consistently across both the Nvidia API and SageMaker execution paths, without changing control flow or parsing behavior.

Written by Cursor Bugbot for commit 4bc4104. Configure here.

@jamesbraza jamesbraza self-assigned this Jan 29, 2026
Copilot AI review requested due to automatic review settings January 29, 2026 00:59
@jamesbraza jamesbraza added the enhancement New feature or request label Jan 29, 2026
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances error messages for debugging by adding the tool name to NemotronLengthError and NemotronBBoxError exceptions. This improves traceability when errors occur during API calls.

Changes:

  • Added tool name to NemotronLengthError error messages in both NVIDIA and SageMaker API call functions
  • Added tool name to NemotronBBoxError error messages in both NVIDIA and SageMaker API call functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesbraza jamesbraza merged commit 0ca5b25 into main Jan 29, 2026
11 of 14 checks passed
@jamesbraza jamesbraza deleted the logging-tool-name branch January 29, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants