o-nikolas commented on code in PR #77560:
URL: https://github.com/apache/airflow/pull/77560#discussion_r4684864451


##########
providers/amazon/docs/operators/bedrock.rst:
##########
@@ -229,6 +229,40 @@ 
https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-supported.ht
     :start-after: [START howto_operator_bedrock_create_knowledge_base]
     :end-before: [END howto_operator_bedrock_create_knowledge_base]
 
+
+Managed Knowledge Bases
+-----------------------
+
+The ``BedrockCreateKnowledgeBaseOperator`` also supports Amazon Bedrock Managed
+Knowledge Bases through the ``knowledge_base_config`` parameter.
+
+When ``knowledge_base_config`` is provided, ``embedding_model_arn`` and
+``storage_config`` are optional. The configuration is passed directly to the

Review Comment:
   Small wording thing: when `knowledge_base_config` is set, 
`embedding_model_arn` is ignored rather than optional (the ARN goes inside the 
config), and `storage_config` is still required for a custom `VECTOR` config. 
Could this paragraph and the param docstrings (operator L694-698) say that?
   
   ---
   Drafted-by: Kiro (claude-opus-5.5); reviewed by @o-nikolas before posting



##########
providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:
##########
@@ -735,29 +739,42 @@ class 
BedrockCreateKnowledgeBaseOperator(AwsBaseOperator[BedrockAgentHook]):
     def __init__(
         self,
         name: str,
-        embedding_model_arn: str,
-        role_arn: str,
-        storage_config: dict[str, Any],
+        embedding_model_arn: str | None = None,
+        role_arn: str | None = None,

Review Comment:
   Could `role_arn` stay a required `str`? Operators only accept keyword 
arguments, so you can move it above `embedding_model_arn` without breaking 
anyone, and then the extra `role_arn` check and its test aren't needed.
   
   ---
   Drafted-by: Kiro (claude-opus-5.5); reviewed by @o-nikolas before posting



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