Skip to content

docs(vectordbs/opensearch): correct collection_name default, document user and password - #7392

Open
OfficialAbhinavSingh wants to merge 1 commit into
mem0ai:mainfrom
OfficialAbhinavSingh:docs/opensearch-python-config-params
Open

OfficialAbhinavSingh wants to merge 1 commit into
mem0ai:mainfrom
OfficialAbhinavSingh:docs/opensearch-python-config-params

Conversation

@OfficialAbhinavSingh

Copy link
Copy Markdown
Contributor

Linked Issue

None — docs-only, so this is exempt from the accepted-issue gate (pr-gate.yml). Happy to file an issue first if you would prefer one.

Description

Two corrections to the Python tab of the OpenSearch config table, both checked against the code on main.

collection_name was listed as required. OpenSearchConfig gives it a default of mem0 and nothing enforces it:

collection_name: str = Field("mem0", description="Name of the index")   # configs/vector_stores/opensearch.py:7

host is genuinely required — validate_auth raises "Host must be provided for OpenSearch" (:30-35) — so that row is correct and is left as-is.

user and password were missing from the Python tab, though the store consumes both. When http_auth is unset and both are supplied, they are passed to the client as an auth tuple:

http_auth=config.http_auth
if config.http_auth
else ((config.user, config.password) if (config.user and config.password) else None),   # vector_stores/opensearch.py:68-70

Because http_auth silently wins when present, that precedence is now stated on all three rows. The TypeScript tab already documents user and password, so this brings the Python tab in line.

Type of Change

  • Documentation update

AI Assistance

  • AI-generated (an agent wrote most or all of this diff)
  • I can explain every line of this diff and how it interacts with the rest of the codebase, without asking an AI tool.

Written with Claude Code. Each claim was read off the code rather than inferred: the collection_name default, the validate_auth host check that makes host genuinely required, and the auth-tuple fallback in the client constructor.

Worth flagging separately, since it is a code issue rather than a docs one and is deliberately not part of this PR: api_key, connection_class, and pool_maxsize are declared on OpenSearchConfig but never read by OpenSearchDB — the client hardcodes connection_class=RequestsHttpConnection and pool_maxsize=20 (vector_stores/opensearch.py:73-74), and api_key is not referenced anywhere in that file. Setting any of the three is silently inert, so I left them out of the table rather than document options that do nothing. Happy to open an issue for that if it is useful.

Breaking Changes

N/A

Test Coverage

  • No tests needed (explain why)

Docs-only, no code paths touched. python3 scripts/check-llms-txt-coverage.py reports docs/llms.txt is in sync — no page added or removed, so no llms.txt update is needed.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • New and existing tests pass locally
  • I have updated documentation if needed

… user and password

The Python config table listed `collection_name` as required. OpenSearchConfig
gives it a default of `mem0` (mem0/configs/vector_stores/opensearch.py:7) and
no validator enforces it, unlike `host`, which validate_auth does reject when
missing (:30-35) and which the table correctly marks required.

`user` and `password` were absent from the Python table although the store
consumes both: when `http_auth` is unset and both are given, they are passed
to the client as an auth tuple (mem0/vector_stores/opensearch.py:68-70). That
precedence is now stated on all three rows, since supplying `http_auth`
silently wins over them.

The TypeScript table already documents `user` and `password`; this brings the
Python table in line with it.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant