Skip to content

feat: improve middleware docs with prominent dynamic prompt example [closes DOC-828]#3329

Merged
Naomi Pentrel (npentrel) merged 5 commits intomainfrom
open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f
Apr 2, 2026
Merged

feat: improve middleware docs with prominent dynamic prompt example [closes DOC-828]#3329
Naomi Pentrel (npentrel) merged 5 commits intomainfrom
open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f

Conversation

@npentrel
Copy link
Copy Markdown
Contributor

@npentrel Naomi Pentrel (npentrel) commented Mar 26, 2026

…t and most prominent example, retitle sections for better discoverability, and split cache control into its own section.

Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
@github-actions github-actions Bot added javascript langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects internal labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Mintlify preview ID generated: preview-opensw-1774558004-07159d0

@npentrel Naomi Pentrel (npentrel) force-pushed the open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f branch from 7237097 to 931b255 Compare April 1, 2026 14:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Mintlify preview ID generated: preview-opensw-1775052939-c1eb46e

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Mintlify preview ID generated: preview-opensw-1775053211-f0346f9

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Mintlify preview ID generated: preview-opensw-1775053545-e93eac7

@npentrel Naomi Pentrel (npentrel) force-pushed the open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f branch from bc8d4ca to f6b0d82 Compare April 1, 2026 14:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Mintlify preview ID generated: preview-opensw-1775053779-a1257f9

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Mintlify preview ID generated: preview-opensw-1775131550-57a37f1

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Mintlify preview ID generated: preview-opensw-1775132651-fdb79f6

@npentrel Naomi Pentrel (npentrel) force-pushed the open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f branch from e02387f to aaa7851 Compare April 2, 2026 12:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Mintlify preview ID generated: preview-opensw-1775133028-ad90208

request: ModelRequest,
handler: Callable[[ModelRequest], ModelResponse],
) -> ModelResponse:
new_content = list(request.system_message.content_blocks) + [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ccurme (@ccurme) could you take a look at this to see if this is the recommended way to handle things w/ respect to content blocks? do we set it on content or on content_blocks etc.... Will this be cross-provider agnostic?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It will be provider-agnostic. Setting content_blocks on init just populates .content, but allows for static checking.

@npentrel Naomi Pentrel (npentrel) merged commit a7494c7 into main Apr 2, 2026
21 checks passed
@npentrel Naomi Pentrel (npentrel) deleted the open-swe/7b5fbe25-7e71-28fa-bc08-d776e20c485f branch April 2, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal javascript langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants