Lee-W commented on code in PR #74451:
URL: https://github.com/apache/airflow/pull/74451#discussion_r4273393633
##########
providers/common/ai/src/airflow/providers/common/ai/hooks/pydantic_ai.py:
##########
@@ -406,13 +406,12 @@ def _resolve_own_model(
def _provider_factory(pname: str) -> Any:
try:
return infer_provider_class(pname)(**_kwargs)
- except TypeError:
- self.log.warning(
- "Provider '%s' rejected kwargs %s; falling back to
env-var auth",
- pname,
- list(_kwargs),
- )
- return infer_provider(pname)
+ except TypeError as e:
+ raise ValueError(
+ f"Provider '{pname}' rejected the credentials from
connection "
Review Comment:
Reworded to "Could not build provider 'X' from the fields on connection
'Y'", keeping the fields passed and the `TypeError` text. Updated the hook
docstring, `provider_fallback.rst` and the two test names that still said
"credentials".
--
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]