I Turned CloudCode into a Model-agnostic Engine with AnyModel Proxy | Brav

I Turned CloudCode into a Model-agnostic Engine with AnyModel Proxy


Table of Contents

TL;DR:

  • CloudCode can now call GPT, Gemini, DeepSeek, Gemma 4, and local Ollama models.
  • AnyModel strips incompatible fields, retries automatically, and translates formats without external dependencies.
  • Start with npx anymodel and point CloudCode to http://localhost:9090.
  • Run multiple proxies on different ports or terminals.
  • Use SpecWith and Verified Skill Project to keep your skills secure and structured.

Why this matters

I used to struggle with CloudCode’s single Anthropic model. I needed more options, had to rewrite requests for each provider, and ended up with a bloated editor.

  • Limited model options in CloudCode (only Anthropic) → AnyModel gives 600+ models via OpenRouter and local Ollama.
  • Incompatible request fields across providers → AnyModel strips them automatically.
  • Handling retries and failures → AnyModel retries failed requests.
  • Translating formats between providers → AnyModel translates request/response to match each provider.
  • Dependency bloat in code editors → AnyModel has no external dependencies.
  • Paying high costs for proprietary models → Use free models or local Ollama.
  • Securing skills against vulnerabilities → Use Verified Skill Project registry.
  • Managing large projects with many product increments → Use SpecWith for structure.
  • Difficulty running multiple proxies and terminals → AnyModel supports multiple ports.

Core concepts

AnyModel is a lightweight Node.js proxy that sits between the client and the model provider. It redirects requests to OpenRouter by default, strips incompatible fields, retries automatically, and translates request/response formats. The proxy uses only Node.js built-ins, so you can drop it into any environment without installing extra packages. It is MIT-licensed and open source, so you can audit the code yourself.

FeatureAnyModel ProxyOpenRouterDeepSeek
No external dependencies
Handles incompatible fields
Automatic retries
Rate limit handling
Local model support (Ollama)
Multiple proxies on different ports

OpenRouter hosts more than 600 models, including open source, proprietary, and open-weight models OpenRouter — 600+ Models (2026). Gemma 4 was released today, offering advanced reasoning and 256K context Gemma 4 Release (2026). The Verified Skill Project’s registry contains over 100,000 secure skills Verified Skill Project — Registry (2026). Agent Swarm lets you spawn a team of expert agents that coordinate autonomously Agent Swarm — Repo (2026). Ollama allows offline, local model inference Ollama — Official Site (2026).

How to apply it

  1. Prerequisites

  2. Install AnyModel

    npx anymodel
    

    The command downloads the binary, uses only Node.js built-ins, and starts the proxy on port 9090 by default AnyModel — Documentation (2026).

  3. Start the proxy

    npx anymodel --port 9090 --model openai/gpt-5.4
    

    Replace openai/gpt-5.4 with any supported model ID: gemma-4, deepseek/deepseek-r1-0528, llama, or an Ollama local model like ollama/llama3.1. AnyModel will strip incompatible fields, retry failures, and translate formats automatically.

  4. Configure CloudCode
    Point CloudCode’s model endpoint to http://localhost:9090. CloudCode will now send every request to AnyModel, which forwards it to the chosen provider.

  5. Run multiple proxies
    Open a new terminal and start another instance on a different port:

    npx anymodel --port 1992 --model deepseek/deepseek-r1-0528
    

    You can now use http://localhost:1992 in a separate CloudCode project or terminal.

  6. Integrate SpecWith
    SpecWith provides a spec-driven workflow for large projects. Initialize it:

    specwith init
    

    Then generate specs, have agents write code, and use the SpecWith registry to keep everything organized. SpecWith is open source and complements AnyModel’s lightweight design.

  7. Secure your skills
    Import verified skills from the registry:

    anyskill fetch https://verified-skill.com
    

    AnyModel will only accept calls to verified skills, reducing the attack surface.

  8. Monitor and rate-limit
    AnyModel automatically respects provider rate limits. If a model hits its limit, the proxy will retry with exponential backoff. You can also set custom limits in anymodel.json.

Pitfalls & edge cases

  • Free vs. paid models: Free models may have stricter limits; paid models give you higher quota.
  • Rate limits: Some providers impose daily caps; anymodel retries but will eventually fail if the cap is exceeded.
  • Performance overhead: Adding a proxy introduces a tiny latency (~5 ms), negligible for most tasks.
  • Field incompatibility: If a new provider adds a required field, AnyModel will drop it, possibly changing the response.
  • Multiple terminals: Running many proxies can exhaust ports; choose distinct ports.
  • Local model availability: Ollama models must be installed locally; AnyModel just forwards to the local endpoint.
  • Security: Never commit your API key; store it in environment variables or secret managers.

Quick FAQ

  1. Which models can I use with AnyModel?
    GPT-5.4, Gemini, DeepSeek-R1-0528, Gemma 4, Llama, Qwen, and any local Ollama model.

  2. Does AnyModel require external dependencies?
    No, it uses only Node.js built-ins.

  3. Can I run local Ollama models?
    Yes, just point AnyModel to the local Ollama endpoint.

  4. How does AnyModel handle rate limiting?
    It retries failed requests with exponential backoff and logs the limit.

  5. Can I run multiple proxies on different ports?
    Absolutely; just use the –port flag.

  6. Is my OpenRouter API key safe?
    Keep it in an environment variable and never commit it to code.

  7. What about cost?
    Free models cost $0; paid models charge per token.

Conclusion

AnyModel gives developers a fast, no-dependency way to turn CloudCode into a multi-model hub. With OpenRouter’s 600+ models, local Ollama support, and built-in retries, you can focus on building features, not wiring providers. Combine it with SpecWith for structured workflows and the Verified Skill Project for secure skills, and you have a complete, future-proof AI development stack. Try it today with npx anymodel and watch your productivity skyrocket.

References

Last updated: April 3, 2026

Recommended Articles

How OpenClaw Code Turns Thumbnail, Title, and Idea Generation into a Single Workflow | Brav

How OpenClaw Code Turns Thumbnail, Title, and Idea Generation into a Single Workflow

Learn how to automate thumbnail creation, title generation, and video ideas with OpenClaw, Nano Banana, and HarborSEO AI—improve YouTube workflow and brand consistency.
GitHub Projects That Turn Ideas into Code—What Every Developer Should Try | Brav

GitHub Projects That Turn Ideas into Code—What Every Developer Should Try

Explore top GitHub projects that auto-generate code, run sandboxes, sync docs in real-time, and analyze data with AI. Learn how to use them today.
Car Repair Nightmare: 17 Models That Will Drain Your Wallet | Brav

Car Repair Nightmare: 17 Models That Will Drain Your Wallet

Discover the 17 car models that mechanics warn you to avoid due to high repair costs and reliability issues. Learn how to spot red flags and save thousands.
The 5-Page Funnel Blueprint That Turned My Simple Funnels into $300,000 | Brav

The 5-Page Funnel Blueprint That Turned My Simple Funnels into $300,000

Discover the step-by-step 5-page funnel that turned a simple idea into $300,000. Learn how to capture phone numbers, use VSLs, start with organic traffic, and scale to $10K+ months.
Vortex Tube: Turning Compressed Air into Cold Air (No Electricity Required) | Brav

Vortex Tube: Turning Compressed Air into Cold Air (No Electricity Required)

Discover how a vortex tube splits compressed air into hot and cold streams without electricity. Learn its thermodynamics and uses for personal cooling.
Logarithms: The Spark That Turned Astronomical Calculations into Lightning | Brav

Logarithms: The Spark That Turned Astronomical Calculations into Lightning

Discover how John Napier’s logarithm tables and Kepler’s genius turned tedious 7-digit multiplication into simple addition, leading to the first accurate star catalog and the discovery of planetary laws. Read this practical guide for history of science and math students.