Skip to content

Usage tokens no longer automatically show #548

Open
@handrew

Description

@handrew

I updated from 0.0.9 to 0.0.11 and my tokens logging broke. I fixed it by explicitly setting model_settings=ModelSettings(include_usage=True) in my agent definition.

Docs say that include_usage defaults to true. However, I don't think this is true unless the model is OpenAI.

Cursory glance suggests this is the line that causes the issue:

default_include_usage = True if cls.is_openai(client) else None

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions