Depends on: #2634
Summary
Name-value attributes on LlmDataEx that describe a canonical section independently of any dialect, so a block decoded from one dialect can be encoded into another.
A section type alone does not carry everything llm(client) needs to encode a block. A canonical attribute is a dialect-neutral concept a section can carry, named independently of any dialect.
| attribute |
type |
sections |
what it describes |
media-type |
string |
user-image, user-document, user-audio, user-video |
media type of the content |
source |
inline, url, reference |
user-image, user-document, user-audio, user-video |
how the content is supplied |
ref-id |
string |
the four media sections, when source is reference |
provider-side file handle |
filename |
string |
user-document |
name of the document |
tool-name |
string |
tool-definition, tool-call, server-tool-result |
name of the tool |
tool-call-id |
string |
tool-call, tool-result, server-tool-result |
joins a call to its result |
is-error |
bool |
tool-result |
the call failed |
provider-executed |
bool |
server-tool-result |
the tool was executed by the provider rather than the caller |
Eight, and no more without a reason: a new attribute must be a dialect-neutral concept that the section type cannot express. Anything specific to one dialect is a dialect extension (#2638). Names are canonical, never dialect-specific.
The location of a url source is not an attribute. It is unbounded, and the payload already carries it, so hoisting it would duplicate an unbounded value into a bounded extension. A url section is classified by source alone and its location streams in the payload. A ref-id is a bounded provider handle and is hoisted.
Acceptance criteria (test-first)
Depends on: #2634
Summary
Name-value attributes on
LlmDataExthat describe a canonical section independently of any dialect, so a block decoded from one dialect can be encoded into another.media-typeuser-image,user-document,user-audio,user-videosourceinline,url,referenceuser-image,user-document,user-audio,user-videoref-idsourceisreferencefilenameuser-documenttool-nametool-definition,tool-call,server-tool-resulttool-call-idtool-call,tool-result,server-tool-resultis-errortool-resultprovider-executedserver-tool-resultEight, and no more without a reason: a new attribute must be a dialect-neutral concept that the section type cannot express. Anything specific to one dialect is a dialect extension (#2638). Names are canonical, never dialect-specific.
The location of a
urlsource is not an attribute. It is unbounded, and the payload already carries it, so hoisting it would duplicate an unbounded value into a bounded extension. Aurlsection is classified bysourcealone and its location streams in the payload. Aref-idis a bounded provider handle and is hoisted.Acceptance criteria (test-first)
llm(client)encode renders each attribute into the target dialect's wire form where the dialect has one..rptcoverage forsource: urlandsource: referenceblocks.