Allow missing name/args in FunctionCallData (all fields optional per Vertex schema)
#12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
FunctionCallDatainsrc/types/common.rsrequires both fields:The Vertex AI v1 schema (
GoogleCloudAiplatformV1FunctionCall, discovery revision 20261012) documents every field as optional:idid(see #11).nameFunctionDeclaration.name.argspartialArgswillContinueImpact
Any
functionCallpart withoutargsornamefails to deserialize, which fails the whole response or stream chunk. Verified with serde:{"name":"f"}→missing fieldargs``{"partialArgs":[],"willContinue":true}→missing fieldname``This can hit zero-argument function calls (if the API omits
args) and streamed function-call arguments.Proposed fix
#[serde(default)]toargs(or make itOption<Value>) so a missingargsdeserializes instead of erroring.name:Option<String>matches the schema, but is a breaking change for callers.#[serde(default)]keeps the type but yields an empty name for partial chunks.partial_argsandwill_continue(withskip_serializing_if) to support streamed function-call arguments.