OnlyTerp/UltraCode-Shim

Give Claude Code's ultracode mode to ANY model you already pay for. A tiny local proxy + one config.json. Point your AI at AGENTS.md and it sets itself up.

What it solves

UltraCode-Shim is a loopback proxy that allows users to run Claude Code's "UltraCode" mode (high effort, deep reasoning harness) using any LLM backend they already pay for, rather than being locked into Anthropic's stock models. It prevents the background "worker" agents in Claude Code's dynamic workflows from defaulting to stock models, ensuring the user's chosen model is used end-to-end.

How it works

The project acts as a proxy between the Claude Code CLI and the LLM API. It intercepts requests and adds the "UltraCode envelope" (specific parameters like effort=xhigh and adaptive thinking) to every request.

Key mechanisms include:

  • Orchestrator and Worker Split: It allows users to define two separate models: one for the main interactive loop (orchestrator) and one for the background sub-agents (workers), or use the same model for both.
  • Auto Router: An optional feature where a cheap classifier model scores candidate backends based on task difficulty, routing trivial tasks to cheaper models and escalating hard tasks to stronger ones.
  • Reliability Layer: It includes hardening against common API failures, such as auto-retrying empty turns, timing out stalled streams, and repairing tool-call sequences for strict backends.
  • Compatibility: It supports various route types including OpenAI-compatible endpoints, Codex OAuth, and Cursor Agent.

Who it’s for

Developers using Claude Code who want to reduce costs, use different model providers (like DeepSeek, OpenRouter, or local models via Ollama), or optimize performance by splitting orchestrator and worker roles.

Highlights

  • Model Flexibility: Use any OpenAI-compatible backend or specific integrations like GPT-5.5 via Codex.
  • Zero-Config for Stock Models: Automatically includes and updates the list of real Claude models.
  • Standard Library Only: Written in Python 3.8+ using only the standard library, requiring no pip install.
  • Smart Routing: Automatically selects the most cost-effective model that meets a quality threshold for a given task.
  • Non-Destructive: Does not modify the global Claude Code installation or credentials.

Related

  • Project
  • Project
  • Project
  • Project
  • Project