Is there a size limit to the value you can save in a custom field?

Is there a size limit to the value you can save in a custom field?

Not specifically, as Nathan says:

Custom fields, or more specifically “post meta” is stored in the postmeta table, in the meta_value column which is normally specified as LONGTEXT which amounts to a storage capacity of roughly 4 GB.

So it’s highly unlikely you’ve hit a size limit. You’re more likely to run into network transfer timeouts transferring data or running out of memory before you’re able to hit storage capacity limits.

What’s more likely is that you’re using an unnamed plugin/theme/framework and having issues there that are unrelated to your question about post meta maximum size. I say this because you shared code that is not using a WordPress API written in javascript:

var customFields = new Object();
var someValue = Request["Summary"];
customField["summary"] = someValue;
post.insertCustomField(customField);

To solve your problem you should ask about it in the respective theme/plugin/frameworks support routes, but rest assured it has nothing to do with how large a post meta/custom fields value can be in the database