There is an arbitrary string length restriction at https://github.com/vjcitn/biocEDAM/blob/fc87bf166276fb7d79b0d35bce64093a2f987cd6/inst/curbioc/curbioc.py#L44 which seemed important for avoiding rate limitation errors. Perhaps tiktoken can be used to count tokens meaningfully and reduce content to the maximum allowed size.