purushah opened a new issue, #1133: URL: https://github.com/apache/flink-agents/issues/1133
### Description Model routers are registered with `Agent.addResource(name, ResourceType.MODEL_ROUTER, ModelRouter.of(...).build())` or `agentsEnv.addResource(...)`. Connections, chat models, embedding models, vector stores, prompts, tools and MCP servers all have a declaration annotation (`@ChatModelConnection`, `@ChatModelSetup`, ...), so a router is the one resource that cannot be declared annotation-first inside an agent class. Add a `@ModelRouterSetup` annotation for static methods (and fields) returning the router's `ResourceDescriptor`, mirroring `@ChatModelSetup`, and have `AgentPlan` pick it up like the other setup annotations. `@ModelRouter` would collide with the existing `org.apache.flink.agents.api.chat.model.routing.ModelRouter` builder class. Follow-up from the review of #1124 (Model Routing documentation); once it lands the quick start there can drop its constructor registration. ### Acceptance - `@ModelRouterSetup` in `org.apache.flink.agents.api.annotation`, documented in the Model Routing page. - `AgentPlan` registers the method name as a `MODEL_ROUTER` resource; the chat-model/router name clash check still applies. - Unit test on the plan builder and the quick start example switched to the annotation. -- 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]
