A JetBrains IDE plugin that enables using Anthropic's latest Claude models including Claude 4 Opus, Claude 4 Sonnet, Claude 3.7 Sonnet, and Claude 3.5 models with the JetBrains AI Assistant. It works by providing a proxy that mimics the Ollama API format, allowing you to use Claude models through the AI Assistant's "Enable Ollama" feature in the Third-party AI providers settings.
- Real-time Streaming: Incremental message streaming for responsive chat experience with JetBrains AI Assistant
- Latest Claude Models: Support for Claude 4 Opus, Claude 4 Sonnet, Claude 3.7 Sonnet, and Claude 3.5 models
- Robust error handling for interrupted or malformed streaming responses
- Download the plugin from JetBrains Marketplace (or build from source)
- Install it in JetBrains IDE: Settings → Plugins → Install Plugin from Disk
- Restart JetBrains IDE
- Go to Settings → Tools → Ollama Proxy Settings
- Enter your Anthropic API key (Get one from Anthropic Console)
- Optionally configure the proxy port (default: 11434)
- Open the Ollama Proxy tool window (View → Tool Windows → Ollama Proxy)
- Click "Start Server" to begin the proxy service
- The proxy will be available at http://localhost:11434
- In the JetBrains AI Assistant Settings enable the Ollama integration via "Third-party AI providers".
- You can now use the latest Claude models including Claude 4 Opus, Claude 4 Sonnet, and Claude 3.7 Sonnet in the model dropdown in the AI Assistant
- If the models do not show up please disable Ollama in the JetBrains AI Assistant and enable it again.
- GET /api/tags - List available models
- POST /api/chat - Chat completion endpoint
- POST /api/show - Get model details
- Java 17 or later
- Gradle 8.0 or later
# Build the plugin
./gradlew buildPlugin
# Run tests
./gradlew test
# Clean and build
./gradlew clean buildPluginThe plugin ZIP file will be created in build/distributions/ollama-proxy-plugin-0.1.0.zip.
The project includes comprehensive tests for:
- Real-time Streaming: Tests for incremental message streaming and real-time response handling
- Streaming Response Handling: Tests for robust JSON parsing and error recovery in streaming responses from Anthropic API
- API Integration: Tests for authentication, error handling, and model management
- JetBrains AI Assistant Compatibility: Verification that streaming responses work correctly with the IDE integration
- New Model Support: Tests for Claude 4 Opus, Claude 4 Sonnet, and Claude 3.7 Sonnet integration
Run specific test suites:
# Run all tests
./gradlew test
# Run streaming-specific tests
./gradlew test --tests="*Streaming*"
# Run simple functionality tests
./gradlew test --tests="*Simple*"v0.1.0 - Production-ready release with comprehensive streaming and UI improvements:
- New Claude Models: Added support for Claude 4 Opus and Claude 4 Sonnet (latest flagship models)
- Added Claude 3.7 Sonnet: Extended thinking capabilities model now available
- Complete Tool Window Integration: Dedicated Ollama Proxy tool window with start/stop controls and status monitoring
- Real-time Message Streaming: True end-to-end streaming from Anthropic API to JetBrains AI Assistant
- Fixed JetBrains AI Assistant Compatibility: Resolved streaming response format issues and deserialization errors
- Fixed "Unexpected EOF" Streaming Errors: Improved streaming response handling using proper Ktor streaming mechanisms
- Fixed Write Timeout Exceptions: Extended server write timeout to 10 minutes for long streaming responses
- Comprehensive Test Suite: Fixed all failing tests - now 100% test success rate (37/37 tests passing)
- Enhanced Error Handling: Improved streaming error recovery and JSON validation
- Production-Ready Stability: Robust build system and deployment-ready package
- Improved JSON parsing for streaming responses from Anthropic API
- Better error recovery for interrupted or malformed JSON chunks
- Added comprehensive test suite for streaming functionality
- Enhanced error handling to prevent crashes during streaming
- JetBrains IDE 2024.1 or later (updated from 2023.1)
- Java 17 or later
- Valid Anthropic API key
If you experience issues with streaming responses (messages cutting off, JSON parsing errors):
- Check the plugin logs in IDE Help → Show Log in Files
- Restart the proxy server using the tool window
- Verify API key is correctly configured in Settings
- Check network connectivity to Anthropic API
The plugin includes enhanced error recovery for streaming issues as of v0.1.0.
If Claude models don't appear in JetBrains AI Assistant:
- Ensure the proxy server is running (green status in tool window)
- In AI Assistant settings, disable Ollama integration
- Re-enable Ollama integration
- Refresh the model list
Failed to process streaming response line: Usually harmless, indicates improved error recovery is workingunexpected EOF: Fixed in v0.1.0 - update to latest version if you see this errorWriteTimeoutException: Fixed in v0.1.0 with extended 10-minute write timeout for long responsesAuthentication failed: Check your Anthropic API keyRate limit exceeded: Wait a few minutes before making new requests
This project is licensed under the MIT License.
