ReferenceAsk
Remy Reference/admin/DataSourceJobPlan
?

DataSourceJobPlan

Type
A job's cost projection before it runs: projected documents, chunks, tokens, credits, and whether the placement can hold it.

What a corpus would cost before any of it is spent, extrapolated from a sample of about a hundred objects. projected is the documents, chunks, tokens, and credits the whole set would come to; capacity says whether the placement can hold it and refuses approval when it cannot; warnings flag anything the sample surfaced. It is the number a planned job waits for approval on.

DataSourceJobPlan.ts
interface DataSourceJobPlan {
  objects: number
  bytes: number
  projected: {
    documents: number
    chunks: number
    tokens: number
    credits: { embedding: number; extraction: number; total: number }
  }
  capacity: {
    placement: 'shared' | 'dedicated'
    fits: boolean
    maxPoints: number
    heldPoints: number
  }
  durationMinutes: number
  warnings: string[]
}
Fields
projected
object
What the whole set would come to: documents, chunks, tokens, and credits.
capacity
object
Whether the placement can hold the projected chunks; approval is refused when it cannot.
durationMinutes
number
Projected run time.
warnings
string[]
Anything the sample surfaced worth knowing before approval.
Read the projection
const { job } = await admin.dataSourceJobs.get({ id });
console.log(job.plan?.projected.credits.total, job.plan?.capacity.fits);