Skip to content

fix(ingest): rank gen_ai.conversation.id before session.id for OpenInference-style vendors - #1177

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/ingest-conversation-id-before-session-id
Sep 30, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/ingest-conversation-id-before-session-id

fix(ingest): rank gen_ai.conversation.id before session.id for OpenIn…

5ffc5df
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 5m 14s

Confidence 4/5 · No issues found

🟢 Confidence 4/5 · likely safe to merge
A data-list reorder confined to apps/ingest/src/ai_session.rs, with the new test exercising both-keys and session-only inputs for every affected vendor.
quality 100/100 · no findings · tests covered · risk medium

Ranks gen_ai.conversation.id ahead of bare session.id in the session-key list of the OpenInference-style vendors, keeping claude_agent_sdk and openrouter on session.id and LangSmith's thread first for langchain. The reorder is confined to the key tables and their test; safe to merge.

  • CONVERSATION_THEN_SESSION_ID puts gen_ai.conversation.id before session.id
  • dspy, agno, crewai, smolagents, strands, openinference-openai, llamaindex, haystack-OI and openai_agents_sdk use it
  • langchain keeps langsmith.metadata.thread_id first, then the conversation id, then session.id
What was checked
  • run_predicates fallback (ai_session.rs:1110) skips a list that already ranks the conversation id, so no key is looked up twice
  • No session_keys list now repeats a key, and langchain's list carries the conversation id once (ai_session.rs:954)
  • claude_agent_sdk and openrouter still list session.id alone (ai_session.rs:906, ai_session.rs:968), so they keep their own key when both are set

5ffc5df · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.