fix: added responses input history column and fixed chunk conversion - #725
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded capture, storage, and UI rendering for responses input history; updated logging extraction to return responses messages; added DB migration and table fields; adjusted response-stream conversion ordering and chat-response nullification. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as BifrostRequest
participant Logger as LoggerPlugin
participant DB as LogStore
participant Processor as ResponseProcessor
participant UI as Log UI
Client->>Logger: PreHook (request)
Logger->>Logger: extractInputHistory()\nreturns (ChatMessages, ResponsesMessages)
Logger->>DB: insertInitialLogEntry(with ResponsesInputHistoryParsed)
Client->>Processor: Response chunks (streaming)
Processor->>Processor: convert ChatResponse -> ResponsesStreamResponse\nnullify ChatResponse
Processor->>Client: stream converted ResponsesStreamResponse
DB-->>UI: fetch LogEntry
UI->>UI: render responses_input_history\nusing LogResponsesMessageView
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge activity
|
c655174 to
dc40e39
Compare
…725) ## Summary Add support for storing and displaying Responses API input history in logs, enabling better tracking and debugging of Responses API requests. ## Changes - Added a new `responses_input_history` column to the logs database table - Created a database migration to add the new column - Modified the logging plugin to extract and store Responses API input messages - Updated the UI to display Responses input history in log details - Renamed `LogResponsesOutputView` to `LogResponsesMessageView` for reuse with both input and output - Fixed an issue in the post-hook runner by clearing `ChatResponse` after converting to `ResponsesStreamResponse` ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [x] Transports (HTTP) - [ ] Providers/Integrations - [x] Plugins - [x] UI (Next.js) - [ ] Docs ## How to test 1. Make Responses API requests 2. Check logs to verify input history is properly stored and displayed 3. Verify that both input and output messages are properly displayed in the UI ```sh # Core/Transports go version go test ./... # UI cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Breaking changes - [x] Yes - [ ] No The database schema has been updated with a new column. Users should run the application to trigger the migration. ## Security considerations No new security implications. The implementation follows the same patterns as existing log storage. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable

Summary
Add support for storing and displaying Responses API input history in logs, enabling better tracking and debugging of Responses API requests.
Changes
responses_input_historycolumn to the logs database tableLogResponsesOutputViewtoLogResponsesMessageViewfor reuse with both input and outputChatResponseafter converting toResponsesStreamResponseType of change
Affected areas
How to test
Breaking changes
The database schema has been updated with a new column. Users should run the application to trigger the migration.
Security considerations
No new security implications. The implementation follows the same patterns as existing log storage.
Checklist
docs/contributing/README.mdand followed the guidelines