taskResultSchema
consttaskResultSchema:object
The JSON Schemas those models were generated from, for runtime use.
Type Declaration
Section titled “Type Declaration”
readonly$id:"https://schemas.inderun.dev/1.0/task-result.schema.json"
$schema
Section titled “$schema”
readonly$schema:"https://json-schema.org/draft/2020-12/schema"
additionalProperties
Section titled “additionalProperties”
readonlyadditionalProperties:true
description
Section titled “description”
readonlydescription:"The response payload for a completed run() execution, for every task kind; output.type tells the content representation apart (text, managed playback, retrievable artifact). A full execution failure (validation, routing, or every attempted provider failing) is surfaced by run() throwing an IndeRunError instead of returning a TaskResult; finishReason and telemetry.errorClass are reserved for a provider reporting a non-fatal, degraded outcome on an otherwise-successful result (finishReason 'error' is produced by the Android ML Kit GenAI provider; telemetry.errorClass is not currently set by any provider in this codebase)."
properties
Section titled “properties”
readonlyproperties:object
properties.finishReason
Section titled “properties.finishReason”
readonlyfinishReason:object
properties.finishReason.description
Section titled “properties.finishReason.description”
readonlydescription:"How generation ended: 'stop' (natural end), 'length' (hit maxOutputTokens), or 'cancelled'. 'error' is reserved for a provider reporting a non-fatal issue on an otherwise-returned result — the Android ML Kit GenAI provider produces it when Gemini Nano reports a finish reason that is neither a natural stop nor the token limit. A full execution failure is instead surfaced by run() throwing an IndeRunError."
properties.finishReason.enum
Section titled “properties.finishReason.enum”
readonlyenum: readonly ["stop","length","cancelled","error"]
properties.output
Section titled “properties.output”
readonlyoutput:object
properties.output.$ref
Section titled “properties.output.$ref”
readonly$ref:"task-output.schema.json"
properties.output.description
Section titled “properties.output.description”
readonlydescription:"The normalized output of the selected provider. See task-output.schema.json."
properties.provenance
Section titled “properties.provenance”
readonlyprovenance:object
properties.provenance.$ref
Section titled “properties.provenance.$ref”
readonly$ref:"execution-provenance.schema.json"
properties.provenance.description
Section titled “properties.provenance.description”
readonlydescription:"Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json."
properties.runId
Section titled “properties.runId”
readonlyrunId:object
properties.runId.description
Section titled “properties.runId.description”
readonlydescription:"A unique, opaque identifier assigned by the engine for this specific execution attempt."
properties.runId.minLength
Section titled “properties.runId.minLength”
readonlyminLength:1
properties.runId.type
Section titled “properties.runId.type”
readonlytype:"string"
properties.schemaVersion
Section titled “properties.schemaVersion”
readonlyschemaVersion:object
properties.schemaVersion.const
Section titled “properties.schemaVersion.const”
readonlyconst:"1.0"
properties.schemaVersion.description
Section titled “properties.schemaVersion.description”
readonlydescription:"Contract schema version used to interpret the result payload."
properties.telemetry
Section titled “properties.telemetry”
readonlytelemetry:object
properties.telemetry.additionalProperties
Section titled “properties.telemetry.additionalProperties”
readonlyadditionalProperties:true
properties.telemetry.description
Section titled “properties.telemetry.description”
readonlydescription:"Required metadata providing an overview of the execution result and performance metrics."
properties.telemetry.properties
Section titled “properties.telemetry.properties”
readonlyproperties:object
properties.telemetry.properties.errorClass
Section titled “properties.telemetry.properties.errorClass”
readonlyerrorClass:object
properties.telemetry.properties.errorClass.description
Section titled “properties.telemetry.properties.errorClass.description”
readonlydescription:"Present only if a provider reports a degraded outcome on an otherwise-successful result; no provider in this codebase currently sets this. Distinct from run() throwing — a thrown IndeRunError never produces a TaskResult at all."
properties.telemetry.properties.errorClass.enum
Section titled “properties.telemetry.properties.errorClass.enum”
readonlyenum: readonly ["CapabilityMismatch","Offline","AuthError","RateLimited","Timeout","Unavailable","Internal"]
properties.telemetry.properties.providerUsed
Section titled “properties.telemetry.properties.providerUsed”
readonlyproviderUsed:object
properties.telemetry.properties.providerUsed.description
Section titled “properties.telemetry.properties.providerUsed.description”
readonlydescription:"The identifier for the specific provider that handled the request (e.g., 'openai_compatible_cloud')."
properties.telemetry.properties.providerUsed.minLength
Section titled “properties.telemetry.properties.providerUsed.minLength”
readonlyminLength:1
properties.telemetry.properties.providerUsed.type
Section titled “properties.telemetry.properties.providerUsed.type”
readonlytype:"string"
properties.telemetry.properties.reportedModel
Section titled “properties.telemetry.properties.reportedModel”
readonlyreportedModel:object
properties.telemetry.properties.reportedModel.description
Section titled “properties.telemetry.properties.reportedModel.description”
readonlydescription:"The model identifier the provider reported in its own response, set by the provider when its backend reports one. The engine carries it into provenance.reportedModel; it is never inferred from configuration."
properties.telemetry.properties.reportedModel.minLength
Section titled “properties.telemetry.properties.reportedModel.minLength”
readonlyminLength:1
properties.telemetry.properties.reportedModel.type
Section titled “properties.telemetry.properties.reportedModel.type”
readonlytype:"string"
properties.telemetry.properties.totalMs
Section titled “properties.telemetry.properties.totalMs”
readonlytotalMs:object
properties.telemetry.properties.totalMs.description
Section titled “properties.telemetry.properties.totalMs.description”
readonlydescription:"Measured execution duration in milliseconds, including route selection and result processing."
properties.telemetry.properties.totalMs.minimum
Section titled “properties.telemetry.properties.totalMs.minimum”
readonlyminimum:0
properties.telemetry.properties.totalMs.type
Section titled “properties.telemetry.properties.totalMs.type”
readonlytype:"number"
properties.telemetry.required
Section titled “properties.telemetry.required”
readonlyrequired: readonly ["providerUsed","totalMs"]
properties.telemetry.type
Section titled “properties.telemetry.type”
readonlytype:"object"
properties.usage
Section titled “properties.usage”
readonlyusage:object
properties.usage.additionalProperties
Section titled “properties.usage.additionalProperties”
readonlyadditionalProperties:true
properties.usage.description
Section titled “properties.usage.description”
readonlydescription:"Optional metadata regarding the quantity of tokens processed by the provider."
properties.usage.properties
Section titled “properties.usage.properties”
readonlyproperties:object
properties.usage.properties.inputTokens
Section titled “properties.usage.properties.inputTokens”
readonlyinputTokens:object
properties.usage.properties.inputTokens.description
Section titled “properties.usage.properties.inputTokens.description”
readonlydescription:"Number of input tokens consumed, as reported by the provider."
properties.usage.properties.inputTokens.minimum
Section titled “properties.usage.properties.inputTokens.minimum”
readonlyminimum:0
properties.usage.properties.inputTokens.type
Section titled “properties.usage.properties.inputTokens.type”
readonlytype:"integer"
properties.usage.properties.outputTokens
Section titled “properties.usage.properties.outputTokens”
readonlyoutputTokens:object
properties.usage.properties.outputTokens.description
Section titled “properties.usage.properties.outputTokens.description”
readonlydescription:"Number of output tokens generated, as reported by the provider."
properties.usage.properties.outputTokens.minimum
Section titled “properties.usage.properties.outputTokens.minimum”
readonlyminimum:0
properties.usage.properties.outputTokens.type
Section titled “properties.usage.properties.outputTokens.type”
readonlytype:"integer"
properties.usage.properties.totalTokens
Section titled “properties.usage.properties.totalTokens”
readonlytotalTokens:object
properties.usage.properties.totalTokens.description
Section titled “properties.usage.properties.totalTokens.description”
readonlydescription:"Aggregated token count for this request, as reported by the provider."
properties.usage.properties.totalTokens.minimum
Section titled “properties.usage.properties.totalTokens.minimum”
readonlyminimum:0
properties.usage.properties.totalTokens.type
Section titled “properties.usage.properties.totalTokens.type”
readonlytype:"integer"
properties.usage.type
Section titled “properties.usage.type”
readonlytype:"object"
required
Section titled “required”
readonlyrequired: readonly ["schemaVersion","runId","output","finishReason","telemetry"]
readonlytitle:"TaskResult"
readonlytype:"object"
IndeRun — open-source AI execution for cross-platform apps. Built and maintained by Independo GmbH (opens in new tab), supported by netidee (opens in new tab).
MIT-licensed SDK · No SDK usage telemetry.
© 2025–2026 Independo GmbH