Expose token usage from openAIResponsesAdapter
Author: rabisgCreated Aug 26, 2026Updated Sep 10, 2026
Is your feature request related to a problem? Please describe. openAIResponsesAdapter() currently ignores response.completed, including response.usage.
Describe the solution you'd like Could the adapter expose an optional callback?
openAIResponsesAdapter({ onUsage: (usage) => { // input_tokens, output_tokens, total_tokens }, }); This would let applications display token usage or estimated remaining context without implementing a custom stream adapter.
Describe alternatives you've considered
Local adapter that wraps/forks openAIResponseAdapter
Additional context This would help implement a context available/used counter in the composer
Source: thesysdev/openui