Skip to content

allow editing the stepInputMessages through prepareStep #7151

@minuk302

Description

@minuk302

Description

Would it be possible to also allow editing the stepInputMessages through prepareStep?
I am using an agent with many steps, and often it accumulates input tokens, increasing the cost greatly. (if accumulated 5K tokens and have 20 more steps, I am paying for 100K tokens for the steps.)
I hope to apply cacheControl option to one of the stepInputMessages in the middle of streamText steps to decrease the cost burden.

Thank you!

AI SDK Version

aisdk: 5.0 beta

related PR:
#5991

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy