GreatEugenius opened a new pull request, #854:
URL: https://github.com/apache/flink-agents/pull/854

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: #853 
   
   ### Purpose of change
   
   Support tool parameter injection for function tools.
   
   This change lets framework-owned arguments, such as tenant id or request 
context, be injected at tool execution time without exposing them to the 
model-facing tool schema.
   
   Main changes:
   
   - Add Python API support:
     - `@tool(injected_args=[...])`
     - `@before_tool_call`
     - `@after_tool_call`
   
   - Add Java API support:
     - `@ToolParam(injected = true)`
     - `@BeforeToolCall`
     - `@AfterToolCall`
   
   - Inject parameters in the built-in `tool_call_action`, after reading model 
arguments and before invoking the tool.
   
   - Preserve `injected_args` in the plan/runtime representation while 
filtering injected parameters from model metadata.
   
   - Add YAML API support:
     - `tools[].injected_args`
     - `before_tool_call`
     - `after_tool_call`
   
   - Keep cross-language tool calls supported, but explicitly reject 
cross-language tool-call hooks in YAML because hooks execute directly inside 
the host-language built-in `tool_call_action`.
   
   ### Tests
   UT & E2E Test
   <!-- How is this change verified? -->
   
   ### API
   Yes
   <!-- Does this change touches any public APIs? -->
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [x] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to