Issue with Sanity AI Assist not working, possible problem with schema validation error.
16 replies
Last updated: Nov 9, 2023
W
Hey y’all! The Sanity AI Assist is acting up for us. It works on some things but I generally cannot get it to work even with the simplest instructions.I tried troubleshooting it by enabling “Pause on caught exceptions” and “Pause on uncaught exceptions” in devtools; but no exceptions are being raised.
I tried upgrading to the latest version of every Sanity package we use (including AI Assist), but it does not make a difference.
It started happening this morning. Any thoughts on how I can troubleshoot this further for you guys?
Attaching a screenshot where I made a super simple instruction for one field, which doesn’t work (and I tried many different content types9
I tried upgrading to the latest version of every Sanity package we use (including AI Assist), but it does not make a difference.
It started happening this morning. Any thoughts on how I can troubleshoot this further for you guys?
Attaching a screenshot where I made a super simple instruction for one field, which doesn’t work (and I tried many different content types9
Nov 9, 2023, 9:41 AM
M
Just got a report from my editor about this too
Nov 9, 2023, 12:50 PM
M
Currently looking into it
Nov 9, 2023, 12:50 PM
M
It seems like sanity is complaining that the AI Document is not a valid document schema.
Nov 9, 2023, 1:03 PM
W
That's strange because we've been using these schemas for a while now, and AI assist used to work with them just fine.
Nov 9, 2023, 1:05 PM
M
Same, that schema must be generated dynamically or served remotely
Nov 9, 2023, 1:05 PM
W
Is it because we added a new schema that broke all the existing ones perhaps? Although a broken schema usually breaks the whole studio
Nov 9, 2023, 1:06 PM
M
No, we didn't make any changes at all and we have the problem too
Nov 9, 2023, 1:06 PM
M
It seems like this schema is the culprit: https://github.com/sanity-io/assist/blob/5106347d3e3252d59e3b707522abac8c219f07b1/plugin/src/schemas/assistDocumentSchema.tsx#L374
Nov 9, 2023, 1:07 PM
M
I am going to open an issue on the assist repository
Nov 9, 2023, 1:09 PM
M
Nov 9, 2023, 1:20 PM
W
Nice detective work man! ❤️
Nov 9, 2023, 1:37 PM
M
Appreciate it, although i still have no clue what's actually causing this, or if the schema validation error is even related. Don't have time to look into where that JSON parsing error is coming from, but i'm assuming it's an API thing.
Nov 9, 2023, 1:39 PM
W
Yeah we haven’t touched our dependency versions so I’m inclined to agree
Nov 9, 2023, 1:39 PM
W
⚠️ ⚠️ ⚠️ Sanity AI Assist is broken for at least 2 workspaces, github issue has been filed
Nov 9, 2023, 1:40 PM
M
We haven't deployed our studio in weeks, so yeah definitely points to an API thing.
Nov 9, 2023, 1:41 PM
Thank you both. We’ve implemented a fix for a breaking change by a third-party API used by AI Assist.
Nov 9, 2023, 5:05 PM
Sanity– build remarkable experiences at scale
Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.