This is in response to the litellm v1.71.2 + ollama v0.9.0 sending function call chunks with 0 indices across multiple calls and lacking call ids.
Solutions introduced:
1. increment fallback index when accumulated arg becomes json parsable.
2. tolerate finish reason == stop when tool calls are present
3. fallback to index when tool call id is None
Fixes https://github.com/google/adk-python/issues/294
PiperOrigin-RevId: 766258344
Copybara import of the project:
--
f56fd74efecc2cf6fbe6db70e91dfa7780fb9c68 by Mohammad <mohammaddevgermany@gmail.com>:
build(package): add py.typed and include it in flit config
This adds a py.typed marker file to the google.adk package and updates
the Flit configuration in pyproject.toml to include it in the distribution.
This ensures the package is PEP 561 compliant and allows static type
checkers (like mypy and pyright) to recognize that the package supports type hints.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/913 from mohamadghaffari:add-py-typed f56fd74efecc2cf6fbe6db70e91dfa7780fb9c68
PiperOrigin-RevId: 764603119
--
84abc07d2342e88e601949faa67a3014c0f491e8 by mukundjha-mj <mukundjha204@gmail.com>:
Fix spelling mistakes, reorder sections, and improve readability in pyproject.toml
--
122c19d4be0fad394fbd02720734aa4625877637 by mukundjha-mj <mukundjha204@gmail.com>:
fix(pyproject): correct spelling and reorder config sections for clarity
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/669 from mukundjha-mj:fix/typos-pyproject 122c19d4be0fad394fbd02720734aa4625877637
PiperOrigin-RevId: 757318920
Copybara import of the project:
--
d481e0604a79470e2c1308827b3ecb78bfb5327e by Alan B <alan@nerds.ai>:
feat: 🚧 catch user transcription
--
bba436bb76d1d2f9d5ba969fce38ff8b8a443254 by Alan B <alan@nerds.ai>:
feat: ✨ send user transcription event as llm_response
--
ad2abf540c60895b79c50f9051a6289ce394b98d by Alan B <death1027@outlook.com>:
style: 💄 update lint problems
--
744703c06716300c0f9f41633d3bafdf4cb180a1 by Hangfei Lin <hangfeilin@gmail.com>:
fix: set right order for input transcription
--
31a5d42d6155b0e5caad0c73c8df43255322016f by Hangfei Lin <hangfeilin@gmail.com>:
remove print
--
59e5d9c72060f97d124883150989315401a4c1b5 by Hangfei Lin <hangfeilin@gmail.com>:
remove api version
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/495 from BloodBoy21:main ea29015af041f9785abaa8583e2c767f9d8c8bc8
PiperOrigin-RevId: 755401615
--
21736067f9 by Alankrit Verma <alankrit386@gmail.com>:
feat(llm_flows): support async before/after tool callbacks
Previously, callbacks were treated as purely synchronous,
so passing an async coroutine caused “was never awaited”
errors and Pydantic serialization failures.
Now we detect awaitable return values from
before_tool_callback and after_tool_callback,
and `await` them if necessary.
Fixes: #380
--
08ac9a117e by Alankrit Verma <alankrit386@gmail.com>:
Refactor function callback handling and update type signatures
- Simplify variable names in `functions.py`: always use `function_response` and `altered_function_response`
- Update LlmAgent callback type aliases to support async:
- Import `Awaitable`
- Change `BeforeToolCallback` and `AfterToolCallback` signatures to return `Awaitable[Optional[dict]]`
- Ensure `after_tool_callback` uses `await` when necessary
--
fcbf57466e by Alankrit Verma <alankrit386@gmail.com>:
refactor: update callback type signatures to support sync and async responses
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/434 from AlankritVerma01:support-async-tool-callbacks 926b0ef1a6
PiperOrigin-RevId: 753005846
* Move unit tests to root package.
* Adds deps to "test" extra, and mark two broken tests in tests/unittests/auth/test_auth_handler.py
* Adds github workflow
* minor fix in lite_llm.py for python 3.9.
* format pyproject.toml