Skip to content

Conversation

@eliasyin
Copy link

…c-provider

When using anthropic-provider mode, the read_file tool's line_ranges parameter was being converted from snake_case to camelCase and from tuple format to object format before saving to conversation history. This caused inconsistency between the API response format and the saved history format.

Changes:

  • Add rawInput field to ToolUse interface to preserve original API parameters
  • Save original args to rawInput in NativeToolCallParser.parseToolCall()
  • Use rawInput (if available) when saving tool calls to history in Task.ts
  • Add test case to verify rawInput preserves original line_ranges format

This ensures line_ranges stays as [[1, 50]] instead of being converted to lineRanges: [{ start: 1, end: 50 }] in the conversation history.

Context

Implementation

Screenshots

before after

How to Test

Get in Touch

…c-provider

When using anthropic-provider mode, the read_file tool's line_ranges parameter
was being converted from snake_case to camelCase and from tuple format to object
format before saving to conversation history. This caused inconsistency between
the API response format and the saved history format.

Changes:
- Add rawInput field to ToolUse interface to preserve original API parameters
- Save original args to rawInput in NativeToolCallParser.parseToolCall()
- Use rawInput (if available) when saving tool calls to history in Task.ts
- Add test case to verify rawInput preserves original line_ranges format

This ensures line_ranges stays as [[1, 50]] instead of being converted to
lineRanges: [{ start: 1, end: 50 }] in the conversation history.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2026

⚠️ No Changeset found

Latest commit: f4d8487

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant