Overview
Curtly provides a high-performance, drop-in OpenAI-compatible chat completions proxy at/api/v1/chat/completions. By simply redirecting your base URL, all multi-turn agent interactions, system prompts, tool results, and code blocks are automatically optimized in real time.
8 Core Proxy Engine Optimizations
Curtly’s proxy incorporates an advanced 8-stage optimization pipeline designed specifically for autonomous coding agents (OpenCode, Claude Code, Cursor, Copilot):In-Memory LRU Cache (0.01ms)
SHA-256 fingerprinting caches static system prompts and historic turns. Multi-turn repeat queries return in 0.01ms with zero redundant latency.
Syntax-Safe Code Pruner (-72%)
Automatically identifies and strips multi-line Apache/MIT/GPL license headers and decorative dividers (
// =====) without altering executable AST logic.Terminal & ANSI Noise Filter (-55%)
Eliminates ANSI escape codes (
\x1b[...]), progress bars ([====> ] 45%), and git index metadata from agent context streams.Tool Result Minifier (-69%)
Prunes
null, empty arrays, and transient telemetry fields from JSON tool execution payloads before passing to the LLM.Reasoning Governor (CoT)
Enforces concise internal thinking directives and low reasoning effort to prevent reasoning models (
claude-fable-5-1, claude-opus-5-5, gpt-6-astra, deepseek-v4.1-flash, gemini-3.8-flash) from runaway CoT token burn. Claude Fable 5.1 yields the highest net reduction under this governor.Adaptive Routing
Short messages (< 150 chars) bypass remote diffusion for instant 0ms algorithmic processing, while deep diffusion targets heavy contexts.
Provider 429 Auto-Retry
Automatic exponential backoff with random jitter intercepts upstream rate limits (HTTP 429) and transient errors (502/503) seamlessly.
True SSE Streaming Pass-Through
Direct Server-Sent Events (SSE) streaming ensures immediate Time-To-First-Token (TTFT) delivery to the developer.
Agent Setup Guides
OpenCode CLI Integration
Configure~/.config/opencode/opencode.json with Curtly as your provider:
~/.local/share/opencode/auth.json: