Skip to content

Conversation

@davidkna-sap
Copy link
Member

@davidkna-sap davidkna-sap commented Nov 11, 2025

Context

Closes SAP/ai-sdk-js-backlog#344.

What this PR does and why it is needed

This PR adds basic support for passing streaming: true to the constructors and saving it as an attribute. Results are collected via .concat(). In addition this PR updates the unit tests, sample code and e2e tests.

@davidkna-sap davidkna-sap force-pushed the davidkna-sap_lc-auto-stream branch from b556127 to 3b40abe Compare November 11, 2025 09:57
Comment on lines 60 to 62
// Todo: Extend BaseChatModelParams?
this.streaming =
(langchainOptions as { streaming?: boolean })?.streaming ?? false;
Copy link
Member Author

Choose a reason for hiding this comment

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

The streaming-option is supported here, but I felt like extending or replacing BaseChatModelParams might be considered a breaking change which leads to any use needing to avoid type-checks.

finalOutput =
finalOutput !== undefined ? finalOutput.concat(chunk) : chunk;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

A snapshot test directly on the final output is not possible here, because langgraph will add uuids to the response object, but other tests should already be verifying the general execution with auto-streaming enabled.

Base automatically changed from push-toqoormrvxpy to main November 25, 2025 10:27
@davidkna-sap davidkna-sap force-pushed the davidkna-sap_lc-auto-stream branch from 77b712f to b17650a Compare December 1, 2025 08:56
…stream

* origin/main: (34 commits)
  chore: Monthly Transitive Dependency Update (#1318)
  chore(deps): Bump yaml from 2.8.1 to 2.8.2 (#1313)
  chore(deps-dev): Bump tsx from 4.20.6 to 4.21.0 (#1312)
  chore(deps-dev): Bump @changesets/cli from 2.29.7 to 2.29.8 (#1307)
  v2.3.0
  feat: Support protected_material_code (#1285)
  chore: Add sample-code/e2e-test for scoped prompt-template refs (#1292)
  chore: Update sample code with new MCP SDK (#1303)
  chore(deps): Bump @modelcontextprotocol/sdk from 1.22.0 to 1.23.0 (#1301)
  chore(deps): Bump the langchain group with 5 updates (#1299)
  feat!: Update langchain to v1 (#1187)
  chore(deps): Bump actions/checkout from 5 to 6 (#1294)
  chore(deps-dev): Bump orval from 7.16.1 to 7.17.0 (#1298)
  chore(deps-dev): Bump orval from 7.16.0 to 7.16.1 (#1295)
  chore(deps-dev): Bump glob from 12.0.0 to 13.0.0 (#1289)
  chore: update pnpm transitive dependencies (#1291)
  chore(deps): Bump glob from 10.4.5 to 12.0.0 (#1288)
  chore(deps): Bump glob from 10.4.5 to 11.1.0 (#1284)
  chore(deps-dev): Bump glob from 11.0.3 to 12.0.0 (#1280)
  chore(deps-dev): Bump glob from 11.0.3 to 11.1.0 (#1283)
  ...
@davidkna-sap davidkna-sap force-pushed the davidkna-sap_lc-auto-stream branch from df681d3 to 259f0da Compare December 2, 2025 10:25
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.

3 participants