-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Anthropic tokens; error handling; various bugfixes and refactorings #3450
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
This is failing tests |
@@ -0,0 +1,97 @@ | |||
import Anthropic from "@anthropic-ai/sdk"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reasonable move, to split this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, this does make it tricky to determine what code was added / changed, of this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC only LLMError
class is new, everything else in LLMClient/
is old.
And even that class is used only for timeout
errors (specific LLM providers don't try to normalize vendor lib errors to LLMError
instances, which works because everything that's not an LLMError
is treated as critical, which is what we want, for now).
Oops, yeah, that's because of f84baa1 that I noticed and fixed but didn't backport here (Vercel started to default to Node v22, probably recently). |
Custom token field:
(Doesn't look great, I think it's time to collapse settings in an accordion, but that's out of scope of this PR)
Tooltips for failed steps and error messages:
Renamed "Actions" to "Steps", for consistency (I think "Actions" could be confusing for end users, and we already use "Steps" in the sidebar):
Weird small feature:
/admin/dev
page in dev mode that allows to disable Prisma logs on the running server; doesn't work great but better than nothing when you want to read AI logs and Prisma logs get in the way:LLMClient changes:
LLMError
class that allows to distinguish between "timeout" errors and "out of credits" errorsError handling:
queryLLM
now always returns a completion, or fails when something went wrongStreaming, ClientWorkflow and events refactorings:
stepStarted
event, we update the DB onstepAdded
events now (minor difference but fixes the issue with in-progress status)clientWorkflow.currentStep
, could be inferred from the last step, and this fixes one bug where we showed step id instead of step name in the sidebar