Skip to content

feat: add optional session request logging and JSON export#29

Merged
taruma merged 1 commit intov2.0from
14-save-session-history
Mar 20, 2026
Merged

feat: add optional session request logging and JSON export#29
taruma merged 1 commit intov2.0from
14-save-session-history

Conversation

@taruma
Copy link
Copy Markdown
Owner

@taruma taruma commented Mar 20, 2026

  • add request_logging_enabled and request_logs to session state defaults
  • refactor streaming calls to build reusable request kwargs for both Responses API and Chat Completions
  • add attempt-level logging hooks to capture transport, request payload, and response outcome (answer/reasoning/usage/error), including fallbacks
  • document the new optional session logging feature in README, including JSON download behavior and media base64 omission

This improves debugging and transparency across provider/schema mismatches while keeping exported logs smaller and safer to share.

- add `request_logging_enabled` and `request_logs` to session state defaults
- refactor streaming calls to build reusable request kwargs for both
  Responses API and Chat Completions
- add attempt-level logging hooks to capture transport, request payload,
  and response outcome (answer/reasoning/usage/error), including fallbacks
- document the new optional session logging feature in README, including
  JSON download behavior and media base64 omission

This improves debugging and transparency across provider/schema mismatches
while keeping exported logs smaller and safer to share.
@taruma taruma merged commit 45ec001 into v2.0 Mar 20, 2026
1 check passed
@taruma taruma deleted the 14-save-session-history branch March 20, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant