Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end latency/token/cost metrics to the node inspector in the web UI by emitting metrics from the Python tracer stream and introducing a dedicated Metrics UI component, while also simplifying how inspector data is passed/rendered.
Changes:
- Add
Formatter.metrics()and includemetricsin streamednode_outputmessages. - Add
NodeMetricstyping + a newMetricscomponent and render it inInspectPanel. - Add a helper script to (re)generate bundled model metadata (
models.json) and remove thelangsmithdependency.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/models.py | New script to generate/update langgraphics/metadata/models.json from models.dev. |
| pyproject.toml | Removes langsmith from runtime deps. |
| langgraphics/streamer.py | Adds metrics to node_output payloads. |
| langgraphics/formatter.py | Replaces LangSmith utils usage; adds metrics extraction + latency/cost formatting. |
| langgraphics-web/src/types.ts | Adds NodeMetrics and metrics field on node output messages. |
| langgraphics-web/src/main.tsx | Passes nodeEntries into GraphCanvas (inspector now owned there). |
| langgraphics-web/src/index.css | Adds styles for the metrics chips/popovers. |
| langgraphics-web/src/components/Metrics.tsx | New UI component to display latency/tokens/cost. |
| langgraphics-web/src/components/InspectPanel.tsx | Renders Metrics when available; adds colorMode prop. |
| langgraphics-web/src/components/GraphCanvas.tsx | Owns InspectPanel and wires nodeEntries through. |
| README.md | Updates demo image sizing and refreshes the feature comparison table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ArtyomVancyan I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@ArtyomVancyan I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you. |
This pull request introduces a new metrics display feature to the node inspector panel in the web UI and refactors how inspection data is passed and rendered. The main changes include adding a dedicated
Metricscomponent for latency, token, and cost metrics, updating the inspector panel to use this component, and cleaning up related props and styles for a more streamlined and visually consistent experience.