Skip to content

Conversation

@elefeint
Copy link

DuckDB has a custom_user_agent field that is used by hosted services like MotherDuck to identify the integration (python), framework (SQLAlchemy or none, depending on whether the loader is used) and the integration (LangChain!).

This PR adds the langchain identifier to 2 out of the 3 DuckDB paths. The vectorstore was impractical to add it to, since it expects the end user to create the DuckDB connection first. It might be more ergonomic to have the user pass the connection string, but that's a side quest for a different Christmas.

Adding conditional logic to sql_database.py is not ideal -- should I create a helper like from_cnosdb() instead?

  • Lint and test: 6 tests in tests/unit_tests/document_loaders/test_recursive_url_loader.py fail for me. These seem unrelated to my changes; let's see what CI says.

Gen AI disclaimer: I use Claude Code to generate the first iteration, then pair program with it until the code meets my intent and standards. I am responsible for every line of code proposed.

mdrxy pushed a commit to langchain-ai/docs that referenced this pull request Dec 26, 2025
## Overview
This page still had workaround MotherDuck token syntax from
pre-duckdb-1.0. I updated the syntax and opportunistically fixed
MotherDuck capitalization.

## Type of change

**Type:** Update existing documentation

## Related issues/PRs
I noticed this when working on testing
langchain-ai/langchain-community#487 , but it's
not actually related.

## Checklist
<!-- Put an 'x' in all boxes that apply -->
- [x] I have read the [contributing guidelines](README.md)
- [x] I have tested my changes locally using `docs dev`
- [x] All code examples have been tested and work correctly
- n/a I have used **root relative** paths for internal links
- n/a I have updated navigation in `src/docs.json` if needed

AI disclosure: I normally use Claude Code, but the docs it generates
continue being too verbose so I rewrote this all to be minimal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant