You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ColtenOuO (via GitHub)" <gi...@apache.org> on 2026/08/19 13:56:02 UTC
[PR] Add test_connection support to LangChainHook and LlamaIndexHook [airflow]
ColtenOuO opened a new pull request, #71841:
URL: https://github.com/apache/airflow/pull/71841
## Summary
`LangChainHook` and `LlamaIndexHook` are two of the four selectable connection types in the `common.ai` provider, but neither implemented `test_connection()`.
Clicking "Test" on a connection of either type in the UI always returned:
> Hook LangChainHook doesn't implement or inherit test_connection method
<img width="1925" height="906" alt="image" src="https://github.com/user-attachments/assets/d3ff1d23-4597-4b4b-8466-13e4ff41dae0" />
`PydanticAIHook` and `MCPHook` — the other two connection types in this provider already implement it, resolving the model/config without making a real API call.
### Changes
This PR adds the same pattern to the two missing hooks:
- `LangChainHook.test_connection()` resolves the chat model via `get_chat_model()`.
- `LlamaIndexHook.test_connection()` resolves the LLM via `get_llm()`.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Sonnet 5) for writting test.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add test_connection support to LangChainHook and LlamaIndexHook [airflow]
Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan merged PR #71841:
URL: https://github.com/apache/airflow/pull/71841
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org