googleapis / googleapis/java-genai
Exact BatchInference job gcsUri output path is missing
- Dominant language
- Java
- Stars
- 397
- Forks
- 125
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 41
Description
Similar to https://github.com/googleapis/java-genai/issues/696, I have no way to get the exact output file path of a batch job response file.
The gcsUri field contains the output URI provided in the request, which is not very helpful as it is only a prefix.
The actual file resides in a subfolder, named `{gcsUri}/prediction-model-{timestamp}/predictions.jsonl`.
I was not able to correlate the `timestamp` to any field. It is very similar to the `createTime` field but not exact.
For example, if I set the gcsUri to be `gs://bucket_name/output/` the output file path will be something like `gs://bucket_name/output/prediction-model-2025-12-26T20:29:02.829566Z/predictions.jsonl`
However, the batch inference UI web console does have an `Export Location` field that holds the correct output file path. This hopefully means that you can easily expose that to the Java SDK as well.
Can you please fix that or provide any proper workaround?
Currently I have to list all files under the gcsUri prefix and hope there is going to be only one response file.
Contributor guide
Assessment
This issue has not been assessed yet.