It seems that JetBrains members posted an article how to fix this error code here: https://youtrack.jetbrains.com/articles/SUPPORT-A-1853/Junie-provides-error-code-400-input-length-and-maxtokens-exceed-context-limit