Skip to content

Conversation

@NVJKKartik
Copy link
Contributor

@NVJKKartik NVJKKartik commented Jun 10, 2025

Pull Request

Description

Describe the changes in this pull request:

  • What feature/bug does this PR address?
  • Provide any relevant links or screenshots.

Checklist

  • Code compiles correctly.
  • Created/updated tests.
  • Linting and formatting applied.
  • Documentation updated.

Related Issues

Closes #<issue_number>

Summary by CodeRabbit

  • New Features

    • Added support for AI evaluation across all Python and TypeScript frameworks, enabling new evaluation types such as bias detection, politeness, helpfulness, code validity, hallucination detection, and more.
    • Introduced comprehensive evaluation tagging and configuration capabilities in the TypeScript FI Core package.
    • Enhanced telemetry configuration with detailed evaluation tags and richer metadata for observability.
  • Bug Fixes

    • Improved error logging for HTTP errors to provide more detailed server responses.
  • Chores

    • Updated package versions and dependencies across all Python and TypeScript packages.
    • Improved handling of optional dependencies for AI evaluation modules, ensuring graceful degradation if not installed.
    • Added and updated example scripts and documentation for better usability.

@coderabbitai
Copy link

coderabbitai bot commented Jun 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces comprehensive support for AI evaluation tagging and custom evaluation configurations across both Python and TypeScript components. Numerous enums, configuration schemas, and mapping utilities for evaluation tags are added, alongside conditional imports for optional dependencies. Version numbers and dependencies are incremented throughout, and error handling is enhanced for HTTP responses. TypeScript packages receive major upgrades for OpenTelemetry and internal workspace protocol usage.

Changes

File(s) Change Summary
python/CHANGELOG.md, python/frameworks/*/CHANGELOG.md Added changelog entries for new ai-evaluation features and version bumps.
python/fi_instrumentation/fi_types.py Added new enum values, evaluation names, config/mapping schemas for AI evals.
python/fi_instrumentation/otel.py Enhanced HTTP error handling to extract server error messages from JSON responses.
python/frameworks/*/pyproject.toml, python/pyproject.toml Incremented package and dependency versions, added ai-evaluation dependency.
python/frameworks//traceai_/init.py Wrapped Protect import in try-except; log warning if ai-evaluation not installed.
python/frameworks/openai/examples/chat_completions.py Changed eval tag config, updated imports, and project registration parameters.
python/frameworks/vertexai/traceai_vertexai/_wrapper.py Replaced string literals with enum constants for LLM provider; imported new enum.
typescript/package.json, typescript/packages/*/package.json Switched internal dependencies to workspace protocol; upgraded OpenTelemetry & other deps.
typescript/packages/fi-core/src/fi_types.ts (new) Added comprehensive TypeScript module for evaluation tagging, enums, config, validation, and serialization.
typescript/packages/fi-core/src/index.ts Exported all from fi_types for public API.
typescript/packages/fi-core/src/otel.ts Refactored tracer provider; added eval tag normalization, config/template existence checks, improved resource handling.
typescript/packages/traceai_anthropic/src/instrumentation.ts Simplified class and method signatures, removed generic type parameters.
typescript/packages/traceai_langchain/examples/chat.ts Changed import to use published package instead of relative path.
typescript/packages/traceai_langchain/package.json, tsconfig.json Updated version, entry points, output dir, added composite build, and adjusted scripts.
typescript/packages/traceai_openai/README.md Changed code example from ES module imports to CommonJS requires.
typescript/packages/traceai_openai/examples/basic-otel-test.ts Enhanced tracer registration with eval tags, updated project metadata, and improved imports.
typescript/packages/traceai_openai/examples/example.ts (new), examples/package.json (new) Added new OpenAI tracing example and supporting package.json.
typescript/packages/traceai_openai/package.json, tsconfig.json Updated version, scripts, dependency versions, and added Node.js types.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TracerProvider
    participant EvalTag
    participant Server

    User->>TracerProvider: register({ projectName, projectType, evalTags, ... })
    TracerProvider->>EvalTag: create() for each evalTag
    EvalTag->>Server: checkCustomEvalTemplateExists (if custom eval)
    Note right of EvalTag: Validates enums, config, mapping
    TracerProvider->>Server: checkCustomEvalConfigExists (fire-and-forget)
    TracerProvider->>TracerProvider: Setup resources, processors, etc.
    User->>TracerProvider: Start tracing session
    TracerProvider->>Server: Export spans (with eval tags)
    Server-->>TracerProvider: (Optional) HTTP error with JSON body
    TracerProvider->>TracerProvider: Enhanced error handling/logging
Loading

Poem

In fields of code where rabbits hop,
New eval tags now sprout non-stop!
With enums tall and configs wide,
Custom checks run server-side.
If imports fail, don’t lose your hat—
A warning logs, and that is that!
Version bumps? We’re quick as light—
Let’s trace and tag through every byte!

((\
( -.-)
o_(")(")


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5c9b8e and 53eae7c.

⛔ Files ignored due to path filters (1)
  • typescript/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (53)
  • python/CHANGELOG.md (1 hunks)
  • python/fi_instrumentation/fi_types.py (4 hunks)
  • python/fi_instrumentation/otel.py (1 hunks)
  • python/frameworks/anthropic/CHANGELOG.md (1 hunks)
  • python/frameworks/anthropic/pyproject.toml (2 hunks)
  • python/frameworks/anthropic/traceai_anthropic/__init__.py (2 hunks)
  • python/frameworks/bedrock/CHANGELOG.md (1 hunks)
  • python/frameworks/bedrock/pyproject.toml (2 hunks)
  • python/frameworks/bedrock/traceai_bedrock/__init__.py (1 hunks)
  • python/frameworks/groq/CHANGELOG.md (1 hunks)
  • python/frameworks/groq/pyproject.toml (2 hunks)
  • python/frameworks/groq/traceai_groq/__init__.py (1 hunks)
  • python/frameworks/haystack/CHANGELOG.md (1 hunks)
  • python/frameworks/haystack/pyproject.toml (2 hunks)
  • python/frameworks/haystack/traceai_haystack/__init__.py (1 hunks)
  • python/frameworks/instructor/CHANGELOG.md (1 hunks)
  • python/frameworks/instructor/pyproject.toml (2 hunks)
  • python/frameworks/instructor/traceai_instructor/__init__.py (1 hunks)
  • python/frameworks/langchain/CHANGELOG.md (1 hunks)
  • python/frameworks/langchain/pyproject.toml (2 hunks)
  • python/frameworks/langchain/traceai_langchain/__init__.py (1 hunks)
  • python/frameworks/litellm/CHANGELOG.md (1 hunks)
  • python/frameworks/litellm/pyproject.toml (2 hunks)
  • python/frameworks/litellm/traceai_litellm/__init__.py (1 hunks)
  • python/frameworks/llama_index/CHANGELOG.md (1 hunks)
  • python/frameworks/llama_index/pyproject.toml (2 hunks)
  • python/frameworks/llama_index/traceai_llamaindex/__init__.py (1 hunks)
  • python/frameworks/openai/CHANGELOG.md (1 hunks)
  • python/frameworks/openai/examples/chat_completions.py (1 hunks)
  • python/frameworks/openai/pyproject.toml (2 hunks)
  • python/frameworks/openai/traceai_openai/__init__.py (1 hunks)
  • python/frameworks/vertexai/CHANGELOG.md (1 hunks)
  • python/frameworks/vertexai/pyproject.toml (2 hunks)
  • python/frameworks/vertexai/traceai_vertexai/__init__.py (1 hunks)
  • python/frameworks/vertexai/traceai_vertexai/_wrapper.py (4 hunks)
  • python/pyproject.toml (2 hunks)
  • typescript/package.json (1 hunks)
  • typescript/packages/fi-core/package.json (3 hunks)
  • typescript/packages/fi-core/src/fi_types.ts (1 hunks)
  • typescript/packages/fi-core/src/index.ts (1 hunks)
  • typescript/packages/fi-core/src/otel.ts (9 hunks)
  • typescript/packages/fi-semantic-conventions/package.json (3 hunks)
  • typescript/packages/traceai_anthropic/package.json (1 hunks)
  • typescript/packages/traceai_anthropic/src/instrumentation.ts (3 hunks)
  • typescript/packages/traceai_langchain/examples/chat.ts (1 hunks)
  • typescript/packages/traceai_langchain/package.json (2 hunks)
  • typescript/packages/traceai_langchain/tsconfig.json (1 hunks)
  • typescript/packages/traceai_openai/README.md (2 hunks)
  • typescript/packages/traceai_openai/examples/basic-otel-test.ts (3 hunks)
  • typescript/packages/traceai_openai/examples/example.ts (1 hunks)
  • typescript/packages/traceai_openai/examples/package.json (1 hunks)
  • typescript/packages/traceai_openai/package.json (2 hunks)
  • typescript/packages/traceai_openai/tsconfig.json (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JayaSurya-27 JayaSurya-27 merged commit 197ddfa into main Jun 10, 2025
1 check was pending
@coderabbitai coderabbitai bot mentioned this pull request Jun 13, 2025
Merged
4 tasks
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.

5 participants