chore(clients): Exception and Logging Cleanup#148
Open
srmanda-cs wants to merge 1 commit intomicrosoft:mainfrom
Open
chore(clients): Exception and Logging Cleanup#148srmanda-cs wants to merge 1 commit intomicrosoft:mainfrom
srmanda-cs wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Collaborator
|
@srmanda-cs, is this in draft by mistake? |
Contributor
Author
Nope. I only made one useful commit in this repo. As I mentioned in the PR comment, and wanted to know if you wanted me to section the print statements as I mentioned or if I should leave them as is. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves exception re-raising behavior in the shared LLM client utilities so that failures preserve the original traceback (e.g., from OpenAI/Groq SDK internals), which is important for debugging API failures across agents.
Changes:
- Replaced
raise ewith bareraisein multipleinference()exception handlers to preserve the original traceback. - Standardized this behavior across all affected client implementations within
clients/utils/llm.py.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
This PR is ready to review, correct if needed, and merge |
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.
As part of the
clients/cleanup (#146), I've committed a related fix in this PR: all 7raise eoccurrences inclients/utils/llm.pyhave been changed to bareraise.raise eresets the exception's traceback to the re-raise site, discarding the original call stack inside the OpenAI/Groq client libraries — exactly the context you need when debugging an API failure. Bareraisepreserves the full traceback from the original raise point. This is a strictly better behavior with zero risk of regression.