Skip to content

Accept LiteLLM events without message_id - #52

Merged
pei-tinybird merged 1 commit into
mainfrom
fix/llm-events-message-id-default
Oct 26, 2026
Merged

pei-tinybird merged 1 commit into
mainfrom
fix/llm-events-message-id-default

Conversation

@pei-tinybird

@pei-tinybird pei-tinybird commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Events from the LiteLLM handler in tinybird-python-sdk (TinybirdLitellmAsyncHandler) went to quarantine in llm_events:

Strict type checking failed. Object does not have column 'message_id'

The handler never sends message_id. This adds DEFAULT '' to the column, so the template works with the LiteLLM guide as well as the Vercel AI SDK one.

Tested in Tinybird Local

  • tb build passes.
  • Sent generate and stream calls through LiteLLM (mock_response) with datasource_name="llm_events": both rows land, no quarantine.
  • llm_usage returns them (2 requests, 42 tokens).

Not changed here

  • The dashboard pins ai@^4 and @ai-sdk/openai@^1. Current ai is 7, so upgrading is a separate migration.
  • The fixtures fail to load in Tinybird Local with CAST AS Map can only be performed from tuples of array on messages. The same shape ingests fine through the Events API, so this looks like a Tinybird Local file import issue rather than a template bug.

🤖 Generated with Claude Code

The LiteLLM handler in tinybird-python-sdk doesn't send message_id, so
every event went to quarantine.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai-analytics-template Ready Ready Preview Oct 26, 2026 2:48pm UTC

@pei-tinybird pei-tinybird self-assigned this Oct 26, 2026
@pei-tinybird
pei-tinybird merged commit 738d607 into main Oct 26, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 043576c3 Deployed Oct 26, 2026 by vercel[bot]
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