fix: add namespace, model, and provider to langfuse metadata so we ca…#565
fix: add namespace, model, and provider to langfuse metadata so we ca…#565VVoruganti merged 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe changes add Langfuse span name tracking to LLM calls by introducing a helper function that conditionally updates Langfuse observations with provider, model, and optional name metadata during plan selection. The LLM API module invokes this helper after choosing an attempt plan, and a test verifies the span update behavior. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as honcho_llm_call
participant Planner as _get_attempt_plan
participant Selector as plan_attempt
participant Updater as update_current_langfuse_observation
participant Langfuse as Langfuse Client
participant Settings as Settings Config
Client->>Planner: invoke for attempt plan
Planner->>Selector: call plan_attempt(...)
Selector-->>Planner: return plan{provider, model}
Planner->>Updater: call with plan.provider, plan.model, name
Updater->>Settings: check LANGFUSE_PUBLIC_KEY
Settings-->>Updater: return key status
alt Key set
Updater->>Langfuse: call update_current_span(name, metadata)
Langfuse-->>Updater: ✓ span updated
else Key not set
Updater-->>Updater: return early
end
Updater-->>Planner: return
Planner-->>Client: return plan
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
5a58a41 to
60e725c
Compare
…n filter
Summary by CodeRabbit
Tests
New Features