Skip to content

Change CallId to allow for more data.#793

Merged
jgindin merged 2 commits intogoogle:mainfrom
jgindin:enhance-callid
Mar 6, 2026
Merged

Change CallId to allow for more data.#793
jgindin merged 2 commits intogoogle:mainfrom
jgindin:enhance-callid

Conversation

@jgindin
Copy link
Collaborator

@jgindin jgindin commented Mar 6, 2026

Description

The agent identifier and name of the function called are now optional; the callId itself is still required.

This enables support for stateless backends, especially where there are multiple instances sharing a backing session store.

Pre-launch Checklist

  • [x ] I signed the CLA.
  • [ x] I read the Contributors Guide.
  • [ x] I read the Style Guide.
  • I have added updates to the CHANGELOG.
  • [ x] I updated/added relevant documentation.
  • [ x] My code changes (if any) have tests.

The agent identifier and name of the function called are now optional;
the callId itself is still required.

This enables support for stateless backends, especially where there are
multiple instances sharing a backing session store.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the CallId type from a string to an object to support stateless backends by allowing optional agentId and call name properties. The changes are consistently applied to the schema and test files. My primary feedback is a suggestion to improve the naming within the new CallId object for better clarity. Also, please note that this breaking change should be documented in the CHANGELOG.md as per repository guidelines.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment on lines +12 to +28
"type": "object",
"description": "The unique identifier for a server initiated function call.",
"properties": {
"agentId": {
"type": "string",
"description": "Identifies the agent initiating the function call."
},
"call": {
"type": "string",
"description": "Name of the function call."
},
"callId": {
"type": "string",
"description": "Uniquely identifies this instance of the function call."
}
},
"required": ["callId"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The property name callId within the CallId object is a bit repetitive (CallId.callId). For better clarity and to avoid this stutter, consider renaming callId to id. This would result in a more idiomatic CallId.id.

This change would also require updating the required field here and all test cases to use id instead of callId (e.g., "functionCallId": { "id": "unique-call-id-123" }).

Suggested change
"type": "object",
"description": "The unique identifier for a server initiated function call.",
"properties": {
"agentId": {
"type": "string",
"description": "Identifies the agent initiating the function call."
},
"call": {
"type": "string",
"description": "Name of the function call."
},
"callId": {
"type": "string",
"description": "Uniquely identifies this instance of the function call."
}
},
"required": ["callId"]
"type": "object",
"description": "The unique identifier for a server initiated function call.",
"properties": {
"agentId": {
"type": "string",
"description": "Identifies the agent initiating the function call."
},
"call": {
"type": "string",
"description": "Name of the function call."
},
"id": {
"type": "string",
"description": "Uniquely identifies this instance of the function call."
}
},
"required": ["id"]

@jgindin jgindin requested a review from gspencergoog March 6, 2026 18:25
For cases that need the function call name, the suggestion is to build
it into the `callId`. E.g., "<function call name>-<unique id>"
@jgindin jgindin merged commit ac2d159 into google:main Mar 6, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 6, 2026
@jgindin jgindin deleted the enhance-callid branch March 6, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants