Skip to content

Conversation

aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Aug 18, 2025

  • Wire through client details on stream data

Important

Enhance client details handling in HTTP requests, add new metrics and cost structures, and update protobuf message handling.

  • Behavior:
    • Add client_details to HTTPRequest in events.rs and IntermediateData in trace_event.rs.
    • Update ApiKeyEnvironment::environment() in api_key.rs to handle longer environment strings.
    • Add new metrics and cost statistics structures in ui_dashboard.rs and ui_dashboard_cost.rs.
  • Protobuf:
    • Modify cffi.pb.go to include protoimpl.MessageState in various structs for better message handling.
  • Misc:
    • Add GetFunctionCallHttpCalls endpoint in ui_function_call_http_calls.rs.
    • Add llm_only filter to ListTracesRequest in ui_traces.rs.
    • Add cost estimates to UiUsageEstimate in ui_types.rs.

This description was created by Ellipsis for df0ed86. You can customize this summary. It will automatically update as commits are pushed.

@aaronvg aaronvg temporarily deployed to boundary-tools-dev August 18, 2025 04:38 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev August 18, 2025 04:38 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev August 18, 2025 04:38 — with GitHub Actions Inactive
Copy link

vercel bot commented Aug 18, 2025

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

Project Deployment Preview Comments Updated (UTC)
promptfiddle Ready Ready Preview Comment Sep 8, 2025 3:10am

Copy link

Review Summary

Copy link

LGTM 👍

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 4a84bd2 in 1 minute and 19 seconds. Click for details.
  • Reviewed 158 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-rpc/src/ui/mod.rs:5
  • Draft comment:
    New module 'ui_dashboard_cost' added. Consider keeping module ordering consistent with similar modules for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. engine/baml-rpc/src/ui/ui_dashboard.rs:188
  • Draft comment:
    GetDashboardDataResponse now includes new metric fields. If these values might sometimes be missing, consider making them optional or ensuring backend always provides them.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. engine/baml-rpc/src/ui/ui_dashboard_cost.rs:9
  • Draft comment:
    The cost stats endpoint defines its own TimeSeriesFloatPoint and MetricSeriesFloat types. Consider reusing shared types to avoid duplication across dashboard endpoints.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While code deduplication is generally good, we don't have strong evidence that duplicate types exist elsewhere. The comment requires knowledge of other files to verify. Following our rules, we should err on the side of deletion when we need more context. Additionally, these types might have subtle differences from other similar types that justify their separate existence. The comment could be valid if there really are identical types defined elsewhere. Type duplication is a legitimate concern for maintainability. Without seeing the other files to confirm the duplication, we can't be certain this comment is correct or actionable. We need strong evidence to keep comments. Delete the comment since we lack strong evidence of type duplication and would need to look at other files to verify the claim.
4. engine/baml-rpc/src/ui/ui_types.rs:157
  • Draft comment:
    Cost estimate fields (input_cost, output_cost, total_cost) have been added to UiUsageEstimate. Ensure these are computed and populated consistently across providers.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_P9sAxFivRUEl1DE2

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@@ -151,13 +151,48 @@ pub struct StatusCountOverTime {
pub error_count: u64,
}

#[derive(Debug, Serialize, Deserialize, TS)]
Copy link
Contributor

Choose a reason for hiding this comment

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

New time series and metric types (TimeSeriesFloatPoint, TimeSeriesIntPoint, MetricSeriesFloat, MetricSeriesInt) are defined here. These are duplicated in ui_dashboard_cost. Consider extracting shared types to a common module to reduce code duplication.

Copy link

Copy link

Copy link

codecov bot commented Aug 18, 2025

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 864ef02 in 1 minute and 15 seconds. Click for details.
  • Reviewed 121 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:34
  • Draft comment:
    Ensure the recursive call to self.to_rpc_event(lookup) here correctly resolves to the impl returning Option (for baml_function_content) without ambiguity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:60
  • Draft comment:
    Verify that using lookup.function_lookup(&self.name) with a fallback to 'unknown_hash' is the desired behavior when function_type is BamlLlm.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:124
  • Draft comment:
    In the LoggedLLMRequest conversion, params are mapped using Cow::Borrowed. Ensure that the lifetimes of these borrowed values remain valid for the RPC event.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:156
  • Draft comment:
    The conversion for LLMChatMessagePart handles Text, Media, and WithMeta variants; double-check that boxing and cloning are optimal and that no unnecessary allocations occur.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:195
  • Draft comment:
    Using Cow::Borrowed in the HTTPBody conversion is efficient; ensure that self.raw() remains valid for the RPC lifetime.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:211
  • Draft comment:
    In the HTTPRequest conversion, headers are passed through redact_headers after cloning. Confirm that this redaction meets security requirements.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:237
  • Draft comment:
    For HTTPResponse conversion, ensure that optional headers are handled correctly when cloning and applying redact_headers.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
8. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:259
  • Draft comment:
    In the HTTPResponseStream conversion, using Cow::Borrowed(&self.event.data) should be reviewed to ensure the event data remains valid during RPC processing.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
9. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/trace_data.rs:267
  • Draft comment:
    The LoggedLLMResponse conversion maps optional raw_text_output to a Cow; verify that this conversion correctly represents absence or presence of text without data loss.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_9PwQJy5vd7yGrkDP

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

github-actions bot commented Sep 3, 2025

Copy link

github-actions bot commented Sep 3, 2025

@aaronvg aaronvg temporarily deployed to boundary-tools-dev September 3, 2025 21:16 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev September 3, 2025 21:16 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev September 3, 2025 21:16 — with GitHub Actions Inactive
Copy link

github-actions bot commented Sep 3, 2025

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed ba1a717 in 2 minutes and 4 seconds. Click for details.
  • Reviewed 37 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-rpc/src/auth/api_key.rs:42
  • Draft comment:
    Fallback slice length changed from 3 to 4. Confirm this is intentional and that it maintains consistency with the predefined codes ('dev', 'stg', 'prod'). Also, consider Unicode safety.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment has multiple issues: 1) It asks for confirmation of intention which violates our rules 2) The consistency concern is not valid since the predefined codes are hardcoded separately 3) While Unicode safety could be a real issue, the comment doesn't provide evidence that it's actually problematic in this context 4) The change from 3 to 4 chars seems like a minor change that doesn't warrant discussion. The Unicode safety concern could be legitimate since string slicing in Rust can panic on invalid UTF-8 boundaries. While Unicode safety is a valid concern in general, this code is working with a String type which guarantees valid UTF-8, and len().min(4) ensures we won't slice beyond string bounds. Delete this comment as it primarily asks for confirmation of intention and raises concerns without strong evidence of actual problems.
2. engine/baml-runtime/src/tracingv2/publisher/rpc_converters/mod.rs:618
  • Draft comment:
    Added 'client_details' in the RawLLMRequest test. Ensure this test data reflects the production API requirements and remains updated if the RPC schema changes.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that the test data reflects production API requirements and remains updated if the RPC schema changes. This falls under asking the author to ensure something is tested or verified, which is against the rules.

Workflow ID: wflow_YtlHc4jHPn0iFqoh

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

github-actions bot commented Sep 3, 2025

Copy link

github-actions bot commented Sep 6, 2025

Copy link

github-actions bot commented Sep 6, 2025

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 869e45e in 1 minute and 19 seconds. Click for details.
  • Reviewed 36 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-rpc/src/ui/ui_function_call_http_calls.rs:29
  • Draft comment:
    Add a newline at end of file for POSIX compliance.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and does not provide a specific code suggestion or ask for a specific test. It simply states a general best practice without context.
2. engine/baml-rpc/src/ui/ui_function_call_http_calls.rs:7
  • Draft comment:
    Consider adding Rust doc comments (///) for public structs (e.g., GetFunctionCallHttpCallsRequest and GetFunctionCallHttpCallsResponse) to improve maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_oTtcQbAdA3dqXuC4

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

github-actions bot commented Sep 8, 2025

Copy link

github-actions bot commented Sep 8, 2025

@aaronvg aaronvg temporarily deployed to boundary-tools-dev September 8, 2025 02:55 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev September 8, 2025 02:55 — with GitHub Actions Inactive
@aaronvg aaronvg changed the title aug 14 studio More improvements to studio2 publishing Sep 8, 2025
Copy link

github-actions bot commented Sep 8, 2025

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed df0ed86 in 1 minute and 34 seconds. Click for details.
  • Reviewed 70 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-rpc/src/lib.rs:30
  • Draft comment:
    Reordering of public exports: The ui_function_call_http_calls export has been moved before ui_function_calls. This reordering is non-functional but check that it aligns with the project's conventions to avoid any confusion in consumers.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. engine/baml-rpc/src/ui/mod.rs:6
  • Draft comment:
    Module declaration reordering: The ui_function_calls module is now declared after ui_function_call_http_calls. Although this does not change behavior, ensuring a consistent ordering (e.g. alphabetical or logical grouping) helps maintain clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. engine/baml-rpc/src/ui/ui_dashboard_cost.rs:12
  • Draft comment:
    Formatting update for struct fields: Multi-line formatting for fields in GetCostStatsRequest improves readability. Please ensure this style is consistent with other similar definitions in the project.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. engine/baml-rpc/src/ui/ui_function_call_http_calls.rs:29
  • Draft comment:
    Trailing newline added at EOF: This small formatting fix ensures consistency with standard style guidelines.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_rOte96drImEHgJ9p

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

github-actions bot commented Sep 8, 2025

@aaronvg aaronvg enabled auto-merge September 8, 2025 03:09
@aaronvg aaronvg added this pull request to the merge queue Sep 8, 2025
Copy link

github-actions bot commented Sep 8, 2025

Merged via the queue into canary with commit 39e731a Sep 8, 2025
24 of 25 checks passed
@aaronvg aaronvg deleted the aug-14-studio branch September 8, 2025 03:20
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