Repository navigation
Description
🔴 Required Information
Is your feature request related to a specific problem?
Yes.
When using stream=True, several ADK model adapters currently buffer function-call argument deltas internally and only emit a completed FunctionCall after the model has finished generating the tool invocation.
As a result, applications receive token-by-token text updates but no visibility into function-call generation progress. For large schemas or complex tool arguments, this can create several seconds of apparent inactivity even though the provider is actively streaming tool-call data.
This behavior is inconsistent across providers and differs from the native Gemini progressive streaming experience, where intermediate function-call information can already be surfaced.
Affected adapters appear to include:
- LiteLLM (also discussed in PROGRESSIVE_SSE_STREAMING is not honored by the LiteLlm adapter — function-call argument deltas are buffered until finish_reason #5342)
- OpenAI Chat Completions
- OpenAI Responses / Azure Responses
- Anthropic
- Apigee OpenAI-compatible Chat Completions
Describe the Solution You'd Like
I would like ADK to expose function-call argument streaming through the existing streaming contract.
When an adapter receives a function-call start event or argument delta during a stream=True request:
- Emit
LlmResponse(partial=True)updates. - Surface raw incremental argument fragments through
FunctionCall.partial_args. - Mark intermediate updates with
FunctionCall.will_continue=True. - Continue emitting the current final aggregated
FunctionCallcontaining parsedargswhen generation completes. - Preserve stable function-call IDs across parallel or interleaved tool calls.
Partial updates should remain informational only and must never trigger tool execution.
Ideally, this would require no new public API, feature flag, configuration option, or wrapper abstraction. The change could remain localized within existing adapter streaming loops.
Impact on your work
This would significantly improve real-time UX for streaming agent applications.
Currently, users can observe normal text streaming but see no activity while a model constructs a large function call. Exposing partial function-call updates would allow UIs to display ongoing tool invocation progress and provide a more responsive experience.
This is particularly useful for:
- Large structured tool schemas
- Multi-agent workflows
- Multi-tool orchestration
- Interactive chat and agent UIs
- Long-running streaming sessions
I do not have a strict timeline for this feature, but it would be valuable for production streaming experiences.
Willingness to contribute
Yes
I would be interested in implementing the change and contributing a PR if the proposed behavior aligns with ADK's design goals.
🟡 Recommended Information
Describe Alternatives You've Considered
Current alternatives include:
- Waiting for the final aggregated function call before updating the UI.
- Implementing provider-specific streaming logic outside of ADK.
- Relying on Gemini-specific behavior where available.
These approaches either reduce responsiveness or require provider-specific handling that bypasses ADK's abstraction layer.
Proposed API / Implementation
No public API changes are required.
Example behavior:
# Intermediate update
yield LlmResponse(
partial=True,
content=Content(
parts=[
Part(
function_call=FunctionCall(
id=call_id,
name=function_name,
partial_args=types.PartialArg(
string_value=argument_delta
),
will_continue=True,
)
)
]
),
)
# Existing final aggregated update
yield LlmResponse(
partial=False,
content=Content(
parts=[
Part(
function_call=FunctionCall(
id=call_id,
name=function_name,
args=parsed_args,
)
)
]
),
)Possible event mappings:
| Provider | Streaming Event |
|---|---|
| OpenAI Chat | delta.tool_calls |
| OpenAI Responses / Azure Responses | response.function_call_arguments.delta |
| Anthropic | InputJSONDelta.partial_json |
| LiteLLM | FunctionChunk |
| Apigee OpenAI-compatible | Tool-call delta events |
Additional Context
Suggested acceptance criteria:
- Partial argument events are emitted for LiteLLM, OpenAI Chat, OpenAI Responses/Azure Responses, Anthropic, and Apigee Chat Completions whenever raw argument deltas are available.
- Native Gemini, Interactions, and Gemini Live streaming behavior remains unchanged.
- Incomplete JSON never appears in
FunctionCall.argsduring partial updates. - Partial responses never trigger tool execution.
- Existing final aggregated streaming responses remain unchanged.
stream=Falsebehavior remains unchanged.
Activity
sanketpatil06 commentedon Aug 11, 2026
Hi @FrigaZzz, thank you for the feature request. If you have a solution in mind, please feel free to submit a PR; our team would be happy to review it.
FrigaZzz commentedon Aug 11, 2026
Hi! Thanks for getting back to me.
I've put together a PR with a solution specifically for the OpenAI model wrapper (you can see it here: #6679).
I’m planning to add support for other providers soon, but I currently can't test certain clients directly because I don't have the necessary API tokens for them. I've laid the groundwork, but I'm hoping others in the community might be able to jump in, help test those environments, or contribute the missing pieces!
Let me know what you think of the initial implementation. Happy to make adjustments based on your review!
feat: stream partial function-call arguments across model adapters