Skip to content

Conversation

@benlangfeld
Copy link
Contributor

@benlangfeld benlangfeld commented Jan 12, 2026

This is used to store data about an agent invocation which should be accessible to tools but not to the LLM, like API keys, user IDs etc.

See:

@CLAassistant
Copy link

CLAassistant commented Jan 12, 2026

CLA assistant check
All committers have signed the CLA.

This is used to store data about an agent invocation which should be accessible to tools but not to the LLM, like API keys, user IDs etc.

See https://docs.langchain.com/oss/python/langchain/context-engineering#runtime-context-6
@davidzhao
Copy link
Member

this looks good, could you roll back the uv.lock change and fix the types CI please?

@benlangfeld
Copy link
Contributor Author

benlangfeld commented Jan 13, 2026

this looks good, could you roll back the uv.lock change and fix the types CI please?

I cannot roll back the uv.lock change, because this feature was introduced in langgraph 0.6.0.

I am trying to fix the type error, it's not clear to me why it's occurring right now. The dependency upgrade should have fixed it.

uv run python
Python 3.12.4 (main, Jul  1 2024, 18:16:41) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing import get_type_hints
>>> from langgraph.pregel.protocol import PregelProtocol
>>> get_type_hints(PregelProtocol.astream)['context']
typing.Optional[~ContextT]

The type error raised by mypy is wrong. I am not really a python developer, so I'd appreciate any help in figuring out why it might be happening.

Make LLMAdapter and LangGraphStream generic over ContextT and type PregelProtocol accordingly so mypy accepts passing context into astream.
@bcdonadio
Copy link
Contributor

@benlangfeld This should fix it: powerhome#3

@benlangfeld
Copy link
Contributor Author

@davidzhao This should be ready to go.

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lg!

@davidzhao davidzhao merged commit de72c6e into livekit:main Jan 15, 2026
9 checks passed
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.

4 participants