Skip to content

feat(adk): add enhanced tool call related usage in middlewares - #990

Merged
N3kox merged 1 commit into
mainfrom
feat/reduction_mw
Apr 27, 2026
Merged

feat(adk): add enhanced tool call related usage in middlewares#990
N3kox merged 1 commit into
mainfrom
feat/reduction_mw

Conversation

@N3kox

@N3kox N3kox commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

  1. Extends the tool reduction middleware to support the Enhanced tool-call endpoints (invokable and streamable).
  2. Adds GenOffloadFilePath, which supports offloading trunc / clear content to customized path. This could be useful when using Kimi model which tool_call_id are be duplicated between different calls.

zh(optional):

  1. 为 tool reduction middleware 增加对 Enhanced ToolCall(同步/流式)接口的支持
  2. 新增 GenOffloadFilePath,支持默认截断 / 清理时配置自定义 offload 路径。Kimi 系列模型在不同轮次输出中可能包含相同的 tool_call_id,此时可以使用该方法加以区分。

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.85%. Comparing base (7ac01e2) to head (29312f0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
adk/middlewares/reduction/reduction.go 90.47% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
+ Coverage   82.82%   82.85%   +0.02%     
==========================================
  Files         148      148              
  Lines       16668    16740      +72     
==========================================
+ Hits        13806    13870      +64     
- Misses       1903     1908       +5     
- Partials      959      962       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@N3kox
N3kox force-pushed the feat/reduction_mw branch from 50521af to 25a7059 Compare April 24, 2026 03:30
@N3kox
N3kox marked this pull request as ready for review April 24, 2026 03:37
@N3kox
N3kox marked this pull request as draft April 24, 2026 09:41
@N3kox
N3kox force-pushed the feat/reduction_mw branch 3 times, most recently from bb45b67 to 16d9c59 Compare April 27, 2026 03:32
@N3kox
N3kox marked this pull request as ready for review April 27, 2026 03:47
Comment thread adk/middlewares/reduction/consts.go Outdated
@N3kox
N3kox force-pushed the feat/reduction_mw branch from 16d9c59 to 29312f0 Compare April 27, 2026 10:02
Comment thread adk/middlewares/reduction/reduction.go
@N3kox
N3kox merged commit 9b80f95 into main Apr 27, 2026
19 checks passed
@N3kox
N3kox deleted the feat/reduction_mw branch April 27, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants