Skip to content

Add test_connection support to LangChainHook and LlamaIndexHook - #71841

Open
ColtenOuO wants to merge 1 commit into
apache:mainfrom
ColtenOuO:common-ai-langchain-llamaindex-test-connection
Open

Add test_connection support to LangChainHook and LlamaIndexHook#71841
ColtenOuO wants to merge 1 commit into
apache:mainfrom
ColtenOuO:common-ai-langchain-llamaindex-test-connection

Conversation

@ColtenOuO

@ColtenOuO ColtenOuO commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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

image

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?
  • Yes — Claude Code (Sonnet 5) for writing test.

Clicking Test on a LangChain or LlamaIndex connection in the UI always
reported "doesn't implement or inherit test_connection method" since
neither hook implemented it, unlike PydanticAIHook and MCPHook which
already validate their connections this way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants