AIFeed

Show HN: Attic – Dynamic model routing to reduce AI API costs by 45%

Original text(via HN AI)

Most AI requests are easy. You're paying for hard ones.

Attic splits each request into steps. Easy steps run on a local Ollama model for $0; hard steps, and any local step that falls short, go to Groq in the cloud. Every run ends with a cost receipt. You change one line of code.

Ollama (local, $0)Groq (cloud)Bring your own keys

Sample runs with illustrative numbers, not usage data. Costs use Groq's listed gpt-oss-120b price; Ollama runs on your machine for $0.

One line changes. The rest happens in the stream.

Point your app at Attic. Splitting, retries and the receipt happen without more code.

  • 1Your request comes inA normal OpenAI-style request. One line changes in your code. 3000 is the default port; if it's taken, Attic uses a free one and shows it in Settings.base_url = "127.0.0.1:3000/v1"POST /v1/chat/completions

Your request comes in

A normal OpenAI-style request. One line changes in your code. 3000 is the default port; if it's taken, Attic uses a free one and shows it in Settings.

  • 2It's split into stepsAttic plans the request as steps. Easy ones run on your local Ollama model for $0; hard ones go to Groq.step 1 · ollama · $0step 2 · ollama · $0step 3 · groq

It's split into steps

Attic plans the request as steps. Easy ones run on your local Ollama model for $0; hard ones go to Groq.

  • 3Falls short? Retry, then GroqA local step that errors or gives a weak answer is retried, then handed to Groq automatically. You get a receipt for what it cost.local check failed→ retry → groq ✓

Falls short? Retry, then Groq

A local step that errors or gives a weak answer is retried, then handed to Groq automatically. You get a receipt for what it cost.

What counts as a failureStallErrorCut offRepeatingGarbledInvalid JSON

Estimate your savings.

Three numbers, a rough answer. Nothing leaves your browser.

The same one-line change, used four ways.

Your keys and prompts stay on your Mac.

Attic has no cloud. It runs locally and talks only to the providers you choose.

  • Local onlyThe proxy listens on 127.0.0.1 only (localhost works too). Other machines on your network can't reach it.
  • Keys in the KeychainYour provider API keys are stored encrypted with the macOS Keychain. The app window can see that a key is saved, but never the key itself.
  • No cross-site callsRequests from other websites and non-loopback hosts are refused, so a page you visit can't spend your keys.
  • Direct to providersPrompts go straight from your Mac to the providers you configure. There's no Attic server in between.
  • A local logThe request log is a file on your machine. You can read it, and you can delete it.

Supported providers: Groq (cloud) Ollama (local, $0)

Questions.

No. Attic runs on your Mac and sends requests straight to the providers you set up. The request log is a local file.

There's no pricing yet. You pay your providers directly, with your own keys.

Yes. It speaks the OpenAI streaming format. The stream continues on the next model without your client having to retry.

Not yet. Today Attic handles text chat completions, including streaming and JSON mode. Tool calling is the next thing on the list.

Text chat completions only (no tool calling or image input yet), Groq and Ollama as providers, and Macs on macOS 13 or later (Apple Silicon or Intel). Attic catches failures like stalls, errors and invalid JSON, not wrong answers.

Download the DMG, drag Attic into Applications, then allow it once in System Settings → Privacy & Security → Open Anyway (the build is unsigned; details). For a local model, install Ollama and run ollama pull llama3.2; for the cloud, create a Groq API key. The app checks both and runs a sample. Developers can also run the proxy from source with Bun.

Easy requests should cost almost nothing. With Attic, they do.

The build is unsigned, so on macOS Sequoia (15) and later Gatekeeper blocks the first launch. Right-click → Open no longer skips the warning. Allow it once:

  • Try to open Attic, then click Done on the warning.
  • Open System Settings → Privacy & Security.
  • Scroll to Security, find "Attic was blocked", and click Open Anyway.
  • Confirm with your password, then click Open.

Or run this in Terminal, then open Attic as usual: xattr -cr /Applications/Attic.app

  • Open the DMG and drag Attic into Applications.
  • First launch: the build is unsigned, so macOS blocks it once. Allow it in Privacy & Security.
  • Add a model: install Ollama and run ollama pull llama3.2, create a Groq API key, or both. Attic checks them and runs a sample.

Get an email when a new version ships.

Release notes only. One email per release, no spam, no sharing.

We'll only use this for release emails.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗