Skip to content

Conversation

@chitalian
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Apr 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
helicone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 1:23am
helicone-bifrost ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 1:23am
helicone-eu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 1:23am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR elevates sessions to first-class objects in Helicone by adding dedicated session fields to the request_response_rmt table structure.

  • Added new columns session_name, session_id, and session_path to the Clickhouse schema, extracted from properties that previously used 'Helicone-Session-*' keys
  • Added support for audio token tracking with new columns prompt_audio_tokens and completion_audio_tokens in the request_response_rmt table
  • Implemented a three-step migration process (schema_45-47) that creates a new table structure, copies existing data with session fields extracted, and renames tables
  • Added is_deleted column with default false value to support soft deletion functionality
  • Updated the RequestResponseRMT interface in /valhalla/jawn/src/lib/db/ClickhouseWrapper.ts to include the new session and audio token fields

Greptile AI

6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

ADD COLUMN IF NOT EXISTS prompt_audio_tokens Int64 DEFAULT 0
AFTER prompt_cache_read_tokens,
ADD COLUMN IF NOT EXISTS completion_audio_tokens Int64 DEFAULT 0
AFTER completion_tokens; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Missing newline at end of file

Suggested change
AFTER completion_tokens;
AFTER completion_tokens;

Comment on lines +232 to +234
session_id: string;
session_name: string;
session_path: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The session fields are added to RequestResponseRMT but not to InsertRequestResponseVersioned interface. This inconsistency could cause type errors when inserting data.

@promptless
Copy link
Contributor

promptless bot commented Apr 14, 2025

📝 Documentation updates detected! You can review documentation updates here

@fumedev
Copy link

fumedev bot commented Apr 14, 2025

Summary

  • Introduces session-related fields (session_id, session_name, session_path) to the RequestResponseRMT interface.
  • Updates the database schema by adding new columns for audio token counts in the request_response_rmt table.
  • Migrates existing data from the old request_response_rmt table to the new request_response_rmt_v2 table, including session information.
  • Renames the old table to request_response_rmt_old_v1 and the new table back to request_response_rmt.
  • Ensures soft deletion flag (is_deleted) is set to false for migrated entries.
⏳ 1 in progress

@chitalian chitalian closed this May 22, 2025
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