Skip to content

fix: support cache-write usage across OpenAI Python versions#3773

Merged
seratch merged 1 commit into
mainfrom
fix/openai-2-45-usage-compatibility
Jul 9, 2026
Merged

fix: support cache-write usage across OpenAI Python versions#3773
seratch merged 1 commit into
mainfrom
fix/openai-2-45-usage-compatibility

Conversation

@seratch

@seratch seratch commented Jul 9, 2026

Copy link
Copy Markdown
Member

This pull request resolves #3772 by supporting the cache_write_tokens usage field across OpenAI Python 2.44 and 2.45.

It constructs input-token details through a version-compatible validation path and preserves cache-write counts across provider conversion, aggregation, tracing, and RunState serialization. RunState schema 1.12 prevents older readers from silently losing the new usage data while retaining backward compatibility with existing snapshots. The supported OpenAI dependency range remains unchanged.

@seratch seratch added this to the 0.18.x milestone Jul 9, 2026
@seratch seratch merged commit 8724b1b into main Jul 9, 2026
9 checks passed
@seratch seratch deleted the fix/openai-2-45-usage-compatibility branch July 9, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runner.run() crashes with openai 2.45.0: InputTokensDetails now requires cache_write_tokens

1 participant