Skip to content

RSPEED-2658: Remove dead GraniteToolParser and legacy Agents API imports#1350

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
major:remove-granite-tool-parser
Mar 18, 2026
Merged

RSPEED-2658: Remove dead GraniteToolParser and legacy Agents API imports#1350
tisnik merged 1 commit intolightspeed-core:mainfrom
major:remove-granite-tool-parser

Conversation

@major
Copy link
Copy Markdown
Contributor

@major major commented Mar 18, 2026

Description

The GraniteToolParser class was a workaround for llama-stack-client-python#206, built for the old Agents API. The codebase has migrated to the Responses API and this class has zero production callers. This removes it, its legacy imports from llama_stack_client.lib.agents (AgentCompletionMessage, AgentToolCall), and the corresponding unit tests.

Type of change

  • Refactor

Tools used to create PR

  • Assisted-by: Claude (OpenCode)
  • Generated by: N/A

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

Pure deletion of dead code (103 lines removed, 0 added). Verified via grep that GraniteToolParser, AgentCompletionMessage, and AgentToolCall have zero remaining references in the codebase. No new tests needed since this only removes unused code and its tests.

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed GraniteToolParser class and associated tool-related imports from the public API. Existing implementations using these components will require updates.

…imports

The GraniteToolParser class was a workaround for
llama-stack-client-python#206, built for the old Agents API. The
codebase has migrated to the Responses API and this class has zero
production callers. Remove it, its legacy imports from
llama_stack_client.lib.agents, and the corresponding unit tests.

Signed-off-by: Major Hayden <major@redhat.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4ddc0685-eed4-483f-9e5b-3a69db4cbfe5

📥 Commits

Reviewing files that changed from the base of the PR and between cdec708 and 2749e36.

📒 Files selected for processing (2)
  • src/utils/types.py
  • tests/unit/utils/test_types.py
💤 Files with no reviewable changes (2)
  • tests/unit/utils/test_types.py
  • src/utils/types.py

Walkthrough

The GraniteToolParser class and its related imports are being removed from the types module, along with corresponding unit tests. The changes eliminate unused tooling functionality previously exported from the utilities layer.

Changes

Cohort / File(s) Summary
Type Definitions
src/utils/types.py
Removed ToolParser, CompletionMessage (AgentCompletionMessage), and ToolCall (AgentToolCall) imports. Deleted GraniteToolParser class and its methods (get_tool_calls, get_parser).
Unit Tests
tests/unit/utils/test_types.py
Removed GraniteToolParser import and deleted entire TestGraniteToolParser test class with all associated test methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 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 clearly summarizes the main change: removing GraniteToolParser and legacy Agents API imports. It is specific, concise, and directly reflects the primary purpose of this refactoring PR.
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 unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

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

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting to disable sequence diagrams in the walkthrough.

Copy link
Copy Markdown
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

Cool, code deletion, not slop addition ;)

@tisnik tisnik merged commit 840bcba into lightspeed-core:main Mar 18, 2026
21 of 22 checks passed
@major major deleted the remove-granite-tool-parser branch March 18, 2026 20:38
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