Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Conversation

lc-arjun
Copy link
Contributor

@lc-arjun lc-arjun commented Jun 13, 2025

This PR does two things:

  1. Adds ability to attach a custom LangChainTracer with replicas by defining a langchain_tracer when creating a run.
  2. Updates the meta api to include the server version + context ('js')

@lc-arjun lc-arjun changed the title feat: stream in tracing context (wip) feat: attach custom tracer w/ replicas as callback Jun 17, 2025
@lc-arjun lc-arjun marked this pull request as ready for review June 17, 2025 14:49
@lc-arjun lc-arjun requested a review from dqbd June 17, 2025 14:49

if (run.langsmith_tracer) {
config.configurable ??= {};
Object.assign(config.configurable, {
Copy link

@jacoblee93 jacoblee93 Jun 17, 2025

Choose a reason for hiding this comment

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

Why not do this in one line with a spread operator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its a fair question. tbh just copied from above lol

Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick` this is imo noisy, which is why I opted to do that instead

config.configurable = {
   ...config.configurable,
   langsmith_project: run.langsmith_tracer.project_name,
   langsmith_example_id: run.langsmith_tracer.example_id,
}

yarn.lock Outdated
languageName: node
linkType: hard

"zod@npm:^3.25.32":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we dedupe?

},
"devDependencies": {
"@langchain/core": "^0.3.42",
"@langchain/core": "^0.3.59",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this warrant a bump on core?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the replicas stuff won't work without the bump to core

@lc-arjun lc-arjun merged commit efed836 into main Jun 17, 2025
13 of 14 checks passed
@lc-arjun lc-arjun deleted the arjun/stream_in_context branch June 17, 2025 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants