What is Fast Apply?
Fast Apply is a feature that enables instant code edits with high accuracy by leveraging specialized “apply models” from Morph. It replicates Cursor AI’s instant apply functionality, allowing for seamless code modifications without the typical delays of traditional code generation.Fast Apply uses the specialized Morph API for instant code merging. This is separate from your main AI provider.
Why Fast Apply?
Traditional AI code generation has noticeable latency:- Slow application: Full language models take time to generate and apply changes
- Merge errors: Generic models struggle with accurate code merging
- Context overhead: Large context windows slow down simple edits
- ✅ Instant application: Code changes applied immediately without delays
- ✅ High accuracy: 96-98% accuracy for code edits
- ✅ Blazing speed: 2500-4500+ tokens per second
- ✅ Large context: Handles up to 16k tokens for input and output
How It Works
Instead of using a general-purpose LLM to both generate and apply code:- Your main AI provider (Claude, GPT, etc.) generates the edit instructions
- The specialized Morph apply model merges changes instantly
- Changes appear in your editor without noticeable delay
Setup
Get a Morph API key
Visit morphllm.com and create an account.Generate an API key from the dashboard.
Model Options
Morph provides different models optimized for different use cases:| Model | Speed | Accuracy | Context | Best For |
|---|---|---|---|---|
morph-v3-fast | 4500+ tok/sec | 96% | 16k tokens | Quick edits, simple changes |
morph-v3-large | 2500+ tok/sec | 98% | 16k tokens | Complex refactoring, critical code |
auto | 2500-4500 tok/sec | 98% | 16k tokens | Automatic model selection |
Choosing a Model
Usage
Once configured, Fast Apply works automatically:Automatic Application
When Fast Apply is enabled, theedit_file tool is used instead of traditional tools:
- Analyzes your code
- Generates edit instructions
- Sends to Morph apply model
- Applies changes instantly
Prompt Format
Fast Apply uses a specialized prompt format internally:Performance Comparison
| Approach | Average Latency | Accuracy | Cost |
|---|---|---|---|
| Traditional LLM | 3-10 seconds | 92-95% | High |
| Fast Apply (fast) | <1 second | 96% | Medium |
| Fast Apply (large) | <1 second | 98% | Medium |
Configuration
Full Fast Apply configuration:Limitations
Fast Apply is optimized for code edits, not full code generation. Use your main AI provider for generating new files.
Troubleshooting
API Key Issues
Model Selection
If you’re getting inconsistent results, try explicitly setting the model:Timeout Errors
Increase the timeout for large files:Next Steps
AI Assistance
Learn core AI features
Diff Management
Master code conflict resolution
Provider Configuration
Configure AI providers
Morph API
Get your Morph API key