Skip to main content

Type Alias: TranslatedLine

TranslatedLine = { itemId: string; model: string; providerId: string; source: string | null; status: "translated"; target: string; text: string; unansweredAttempts: number; usage: TokenUsage | null; version: typeof TRANSLATOR_VERSION; } | { itemId: string; model: string; providerId: string; reason: "same_language"; source: string; status: "skipped"; target: string; usage: null; version: typeof TRANSLATOR_VERSION; }

Defined in: packages/agentos/src/cognition/nlp/language/TranscriptTranslator.ts:68

A translated line, or a line skipped because its source is the target, with no call made.

Type Declaration​

{ itemId: string; model: string; providerId: string; source: string | null; status: "translated"; target: string; text: string; unansweredAttempts: number; usage: TokenUsage | null; version: typeof TRANSLATOR_VERSION; }

itemId​

itemId: string

model​

model: string

The model the call sent, as the provider received it (openai:gpt-4o-mini is gpt-4o-mini).

providerId​

providerId: string

source​

source: string | null

status​

status: "translated"

target​

target: string

text​

text: string

unansweredAttempts​

unansweredAttempts: number

The attempts before the answer that got no usable one: no HTTP answer (a network failure, the provider layer's own timeout), or a success status whose body did not become the answer (lost while it was read, or a Responses result marked failed that was sent again, whose tokens usage holds). Each may have been billed for a whole answer nobody saw, so a caller that records the call's cost records its bound (boundMicro) when this is above 0 or usage is null, and the priced usage otherwise.

usage​

usage: TokenUsage | null

The call's tokens, as the provider reported them: the answer's, and those of earlier attempts answered with an error status or with a Responses result marked failed; null when the answer reported none, so a caller records the bound.

version​

version: typeof TRANSLATOR_VERSION

{ itemId: string; model: string; providerId: string; reason: "same_language"; source: string; status: "skipped"; target: string; usage: null; version: typeof TRANSLATOR_VERSION; }

itemId​

itemId: string

model​

model: string

providerId​

providerId: string

reason​

reason: "same_language"

source​

source: string

status​

status: "skipped"

target​

target: string

usage​

usage: null

version​

version: typeof TRANSLATOR_VERSION