Commit Graph

16 Commits

Author SHA1 Message Date
Selcuk Gun
b181cbc8bc fix: Handle non-indexed function call chunks with incremental fallback index
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
2025-06-02 10:51:56 -07:00
Shawn Yang
3930a4b989 chore: Add agent engine telemetry
PiperOrigin-RevId: 765346182
2025-05-30 14:49:39 -07:00
Xiang (Sean) Zhou
ae7d3a79c8 chore: autoformat the test_litellm.py
PiperOrigin-RevId: 764937761
2025-05-29 16:49:20 -07:00
LucasNobre
05f4834759 Copybara import of the project:
--
cef3ca1ed3493eebaeab3e03bdf5e56b35c0b8ef by Lucas Nobre <lucaas.sn@gmail.com>:

feat: Add index tracking to handle parallel tool call using litellm
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/759 from lucasnobre212:fix/issue_484 65e22934bf839f9ea03963b9ec6c23fdce03f59f
PiperOrigin-RevId: 764902433
2025-05-29 15:11:23 -07:00
Xiang (Sean) Zhou
0250d9e3ac chore: reformat codes using autoformat.sh
PiperOrigin-RevId: 764584699
2025-05-29 11:47:22 -07:00
Almas Akchabayev
795605a37e fix: separate thinking from text parts in streaming mode
Copybara import of the project:

--
79962881ca1c17eb6d7bd9dcf31a44df93c9badd by Almas Akchabayev <almas.akchabayev@gmail.com>:

fix: separate thinking from text parts in streaming mode
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/777 from almeynman:separate-thinking-and-text-parts-in-stream-mode b63dcc7fd0fc3973888dcbb9d4cc7e7e0a66e7f7
PiperOrigin-RevId: 764561932
2025-05-28 22:11:14 -07:00
avidelatm
7fc09b2c64 chore: Adding regex for claude-4 models to anthropic_llm and updating tests
Copybara import of the project:

--
824b4379d59a375191f8ce10997efd4021d5d0b3 by Andres Videla <andres.videla@trademe.co.nz>:

Adding regex for claude-4 models to anthropic_llm and updating tests

--
8fa2a2df1931026dc803eee0e9b60e82e90c9efa by Wei Sun (Jack) <Jacksunwei@gmail.com>:

Adds trailing comma.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/934 from avidelatm:feature/add-support-for-claude-4-models-to-anthropic_llm 8d10bacdbec952ec9832180ac6c1d220916641da
PiperOrigin-RevId: 764396694
2025-05-28 13:39:04 -07:00
Xiang (Sean) Zhou
ff8a3c9b43 chore: reformat the codes using autoformat.sh
PiperOrigin-RevId: 762004002
2025-05-22 09:43:54 -07:00
Liang Wu
09f30afe10 fix: failed unit test for Gemini model headers.
Root cause is that GenAI SDK updated their logic of adding headers in the latest version.

PiperOrigin-RevId: 761751413
2025-05-21 18:40:16 -07:00
Google Team Member
4542af5650 Fix ollama issues with ChatCompletionAssistantToolCall
PiperOrigin-RevId: 761732316
2025-05-21 17:27:01 -07:00
Selcuk Gun
509db3f9fb Add token usage to gemini (streaming), litellm and anthropic
Also included a token_usage sample that showcases the token usage of subagents with different models under a parent agent.

PiperOrigin-RevId: 759347015
2025-05-15 16:22:36 -07:00
Selcuk Gun
794a70edcd Support async agent and model callbacks
PiperOrigin-RevId: 755542756
2025-05-06 15:14:10 -07:00
hsuyuming
879064343c Copybara import of the project:
--
ad923c2c8c503ba73c62db695e88f1a3ea1aeeea by YU MING HSU <abego452@gmail.com>:

docs: enhance Contribution process within CONTRIBUTING.md

--
8022924fb7e975ac278d38fce3b5fd593d874536 by YU MING HSU <abego452@gmail.com>:

fix: move _maybe_append_user_content from google_llm.py to base_llm.py,
so subclass can get benefit from it, call _maybe_append_user_content
from generate_content_async within lite_llm.py

--
cf891fb1a3bbccaaf9d0055b23f614ce52449977 by YU MING HSU <abego452@gmail.com>:

fix: modify install dependencies cmd, and use pyink to format codebase
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/428 from hsuyuming:fix_litellm_error_issue_427 dbec4949798e6399a0410d1b8ba7cc6a7cad7bdd
PiperOrigin-RevId: 754124679
2025-05-02 13:59:50 -07:00
Selcuk Gun
9a44831a08
Add parallel tool call support for litellm (#172)
Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-04-14 17:42:33 -07:00
Selcuk Gun
cfbcc17644
Fix empty list in content on tool calls causing ollama parse error (#102)
This is related to google/adk-python#49
2025-04-12 17:34:57 -07:00
Jack Sun
05142a07cc
Moves unittests to root folder and adds github action to run unit tests. (#72)
* 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
2025-04-11 08:25:59 -07:00