cetingokhan commented on code in PR #62816:
URL: https://github.com/apache/airflow/pull/62816#discussion_r2901761000


##########
providers/common/ai/src/airflow/providers/common/ai/hooks/pydantic_ai.py:
##########
@@ -157,13 +187,229 @@ def test_connection(self) -> tuple[bool, str]:
         """
         Test connection by resolving the model.
 
-        Validates that the model string is valid, the provider package is
-        installed, and the provider class can be instantiated. Does NOT make an
-        LLM API call — that would be expensive, flaky, and fail for reasons
-        unrelated to connectivity (quotas, billing, rate limits).
+        Validates that the model string is valid and the provider class can be
+        instantiated with the supplied credentials.  Does NOT make an LLM API
+        call — that would be expensive and fail for reasons unrelated to
+        connectivity (quotas, billing, rate limits).
         """
         try:
             self.get_conn()
             return True, "Model resolved successfully."
         except Exception as e:
             return False, str(e)
+
+
+class PydanticAIAzureHook(PydanticAIHook):
+    """
+    Hook for Azure OpenAI via pydantic-ai.
+
+    Connection fields:
+        - **password**: Azure API key
+        - **host**: Azure endpoint (e.g. 
``https://<resource>.openai.azure.com``)
+        - **extra** JSON::
+
+            {"model": "azure:gpt-4o", "api_version": "2024-07-01-preview"}
+
+    :param llm_conn_id: Airflow connection ID.
+    :param model_id: Model identifier, e.g. ``"azure:gpt-4o"``.
+    """

Review Comment:
   I added the underscore symbol, but I want you to know that you will still 
see the warning like this :)
   
   `[2026-03-08 15:05:07] WARNING - Connection schemes (type: pydanticai_azure) 
shall not contain '_' according to RFC3986.`



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