llama-stack-mirror/llama_stack/providers/inline/agents/meta_reference/responses
Ashwin Bharambe 674140fe89 feat(responses): implement usage tracking in streaming responses
Implementation changes:
- Add usage accumulation to StreamingResponseOrchestrator
- Enable stream_options to receive usage in streaming chunks
- Track usage across multi-turn responses with tool execution
- Convert between chat completion and response usage formats
- Extract usage accumulation into helper method for clarity

Test changes:
- Add usage assertions to streaming and non-streaming tests
- Update test recordings with actual usage data from OpenAI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 21:12:50 -07:00
..
__init__.py chore(responses): Refactor Responses Impl to be civilized (#3138) 2025-08-15 00:05:35 +00:00
openai_responses.py feat(tests): make inference_recorder into api_recorder (include tool_invoke) (#3403) 2025-10-09 14:27:51 -07:00
streaming.py feat(responses): implement usage tracking in streaming responses 2025-10-09 21:12:50 -07:00
tool_executor.py fix: add traces for tool calls and mcp tool listing (#3722) 2025-10-09 09:59:09 -07:00
types.py feat: Enabling Annotations in Responses (#3698) 2025-10-07 14:00:56 -04:00
utils.py feat(tests): make inference_recorder into api_recorder (include tool_invoke) (#3403) 2025-10-09 14:27:51 -07:00