Lee-W commented on code in PR #75369:
URL: https://github.com/apache/airflow/pull/75369#discussion_r4519807900
##########
providers/common/ai/src/airflow/providers/common/ai/hooks/pydantic_ai.py:
##########
@@ -562,6 +586,92 @@ def _provider_factory(pname: str) -> Any:
return infer_model(model_name)
+ def _build_missing_model_error(self) -> ValueError:
+ return ValueError(
+ f"No model specified for connection '{self.llm_conn_id}'. Set
model_id on the "
+ "hook or the Model field on the connection."
+ )
+
+ def _build_readiness_backend(
+ self, model_name: str, backend_factory: Callable[...,
ModelReadinessBackend] | None
Review Comment:
Sounds good. `backend_factory` is now typed as a
`ModelReadinessBackendFactory` protocol with a keyword-only `__call__(*,
model_name, base_url)`, modeled on `AgentFactory` in `durable/strands.py`.
--
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]