This pull request fixes scripted annotation streaming before the next Python SDK release introduces accurately typed annotation-added events (openai/openai-python#3617).
The current helper passes output-text annotation models directly into streaming events. That works while the released SDK accepts an untyped annotation, but the upcoming SDK validates events against distinct event-specific annotation classes. As a result, the existing helper both fails static type checking and raises a validation error at runtime.
- Preserve annotation contents, event ordering, and sequence numbers across both the released and upcoming Python SDKs.
- Construct events from their serialized payload so each installed SDK applies its own event schema without relying on imports that do not exist in the current release.
- Compare annotation payloads by their public serialized representation instead of requiring unrelated generated model classes to share an identity.