AI error on decoding response, if string has "

AI unable to make a suggestion because of quotes. If removed, everything works well. It looks like quotes are not escaped when text is transferred to AI.

Sometimes, on AI error simple retry might help, but there is no such button here. :slight_smile:

Hi @audrius checking on our side

Hi @audrius tried on our side and AI handles the quotes ( I used the 4o mini model for both AI in editor and pre-translation). What model do you use? Can the project name be shared here (if it is on Crowdin Enterprise then we would also need the organization name)
if not here, please share it with support@crowdin.com

Hi. I use Claude Sonnet 3.5 model.

Hi @audrius,

Thank you! So you’re using Anthropic as a provider. Could you please also share the project name here (if it is on Crowdin Enterprise then also the organization name) or send the details to support@crowdin.com?

Sorry, I’ve deleted these strings already. But it shouldn’t be hard to replicate.

Hi @audrius :wave:

Currently, there are indeed some issues with how Anthropic AI handles the apostrophe. While we are working on fixing this issue we can recommend adding the following instruction to your prompt for better results:

Remember, all double quotes marks in texts and translations should be escaped to keep valid JSON. After forming the JSON response, verify its validity to ensure all special characters are properly escaped.