Hi, I’m trying to use context caching with batch API in Vertex AI, using REST API.
I created jsonl file with cachedContent value in “request” field, such as:
{"request":{"cachedContent":"projects/{project-id}/locations/us-central1/cachedContents/{cached-content-id}","contents":{"parts":[{"text":"Data and instruction for task"}],"role":"user"}}}
I sent it to batch API, But I get error:
"status":"Internal error occurred. Failed to get generateContentResponse: {\"error\": {\"code\": 404, \"message\": \"Not found: cached content metadata for {cached-content-id}.\", \"status\": \"NOT_FOUND\"}}"
I double checked my cached content ID, and it seems to be working fine on generateContent endpoint.
Is context caching within batch API not supported, or is there any special procedure for it?