claude-task-master icon indicating copy to clipboard operation
claude-task-master copied to clipboard

feat: add Claude Code SDK provider integration

Open apple-techie opened this issue 6 months ago • 1 comments

Summary

This PR integrates the Claude Code SDK provider from PR #777, enabling API-key-free usage of task-master-ai for users who have Claude Code installed.

Changes

  • Claude Code Provider Integration: Add new ClaudeCodeProvider class based on PR #777
  • 🔧 Provider Configuration: Update ai-services-unified.js to include claude-code in PROVIDERS
  • 🔑 API Key Handling: Update config-manager to recognize claude-code doesn't need API keys
  • 🐛 EPIPE Error Fixes: Fix stream errors in displayUpgradeNotification and dev.js
  • 📊 Telemetry Compatibility: Add inputTokens/outputTokens fields for proper telemetry reporting
  • Test Coverage: Add ClaudeCodeProvider mock and update tests

Technical Details

The implementation:

  • Uses the @anthropic-ai/claude-code SDK for model access
  • Provides a seamless integration for Claude Code users without requiring API keys
  • Maintains compatibility with the existing provider architecture
  • Includes proper error handling and telemetry support

Testing

  • All 33 test suites pass (328 tests)
  • Tested with task expansion in real projects
  • EPIPE errors resolved when piping output

Credits

Based on:

  • PR #777 by @neno-is-ooo - Original Claude Code provider implementation
  • PR #649 - Related improvements

Related Issues

Addresses the need for API-key-free usage when Claude Code is available locally.

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

apple-techie avatar Jun 15 '25 11:06 apple-techie

🦋 Changeset detected

Latest commit: 2e314e33c4b4eb86a8119af9697ebbaed5905dc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
task-master-ai Minor

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Jun 15 '25 11:06 changeset-bot[bot]