Skip to content

Conversation

@nina-kollman
Copy link
Contributor

@nina-kollman nina-kollman commented Jan 19, 2026

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Important

Remove guardrail v1 feature from traceloop-sdk, including related files and code references.

  • Removal:
    • Delete guardrail_medical_chat_example.py and guardrail_travel_agent_example.py from sample_app.
    • Remove guardrails related files: guardrails.py, types.py, and __init__.py in traceloop/sdk/guardrails/.
  • Code Changes:
    • Remove Guardrails import and self.guardrails initialization in Client class in client.py.

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

Summary by CodeRabbit

  • Refactor
    • Removed guardrails evaluation feature from the SDK, including the guardrail decorator and evaluator integration.
    • Removed sample applications demonstrating guardrails usage (medical chat and travel agent examples).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

This pull request removes the guardrails feature from the Traceloop SDK. Changes include deletion of guardrails implementation files, removal of guardrails-related type definitions, elimination of the guardrails attribute from the Client class, removal of guardrails exports from the public API, and deletion of medical chat and travel agent example scripts that demonstrated guardrails usage.

Changes

Cohort / File(s) Summary
Sample App Examples
packages/sample-app/sample_app/guardrail_medical_chat_example.py, packages/sample-app/sample_app/guardrail_travel_agent_example.py
Complete removal of two example scripts demonstrating guardrails integration with medical chat and travel agent use cases, including CLI sessions, PII detection, and evaluation callbacks.
SDK Client Integration
packages/traceloop-sdk/traceloop/sdk/client/client.py
Removed Guardrails import and deleted self.guardrails attribute initialization from the Client class, decoupling guardrails from the main SDK client.
SDK Guardrails Package
packages/traceloop-sdk/traceloop/sdk/guardrails/__init__.py
Removed all re-exports of guardrails-related symbols (guardrail, EvaluatorSpec, Guardrails, InputExtractor, OutputSchema, ExecuteEvaluatorRequest) and cleared the __all__ declaration, eliminating public API surface.
SDK Guardrails Implementation
packages/traceloop-sdk/traceloop/sdk/guardrails/guardrails.py
Complete deletion of the guardrail decorator and Guardrails class, removing all guardrail evaluation logic, async/sync handler paths, evaluator invocation, and callback mechanisms.
SDK Guardrails Types
packages/traceloop-sdk/traceloop/sdk/guardrails/types.py
Removal of Pydantic data models (InputExtractor, ExecuteEvaluatorRequest, OutputSchema) used for guardrails type mapping and evaluation schema definitions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 The guardrails have vanished into the starry night,
Once gating responses with careful might,
Now the path is clear, a lighter load,
The SDK trims its guardrail road! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the guardrail v1 implementation from the traceloop SDK. It is concise, specific, and follows conventional commit format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@nina-kollman nina-kollman marked this pull request as ready for review January 19, 2026 07:38
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 everything up to 7555077 in 1 minute and 18 seconds. Click for details.
  • Reviewed 617 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 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. packages/traceloop-sdk/traceloop/sdk/client/client.py:8
  • Draft comment:
    Removed guardrails import. Ensure that no dependencies rely on this module.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that no dependencies rely on the removed module, which violates the rule against asking the author to double-check things or ensure behavior. It does not provide a specific suggestion or point out a specific issue.
2. packages/traceloop-sdk/traceloop/sdk/client/client.py:69
  • Draft comment:
    Removed instantiation of guardrails property. Confirm that clients do not rely on 'client.guardrails' as this is a breaking change.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. packages/sample-app/sample_app/guardrail_medical_chat_example.py:1
  • Draft comment:
    Removed outdated medical guardrail sample example. Ensure documentation and references to this sample are updated.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/sample-app/sample_app/guardrail_travel_agent_example.py:1
  • Draft comment:
    Removed outdated travel guardrail sample. Update any related docs to reflect the removal of guardrail v1.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/traceloop-sdk/traceloop/sdk/guardrails/guardrails.py:1
  • Draft comment:
    Complete removal of Guardrails module and related types. Ensure migration steps are provided for users relying on guardrail v1 APIs.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_uEEA0W6pqblgyEQA

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

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