Skip to content

docs(bedrock): document userContext for Knowledge Base search - #1500

Merged
mateo-berri merged 2 commits into
mainfrom
litellm_bedrock_kb_user_context_docs
Sep 16, 2026
Merged

mateo-berri merged 2 commits into
mainfrom
litellm_bedrock_kb_user_context_docs

Conversation

@mateo-berri

@mateo-berri mateo-berri commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Documents the userContext field for Bedrock Knowledge Base searches, which BerriAI/litellm#41475 forwards on the Retrieve request so stores with document-level ACLs return only what the named user may see

Adds a "Restrict Results to a User" section to the Bedrock Knowledge Bases page covering the LiteLLM SDK, the OpenAI SDK against the proxy, curl against the proxy, and a user_context set on the store in vector_store_registry, with the precedence rule between the two

Pairs with LIT-4415


Note

Low Risk
Documentation-only change with no runtime or security behavior changes in this diff.

Overview
Adds a Restrict Results to a User section to the Bedrock Knowledge Bases docs, explaining how to pass Bedrock userContext so ACL-enabled Knowledge Bases return only chunks visible to the named user.

The section documents four call paths—LiteLLM SDK vector_stores.search via extra_body, proxy search with the OpenAI SDK and curl, and default identity via user_context in vector_store_registry—and notes that per-request userContext overrides config, that userId must be a string, and that LiteLLM does not bind userId to the proxy API key (trusted callers only).

Reviewed by Cursor Bugbot for commit 6e1d523. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Sep 16, 2026 8:07pm UTC

Request Review

@mateo-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6e1d523. Configure here.

@mateo-berri
mateo-berri merged commit a317d3b into main Sep 16, 2026
5 checks passed
@mateo-berri
mateo-berri deleted the litellm_bedrock_kb_user_context_docs branch September 16, 2026 20:41

This branch was successfully deployed

1 active deployment
Preview — 6e1d523b Deployed Sep 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant