Skip to content

feat(ui): clarify model display in log cards - #1225

Merged
steebchen merged 3 commits into
mainfrom
claude/show-used-model-logs-01GxaTDeinyuWizG2CNSCyhH
Nov 22, 2025
Merged

steebchen merged 3 commits into
mainfrom
claude/show-used-model-logs-01GxaTDeinyuWizG2CNSCyhH

Conversation

@steebchen

@steebchen steebchen commented Nov 22, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Enhanced internal logging infrastructure to track model mapping information throughout the batch processing pipeline, improving observability and diagnostics.

✏️ Tip: You can customize this high-level summary in your review settings.

- Show requested model with arrow to used model when different
- Add "(LLMGateway)" label to clarify the model format
- Rename "Used Model Provider Mapping" to "Provider Model ID"
- Only show provider model ID when different from used model
Shows both the LLMGateway model ID and provider model ID in logs
@steebchen
steebchen enabled auto-merge November 22, 2025 11:43
@coderabbitai

coderabbitai Bot commented Nov 22, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a nullable used_model_mapping field to the log processing schema in the worker and propagates it through the batch log processing pipeline, ensuring the field is parsed from logs and included in database updates and monitoring output.

Changes

Cohort / File(s) Summary
Log processing schema extension
apps/worker/src/worker.ts
Introduces used_model_mapping (nullable string) field to log schema, propagates it through batchProcessLogs when reading from logs and returning/updating rows to database, and includes it in runtime data flow and monitoring output

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the field is correctly parsed from all log sources
  • Confirm database schema and type definitions match the nullable string specification
  • Ensure consistent propagation pattern matches existing similar fields (e.g., used_model, used_provider)

Possibly related PRs

  • #805: Extends batchProcessLogs with multiple model-related fields (used_model, used_provider, requested_model) in the same worker file
  • #769: Adds usedModelMapping to gateway logging and database schema, representing the other side of the field propagation pipeline
  • #779: Surfaces usedModelMapping field in the UI LogCard component for display to end users

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title focuses on UI/display changes ('clarify model display in log cards'), but the actual changes are backend modifications to the worker.ts file, adding used_model_mapping field to log processing schema without UI component changes. Update the title to reflect the backend changes, such as 'feat(worker): add used_model_mapping to log processing' or similar, to accurately describe the actual implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/show-used-model-logs-01GxaTDeinyuWizG2CNSCyhH

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75bbc9a and c392e8c.

📒 Files selected for processing (1)
  • apps/worker/src/worker.ts (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/worker/src/worker.ts (1)
packages/db/src/schema.ts (1)
  • log (350-452)
⏰ 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). (5)
  • GitHub Check: build / run
  • GitHub Check: test / run
  • GitHub Check: generate / run
  • GitHub Check: lint / run
  • GitHub Check: autofix
🔇 Additional comments (3)
apps/worker/src/worker.ts (3)

69-69: LGTM! Schema definition is correct.

The used_model_mapping field is properly defined as a nullable string, matching the database schema's usedModelMapping text field.


526-526: LGTM! Field extraction is correct.

The field is properly extracted from the database with correct mapping from log.usedModelMapping to used_model_mapping.


574-574: LGTM — Verification confirms field is available.

The LogInsertData type correctly includes usedModelMapping. The log table schema defines it as a text column (packages/db/src/schema.ts:369), and since LogInsertData is derived from the log table with only id, createdAt, and updatedAt omitted, the field is automatically available for insertion.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steebchen
steebchen added this pull request to the merge queue Nov 22, 2025
Merged via the queue into main with commit ec3ef6f Nov 22, 2025
8 checks passed
@steebchen
steebchen deleted the claude/show-used-model-logs-01GxaTDeinyuWizG2CNSCyhH branch November 22, 2025 11:54
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.

2 participants