Skip to content

Token budget is silently disabled when provider usage is absent #6

Description

@larry-zy

Where: framework/eino_toolloop.go:67-72 (usageTotalTokens)
usageTotalTokens returns 0 when ResponseMeta / Usage is nil.
Any provider that does not populate usage → res.tokensUsed stays 0 → the tokenBudget termination condition is silently disabled, leaving only maxIter / wallClock.
Confirmed working only for the in-repo OpenAI client (stream_options.include_usage=true); ark / other wired providers must be verified individually.
Prefer a capability probe at assembly time, or an explicit warning on nil usage, over a silent downgrade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions