Add resolved model/provider to transcripts#380
Conversation
This makes it easier to analyze differences between models. Before it would only add the model/provider if it was customized in the query.
WalkthroughThe transcript storage now receives and persists resolved model_id and provider_id alongside the request’s originals. store_transcript’s signature changed to include these IDs, and metadata keys were updated to distinguish actual usage (provider/model) from requested (query_provider/query_model). Unit tests were adjusted to reflect the new parameters and metadata. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant Q as /query endpoint
participant L as LLM Provider
participant T as store_transcript
C->>Q: POST /query (QueryRequest)
Q->>L: Invoke LLM (resolved provider/model)
L-->>Q: Response
Q->>T: store_transcript(user_id, conversation_id, model_id, provider_id, ...)
T-->>Q: Persisted
Q-->>C: JSON response
sequenceDiagram
participant C as Client
participant S as /streaming_query endpoint
participant L as LLM Provider (stream)
participant T as store_transcript
C->>S: POST /streaming_query
S->>L: Start streaming (resolved IDs)
L-->>S: Streamed tokens
S-->>C: Streamed tokens
S->>T: On finalize: store_transcript(..., model_id, provider_id, ...)
T-->>S: Persisted
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (8)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This makes it easier to analyze differences between models.
Before it would only add the model/provider if it was customized in the query.
Description
Type of change
Checklist before requesting a review
Testing
Generate some transcripts and see if the new fields are there.
Summary by CodeRabbit