# Type annotation on stream\_event v3?

**URL:** <https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196>\
**Category:** LangGraph\
**Tags:** python-help, feature-request\
**Created:** [July 20, 2026, 1:44pm UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196 "2026-07-20T13:44:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhnam](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/dhnam/32/3315_2.png) [@dhnam](https://forum.langchain.com/u/dhnam)\
**Post date:** [July 20, 2026, 1:44pm UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/1 "2026-07-20T13:44:53Z")

</div>

Recently, Langgraph has v3 on `stream_event` and `astream_event`.

I tried using it, but I found it doesn’t have any type annotation - and things get worse when I try to annotate it with `(Async)GraphRunStream`, as it dynamically adds attributes like `stream.messages`so that type checker never shows hint and even flags it as error.

So, my question is - is there any plan to add type annotation on those? v3 is still in beta phase, so I hope type annotation might got added one day…

---

<div class="post-metadata">

**Author:** ![nick.hollon](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nick.hollon](https://forum.langchain.com/u/nick.hollon)\
**Post date:** [July 20, 2026, 2:37pm UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/3 "2026-07-20T14:37:27Z")

</div>

This is an oversight! Sorry about this - am working on a fix right now.

---

<div class="post-metadata">

**Author:** ![dhnam](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/dhnam/32/3315_2.png) [@dhnam](https://forum.langchain.com/u/dhnam)\
**Post date:** [July 31, 2026, 5:16am UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/4 "2026-07-31T05:16:42Z")

</div>

So, I saw it had been updated to 1.2.10, and I updated - and still has an issue,

I copy-pasted this from document:

```python
stream = graph.stream_events({
    "messages": [{"role": "user", "content": "What is 42 * 17?"}],
}, version="v3")

for message in stream.messages:
    for token in message.text:
        print(token, end="", flush=True)

final_state = stream.output

```

And it yields typeerror at `stream.messages`.

I read the PR, and it says

> Opt-in native projections (`updates`, `custom`, `checkpoints`, `debug`, `tasks`) are only present when their transformer is registered, so they remain reached via `extensions[...]` rather than annotated as always-present.

So how do I annotate those correctly? (I really want to get help from autocompletion and not disturbed by type checker)

---

<div class="post-metadata">

**Author:** ![nick.hollon](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nick.hollon](https://forum.langchain.com/u/nick.hollon)\
**Post date:** [July 31, 2026, 11:45am UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/5 "2026-07-31T11:45:14Z")

</div>

Could you please paste in the full TypeError traceback along with:

```auto
import langgraph, langchain_core
print(langgraph. **file** )
print(langgraph. **version** if hasattr(langgraph, " **version**") else "no **version**")
print(langchain_core. **version** )
print(type(graph))

```

Thank you! Sorry you are still running into the issue!

---

<div class="post-metadata">

**Author:** ![dhnam](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/dhnam/32/3315_2.png) [@dhnam](https://forum.langchain.com/u/dhnam)\
**Post date:** [July 31, 2026, 11:56am UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/6 "2026-07-31T11:56:33Z")

</div>

Oh, sorry, I meant red underline of static type checke, not real type error.

---

<div class="post-metadata">

**Author:** ![nick.hollon](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nick.hollon](https://forum.langchain.com/u/nick.hollon)\
**Post date:** [July 31, 2026, 12:45pm UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/7 "2026-07-31T12:45:32Z")

</div>

Ah ok. I retested and am not seeing this issue with 1.2.10. Could you please check that the interpreter in whatever code editor you are using is configured properly?

---

<div class="post-metadata">

**Author:** ![dhnam](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/dhnam/32/3315_2.png) [@dhnam](https://forum.langchain.com/u/dhnam)\
**Post date:** [July 31, 2026, 1:01pm UTC](https://forum.langchain.com/t/type-annotation-on-stream-event-v3/4196/8 "2026-07-31T13:01:37Z")

</div>

Oops, nevermind. I believe my typechecker couldn’t find update well at that moment - it works really well now. Sorry for interrupt.

The only issue(?) is that `token` of the code (`message.text` iterated) is `Any`.
