Skip to content

Conversation

@ArshdeepSingh18
Copy link

Overview

Updates the TypeScript custom middleware documentation to correctly include the canJumpTo configuration when using jumpTo inside beforeModel. Without declaring canJumpTo, the documented examples would throw an error at runtime when a jump was attempted. This change aligns the examples with the current middleware API and prevents both runtime and TypeScript typing errors when conditionally terminating execution.

Type of change

Type: Fix typo/bug/link/formatting

Related issues/PRs

GitHub issue: N/A
Feature PR: N/A

  • Linear issue:
  • Slack thread:

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

(Internal team members only / optional): Create a preview deployment as necessary using the Create Preview Branch workflow

Additional notes

This change updates the same fix in multiple locations to ensure consistency across the documentation and reduce confusion for users implementing custom middleware in TypeScript.

@github-actions github-actions bot added external User is not a member of langchain-ai langchain For docs changes to LangChain oss labels Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant