Why I Chose Ollama Cloud as My Primary AI Infrastructure Tier

Posted in development on August 16, 2026 by Adrian Wyssmann ‐ 2 min read

When selecting an infrastructure provider for heavy AI agent workflows, developers usually face a choice between pay-as-you-go token APIs (OpenAI, Anthropic) or hosting local models on dedicated hardware. I actually started out with [openrouter] and then switched to ollama cloud

Evaluating OpenRouter & Free Model Options

[OpenRouter][openrouter] acts as an excellent unified API gateway. Instead of locking you into a single provider, it gives you access to hundreds of proprietary and open models under one roof.

Free Tier Models on OpenRouter

OpenRouter maintains a rotating selection of free models. Key category leaders include:

  • Deep Reasoning & Research: nvidia/nemotron-3-ultra-550b-a55b:free
    • Strengths: A massive 550B mixture-of-experts model with a 1M token context window for cross-document analysis and complex orchestration.
  • Coding & Software Engineering: poolside/laguna-s-2.1:free or cohere/north-mini-code:free
    • Strengths: Optimized for agentic coding, terminal execution, and repository-level context with strong tool-calling capabilities.
  • General Chat & Daily Tasks: inclusionai/ling-3.0-flash:free or openai/gpt-oss-20b:free
    • Strengths: Extremely fast response times and dependable performance for drafting and everyday instruction following.
  • Multimodal / Vision: google/gemma-4-31b-it:free
    • Strengths: Excellent open model for analyzing UI mockups, screenshots, charts, or visual documentation.

You have to pay up-front i.e. charge the account with some money. 5$ is enough to start and you can - if you want - enable auto top-up. Its a good and cheap start to try it out but if you really want to start using for real development tasks, then you should switch to more expensive models.

Use openrouter/free as your endpoint model slug. This fallback router automatically directs requests to an available free model that supports the required capabilities (such as vision or tool calling) without failing if a single model gets rate-limited.

Setting Up omp (Oh-My-Pi) with OpenRouter

I use [omp] as my primary harness, which features first-class support for OpenRouter, allowing you to route subagents or main developer roles through OpenRouter models effortlessly.

  1. Export your key (starting with sk-or-) in your terminal profile (~/.zshrc or ~/.bashrc):

    export OPENROUTER_API_KEY="sk-or-v1-your-actual-key-here"
  2. Launch omp with an OpenRouter Model by using the model slug directly with the --model flag:

    # Launch using Claude 3.5 Sonnet via OpenRouter
    omp --model openrouter/anthropic/claude-3.5-sonnet
    
    # Launch using DeepSeek V4 via OpenRouter
    omp --model openrouter/deepseek/deepseek-v4
  3. Changing Models Inside the TUI

    1. Type /model and press Enter.
    2. Switch to the OpenRouter tab using the arrow keys.
    3. Search for your target model (e.g., gpt-5.6-luna or claude-fable), select it, and press Enter to bind it.

Persistent Configuration (models.yml)

To configure persistent roles, edit ~/.oh-omp/agent/models.yml:

providers:
  openrouter:
    baseUrl: https://openrouter.ai/api/v1
    apiKey: OPENROUTER_API_KEY
    api: openai-completions
    headers:
      X-Title: "My OMP Agent"
    openRouterRouting:
      order: ["primary-provider-slug"]

Troubleshooting Quick Tips

Some hints if you ever run in the same troubles as me:

  • 402 Error: Indicates your OpenRouter account has run out of credits or hit a paid tier threshold during tool compaction steps.
  • Reasoning Models: If using thinking/reasoning models (like DeepSeek or specialized OpenAI models), ensure you are running the latest omp release (bun install -g @oh-my-pi/pi-coding-agent) to prevent 400 errors related to reasoning_content parameter mapping.

ollama-cloud as primary AI provider

I later also looks into ollama-cloud, which offers some interesting open models, especially Chinese ones, which offers very good results for development

The Cost Advantage: GPU Time vs. Token Billing

Traditional API providers charge on a strict linear per-token basis (input + output). Agentic workflows that perform frequent LSP diagnostic passes, read large workspace trees, or hold long conversation threads quickly accumulate millions of input tokens, leading to unpredictable monthly bills.

Ollama Cloud flips this paradigm: billing and usage quotas are based on GPU Time (Resource Utilization) rather than raw token throughput.

Why This Benefits Developer Workflows

  • High-Context Scale: Passing massive code bases or deep file trees through server-side context caching reuses compute states, keeping active GPU execution time low.
  • Predictable Fixed Tiers: Instead of worrying about micro-billing per file inspection, your usage is metered against a structured weekly limit on a 7-day rolling clock (supported by a short-term 5-hour session reset).

Understanding Model Weight Tiers & Quota Calculations

Because usage tracks active GPU compute cycles rather than raw text length, models hosted on Ollama Cloud are categorized into distinct Weight Tiers:

  1. Level 1 (Light): E.g., gpt-oss:20b. Low resource footprint; consumes minimal quota.
  2. Level 2 (Medium): Balanced reasoning and speed models.
  3. Level 3 (Heavy): Mainstream coding models.
  4. Level 4 (Extra Heavy): Massive flagship models (e.g., deepseek-v4-pro). These strain remote GPUs heavily and will burn through weekly allowances quickly if unmanaged.

Optimization Strategies to Stretch Quotas

Whether using Ollama Cloud or OpenRouter, keep your compute and token footprints small:

  1. Enable Response Streaming ("stream": true): Abort bad generations early to stop GPU cycles or unnecessary token billing.
  2. Thread Hygiene: Run /compact regularly in omp to trim stale conversation context.
  3. Hybrid Offloading: Use local ollama run for simple offline edits, Ollama Cloud for high-context agent tasks, and OpenRouter for specialized reasoning models.