opencode
opencode copied to clipboard
feat(session): add LLM API call duration logging
What does this PR do?
Fixes #9037
Adds duration logging for LLM API calls to help users monitor and analyze API latency.
How did you verify your code works?
Changes
- Modified
packages/opencode/src/session/llm.ts. - Capture
startTimebefore callingstreamText(). - Wrap
fullStreamasync iterable to log duration on stream completion. - Log format:
service=llm ... stream completed ... duration=xxx