Skip to content
providerkit
GitHub

Citation

Defined in: core/src/hosted/types.ts:102

A source tied to the answer.

start and end are JS string indices into the turn’s content, converted from whatever the vendor counts in (UTF-8 bytes on Gemini, code points on OpenAI) and checked against the text. A span that doesn’t check out is left off, never guessed: the citation still names its source. start equal to end is a point.

anchor says what the span covers. claim is text the source backs: Anthropic cites whole text blocks, Gemini sentences. marker is a link the model wrote into the answer, which is what OpenAI’s offsets select.

optional anchor?: "claim" | "marker";

Defined in: core/src/hosted/types.ts:106


optional end?: number;

Defined in: core/src/hosted/types.ts:105


source: Source;

Defined in: core/src/hosted/types.ts:103


optional start?: number;

Defined in: core/src/hosted/types.ts:104