Skip to content

Conversation

@saxyguy81
Copy link

Summary

This PR adds support for custom Anthropic API URLs, allowing users to use local proxies or custom API endpoints for development and testing.

Changes

  • ✨ New configuration setting: superdesign.anthropicUrl
  • 🔧 Updated customAgentService.ts to support custom URLs
  • 🛡️ Conditional Helicone header inclusion (only for default URL)

Use Cases

  1. Local Development - Use with ccproxy-api or similar local Claude API proxies
  2. Testing - Test with custom API endpoints
  3. Debugging - Monitor API calls through local proxy
  4. Alternative Tracking - Use different analytics/tracking services

How It Works

Configuration

Users can add to their VS Code settings:

{
  "superdesign.anthropicUrl": "http://localhost:4000"
}

Behavior

  • Without custom URL: Uses default https://anthropic.helicone.ai/v1 with Helicone headers
  • With custom URL: Uses specified URL without Helicone headers (assumes custom proxy handles its own auth/tracking)

Implementation Details

  • Read anthropicUrl from workspace configuration
  • Conditionally construct createAnthropic options based on presence of custom URL
  • Log custom URL usage for debugging
  • No breaking changes - fully backward compatible

Code Changes

package.json:

  • Added superdesign.anthropicUrl configuration property

src/services/customAgentService.ts:

  • Read custom URL from config
  • Use custom URL if provided, otherwise default to Helicone
  • Conditionally include Helicone auth headers only when using default endpoint
  • Added logging for custom URL usage

Testing

✅ TypeScript compilation passes
✅ Backward compatible (no custom URL = existing behavior)
✅ Code follows existing patterns
⏳ Manual testing with local proxy recommended

Benefits

  • Enables use of local Claude API proxies like ccproxy-api
  • Allows testing with custom endpoints
  • Provides flexibility for different deployment scenarios
  • Maintains full backward compatibility

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

This adds the ability to use local proxies or custom Anthropic API endpoints
(e.g., localhost:4000) for development and testing purposes.

Changes:
- Add superdesign.anthropicUrl configuration setting to package.json
- Update customAgentService.ts to support custom Anthropic URLs
- Conditionally include Helicone headers only when using default URL

When a custom Anthropic URL is configured, the extension will:
1. Use the custom URL instead of the default Helicone endpoint
2. Skip adding Helicone authentication headers
3. Log the custom URL being used for debugging

This is particularly useful for:
- Using local Claude API proxies (ccproxy-api, etc.)
- Testing with custom API endpoints
- Development and debugging scenarios

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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