Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
— AI code review (automated) |
|
|
Thanks — both reviews were helpful. Addressed in 1. Double logging in 2. Per-event fragmentation — fixed, with a twist: the AI SDK path had the same bug. 3. AI SDK path through
4. Tests don't observe log output — fixed. The integration tests now install a capture logger ( 5. 6. 7. Privacy note — done. Config description now warns that logs can contain full transcripts including tool results. Two small behavioral notes:
Verified: |
Issue for this PR
Closes #29186
Type of change
What does this PR do?
Adds configurable LLM request/response logging via
experimental.log_messages("info","debug","trace") and wires it into both the native and AI SDK runtimes."info"— logs messages + response text (Effect info level)"debug"— adds generation params (Effect debug level)"trace"— adds the raw provider-native request body (native runtime only) at Effect trace level; requiresOPENCODE_LOG_LEVEL=DEBUGorTRACEto be visibleResponses are coalesced: one
LLM responseentry per provider turn (emitted when the terminal event passes), not one per streamed delta — on both runtimes. Requests are logged once per call in both runtimes.Notes:
"trace"carries the same payload as"debug".TRACEas a validOPENCODE_LOG_LEVELvalue (needed for the trace tier to be reachable; the runtime's minimum level previously capped atDEBUG).Also fixes a crash on
--continuewhere a"dummy"session ID placeholder triggered a server-side validation error — the fake route was removed and the App component's existing--continueeffect handles navigation once sync loads.How did you verify your code works?
OPENCODE_LOG_LEVEL=DEBUG/TRACE— oneLLM requestand one coalescedLLM responseentry per turn at all three verbosity levels, distinguishable by log level--continueno longer shows the"ses"validation errorChecklist
If you do not follow this template your PR will be automatically rejected.