Skip to content

Conversation

@tinalenguyen
Copy link
Member

@tinalenguyen tinalenguyen commented Jan 26, 2026

use as xai.WebSearch()

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced three new search tools: Web Search, X Search, and File Search—now available in the public API for enhanced plugin functionality and data retrieval capabilities.
  • Refactor

    • Reorganized tool implementations for improved API structure and maintainability.

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

@chenghao-mou chenghao-mou requested a review from a team January 26, 2026 17:25
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This change relocates tool definitions from the realtime module to a dedicated tools module. WebSearch, XSearch, and FileSearch are moved to a new tools.py file and re-exposed at the top level of the xai plugin package, while removing them from realtime module exports.

Changes

Cohort / File(s) Summary
Tool Definition Consolidation
livekit/plugins/xai/tools.py, livekit/plugins/xai/realtime/realtime_model.py
New module tools.py introduces abstract base class XAITool and three concrete dataclasses (WebSearch, XSearch, FileSearch) with to_dict serialization methods. Corresponding definitions removed from realtime_model.py; imports updated to remove abstractmethod, dataclass, field.
Public API Reorganization
livekit/plugins/xai/__init__.py, livekit/plugins/xai/realtime/__init__.py
Top-level __init__.py now imports and exports WebSearch, XSearch, FileSearch from .tools. Realtime module's __init__.py no longer exports these tools; imports restricted to RealtimeModel only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 From scattered realms to a home so neat,
Tools find their place, refactoring complete!
WebSearch, XSearch, FileSearch aligned,
A cleaner structure, purposefully designed. ✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9586b8f and 24dd1c9.

📒 Files selected for processing (4)
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/__init__.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/__init__.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/tools.py

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lg

@tinalenguyen tinalenguyen merged commit 76193a6 into main Jan 26, 2026
18 of 19 checks passed
@tinalenguyen tinalenguyen deleted the tina/move-xai-tools branch January 26, 2026 17:26
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.

3 participants