gnodet-bot commented on code in PR #31184:
URL: https://github.com/apache/camel/pull/31184#discussion_r4756793240


##########
components/camel-ai/camel-langchain4j-agent-api/src/main/java/org/apache/camel/component/langchain4j/agent/api/Headers.java:
##########
@@ -74,8 +74,13 @@ public class Headers {
               javaType = "String")
     public static final String REQUEST_MODEL = 
"CamelLangChain4jAgentRequestModel";
 
-    @Metadata(description = "The name of the model that answered. The producer 
does not set it, as the Result of"
-                            + " LangChain4j does not hold it.",
+    /**
+     * @deprecated The LangChain4j agent Result does not expose the response 
model name, so the producer does not
+     *             populate this header.
+     */
+    @Deprecated
+    @Metadata(
+              description = "The response model name. Not populated by the 
producer.",
               javaType = "String")
     public static final String RESPONSE_MODEL = 
"CamelLangChain4jAgentResponseModel";

Review Comment:
   💡 **Missing `deprecationNote` on `@Metadata`:** Camel's 
`EndpointSchemaGeneratorMojo` reads `@Metadata(deprecationNote = "...")` as a 
distinct field from `description` and emits it as `"deprecationNote"` in the 
catalog JSON. Without it, tooling (IDEs, the Camel catalog CLI) cannot surface 
_why_ this header is deprecated — only that it is. The pattern seen in other 
deprecations in this codebase (e.g. in camel-hazelcast and camel-pdf headers):
   
   ```suggestion
       @Metadata(
                 description = "The response model name. Not populated by the 
producer.",
                 deprecationNote = "The LangChain4j agent Result does not 
expose the response model name; the producer never populates this header.",
                 javaType = "String")
   ```



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