wenjin272 opened a new issue, #1333:
URL: https://github.com/apache/flink-agents/issues/1333

   ### Search before asking
   
   - [x] I searched the existing issues; #1062 tracks this work at the umbrella 
level, but there is no dedicated Python implementation issue.
   
   ### Description
   
   Parent: #1062.
   
   Flink Agents 0.4 supports model routing through the Java API. Python 
currently exposes `MODEL_ROUTER` only for deserializing Java plans and rejects 
Python-side router registration.
   
   Add Python model routing support with behavior aligned with the Java 
functionality delivered in 0.4. This issue covers declaration, registration, 
and execution, so Python applications can use a router wherever the supported 
chat APIs accept a model name.
   
   ### Acceptance criteria
   
   - [ ] Provide Python router and strategy declarations and support 
registration on an Agent or its execution environment.
   - [ ] Support rule-based, LLM-judge, and custom routing strategies, with 
serializable declarations and plan-time validation consistent with Java.
   - [ ] Preserve the select-not-delegate contract: strategies select a 
candidate, while the framework owns model invocation, retries, and tool 
execution.
   - [ ] Align default-model selection, abstention, invalid selections, 
candidate fallback order, and failure handling with Java.
   - [ ] Keep the selected model throughout the tool-calling loop and preserve 
routing decisions and model calls through durable execution and replay.
   - [ ] Provide equivalent routing events, response metadata, and metrics, 
including judge usage attribution.
   - [ ] Add deterministic tests for the above contracts, relevant 
cross-language coverage, and Python examples and documentation.
   
   ### Scope
   
   Use Java 0.4 routing behavior as the parity baseline. New strategies such as 
DecisionModel routing (#1325) remain separately tracked. YAML resource 
declarations will be tracked in a separate issue that depends on this work. 
Java annotation support remains in #1133.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!
   
   


-- 
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