[PR #2936] [MERGED] feat: add streaming thinking/reasoning tokens example #3019

Closed
opened 2026-06-05 18:20:50 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/2936
Author: @npentrel
Created: 3/5/2026
Status: Merged
Merged: 3/6/2026
Merged by: @npentrel

Base: mainHead: open-swe/5ae6bcfb-54e6-5987-54d0-cc9f8b3b080c


📝 Commits (9)

📊 Changes

18 files changed (+315 additions, -20 deletions)

View changed files

📝 .deepagents/skills/docs-code-samples/SKILL.md (+2 -0)
📝 .github/workflows/test-code-samples.yml (+2 -0)
📝 scripts/generate_code_snippet_mdx.py (+17 -7)
📝 src/code-samples/langchain/return-a-string.py (+1 -1)
📝 src/code-samples/langchain/return-a-string.ts (+1 -1)
src/code-samples/langchain/streaming-reasoning-tokens.py (+41 -0)
src/code-samples/langchain/streaming-reasoning-tokens.ts (+47 -0)
📝 src/code-samples/langchain/tool-return-command.py (+1 -1)
📝 src/code-samples/langchain/tool-return-command.ts (+1 -1)
📝 src/code-samples/langchain/tool-return-object.py (+1 -1)
📝 src/code-samples/langchain/tool-return-object.ts (+2 -2)
📝 src/code-samples/package-lock.json (+69 -3)
📝 src/code-samples/package.json (+1 -0)
📝 src/oss/langchain/streaming/overview.mdx (+52 -1)
src/snippets/code-samples/streaming-reasoning-tokens-js.mdx (+39 -0)
src/snippets/code-samples/streaming-reasoning-tokens-py.mdx (+36 -0)
📝 src/snippets/code-samples/tool-return-command-py.mdx (+1 -1)
📝 src/snippets/code-samples/tool-return-object-js.mdx (+1 -1)

📄 Description

  • Added a new "Streaming thinking / reasoning tokens" subsection to the Common patterns section of the streaming overview page
  • Added python and javascript code samples

https://langchain-5e9cc07a-preview-opensw-1772748614-696205f.mintlify.app/oss/javascript/langchain/streaming/overview#streaming-thinking-%2F-reasoning-tokens


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/2936 **Author:** [@npentrel](https://github.com/npentrel) **Created:** 3/5/2026 **Status:** ✅ Merged **Merged:** 3/6/2026 **Merged by:** [@npentrel](https://github.com/npentrel) **Base:** `main` ← **Head:** `open-swe/5ae6bcfb-54e6-5987-54d0-cc9f8b3b080c` --- ### 📝 Commits (9) - [`cd21084`](https://github.com/langchain-ai/docs/commit/cd21084b9a6c90344ac743cb9699ec10be36de54) Add streaming thinking/reasoning tokens example to streaming overview docs - [`9fd5e1e`](https://github.com/langchain-ai/docs/commit/9fd5e1ee7dc128d5f874953e532f0faa776e8761) update - [`6c4dfbb`](https://github.com/langchain-ai/docs/commit/6c4dfbb5990ffadeae06ffe9764ea6e653fd7a40) tested - [`a42106e`](https://github.com/langchain-ai/docs/commit/a42106eba72ff9cfdf9fd3254d03dbca3fdd0b49) update - [`8d53b7c`](https://github.com/langchain-ai/docs/commit/8d53b7ca7a8c5ee76f9b70aab42d968be84298b0) cr - [`b42348e`](https://github.com/langchain-ai/docs/commit/b42348e0221239d8af58978f4bec8b6463fd0234) cr - [`cf2498f`](https://github.com/langchain-ai/docs/commit/cf2498f3d8d286c695bdf8ff94865d7bd9ac4e9d) . - [`e156635`](https://github.com/langchain-ai/docs/commit/e156635cfad111de198d9faa426b28d6289555d7) . - [`a83d5d2`](https://github.com/langchain-ai/docs/commit/a83d5d25e7cc37240f0e88c5fd354cbfacff9c4f) add callout ### 📊 Changes **18 files changed** (+315 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `.deepagents/skills/docs-code-samples/SKILL.md` (+2 -0) 📝 `.github/workflows/test-code-samples.yml` (+2 -0) 📝 `scripts/generate_code_snippet_mdx.py` (+17 -7) 📝 `src/code-samples/langchain/return-a-string.py` (+1 -1) 📝 `src/code-samples/langchain/return-a-string.ts` (+1 -1) ➕ `src/code-samples/langchain/streaming-reasoning-tokens.py` (+41 -0) ➕ `src/code-samples/langchain/streaming-reasoning-tokens.ts` (+47 -0) 📝 `src/code-samples/langchain/tool-return-command.py` (+1 -1) 📝 `src/code-samples/langchain/tool-return-command.ts` (+1 -1) 📝 `src/code-samples/langchain/tool-return-object.py` (+1 -1) 📝 `src/code-samples/langchain/tool-return-object.ts` (+2 -2) 📝 `src/code-samples/package-lock.json` (+69 -3) 📝 `src/code-samples/package.json` (+1 -0) 📝 `src/oss/langchain/streaming/overview.mdx` (+52 -1) ➕ `src/snippets/code-samples/streaming-reasoning-tokens-js.mdx` (+39 -0) ➕ `src/snippets/code-samples/streaming-reasoning-tokens-py.mdx` (+36 -0) 📝 `src/snippets/code-samples/tool-return-command-py.mdx` (+1 -1) 📝 `src/snippets/code-samples/tool-return-object-js.mdx` (+1 -1) </details> ### 📄 Description - Added a new "Streaming thinking / reasoning tokens" subsection to the Common patterns section of the streaming overview page - Added python and javascript code samples https://langchain-5e9cc07a-preview-opensw-1772748614-696205f.mintlify.app/oss/javascript/langchain/streaming/overview#streaming-thinking-%2F-reasoning-tokens --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:20:50 -04:00
yindo closed this issue 2026-06-05 18:20:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3019