Skip to content

Handle JSON Parsing errors #5995

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

Merged
merged 4 commits into from
Jun 9, 2025
Merged

Conversation

RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Jun 5, 2025

Handles invalid tool call args parsing (caused by when JSON tool arg streaming is truncated)
Also adds some try/catch handling for other JSON parsing throughout the repo to make it more robust

A followup will be to properly cancel tool call messages by removing invalid args on cancellation
Related discussion here #5662

@RomneyDa RomneyDa requested a review from a team as a code owner June 5, 2025 00:57
@RomneyDa RomneyDa requested review from tomasz-stefaniak and removed request for a team June 5, 2025 00:57
Copy link

cubic-dev-ai bot commented Jun 5, 2025

Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic.

Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit f4233ae
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/684715733503720008a4892e
😎 Deploy Preview https://deploy-preview-5995--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 5, 2025
Copy link
Collaborator

@tomasz-stefaniak tomasz-stefaniak left a comment

Choose a reason for hiding this comment

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

I'm assuming this PR fixes some bugs, could you add relevant tests?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jun 6, 2025
@RomneyDa
Copy link
Collaborator Author

RomneyDa commented Jun 7, 2025

Added tests in llm-pre-fetch.vitest.ts!

Copy link
Collaborator

@tomasz-stefaniak tomasz-stefaniak left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test 💪

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 9, 2025
@tomasz-stefaniak tomasz-stefaniak merged commit 051874f into main Jun 9, 2025
36 checks passed
@tomasz-stefaniak tomasz-stefaniak deleted the dallin/gemini-args-parsing branch June 9, 2025 17:29
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jun 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants