Expand databricks agent error handling to fallback to token limit errors#3535
Closed
Expand databricks agent error handling to fallback to token limit errors#3535
Conversation
Collaborator
|
thanks for looking into this. I don't think we should be adding more ad hoc checks like this to providers though. my approach is this: #3558 -- add universal error parsing and retry logic to all providers. |
Collaborator
Author
|
Makes sense, I'll close for now. Lets see if this fixes the issue and we might not need this. |
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.
I noticed the UI shows a generic 401 unauthorized (occasionally) or 400 bad request from Databricks when a token limit is reached instead of kicking off the auto summarization. It doesn't recognize that its a token limit error because the message doesn't have the phrases we look for like "token limit" in the error message. It appears to be a token limit issue because manually using the summarize feature allows chat to continue while just sending a chat message without summarization does not.
This adds fallback logic to work around that and allows the UI to handle it gracefully by allowing chat to continue with auto summarize.