Skip to content

Remove structured_output streaming #890

@zastrowm

Description

@zastrowm

Structured output currently invokes the callback_handler for events but the events emitted from Agent.structured_output are very provider & implementation-specific which leads to incosistencies:

  • Right now bedrock emits a bunch of events because we implemented via tools; if we changed that, the events emitted would change.
  • The other providers (like OpenAI) do not emit any events as they provide apis to perform structured_output

In #857, we re-implemented callback invocation to fix a backwards-incompatabile change that we made during the transition to internally-typed-events, but ultimately I don't think we should be invoking the callback for events in structured_output. This take represents a task to stop emitting events in the next major release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions