---
title: "Caveman vs Martian for model routing and agent costs"
description: "Martian combines gateway access with work on model routing. Caveman gives teams local context compression and a routing pilot path that can leave inference in their current gateway. The useful choice "
canonical: https://caveman.so/compare/martian
last-updated: 2026-09-07
---

# Caveman vs Martian for model routing and agent costs

Martian combines gateway access with work on model routing. Caveman gives teams local context compression and a routing pilot path that can leave inference in their current gateway. The useful choice depends on whether you need more model access, a better selection policy, or fewer repeated tokens on the route you already trust.

Caveman Router is in private development. Its local skill and proxy can be evaluated today without waiting for a routing migration.

## Separate gateway access from routing

Martian's [LiteLLM integration](https://docs.withmartian.com/integrations/litellm) documents its gateway as an upstream with its own credentials and model naming. Martian's [RouterBench work](https://withmartian.com/post/introducing-routerbench) addresses how routing methods should be evaluated across cost and quality.

| Need | Martian | Caveman |
| --- | --- | --- |
| Model access | Gateway and provider-model catalog | Native provider routes or existing gateway |
| Routing evaluation | Published routing research and benchmark work | Workload evaluation including agent continuation costs |
| LiteLLM relationship | Can be a provider upstream | Can ask for a decision while LiteLLM retains inference |
| Context compression | Inspect the specific Martian feature or route selected | Local content-specific transforms with recovery |
| First local experiment | Current Martian caller as baseline | Supported agent wrapper or captured tool output |

An upstream model alias, a routing policy, and a compressor are not interchangeable settings. Keep their effects separate in an experiment.

## Caveman's reason to be in the trial

Long agent tasks can waste input without needing a different model. A repeated log or structured response can be reduced while the model remains fixed. Caveman supplies a local recovery loop so the agent can ask for omitted detail when the smaller view is insufficient.

That offers a practical starting point for a team whose provider arrangement already works. You can run one known task and see whether it finishes with less complete usage before changing billing or routing services.

The proxy does not guarantee compression on every protocol path. If safe recovery is unavailable, or the content is not reduced, keep pass-through visible in the results.

## Evaluate a route beyond its first answer

Routing research is useful for finding cost-quality tradeoffs. An agent workload adds another layer: the chosen model may need extra turns, repeat tool calls, or lose cached context when the route changes.

A matched experiment should include those continuations. Use a fixed capable model as a baseline alongside the current Martian setup and the Caveman candidate. Hold the model pool constant first so the comparison isolates routing behavior.

Do not carry a headline benchmark percentage into a new codebase or provider contract. The result belongs to the tested task set, candidate models, and measurement method.

## Watch model-name mapping

When LiteLLM uses Martian, the documented model string can contain both LiteLLM's protocol prefix and Martian's provider prefix. A migration must map that string to the destination deployment deliberately. Removing one slash-separated segment is not a complete capability check.

Preserve model identity, reasoning settings, tool support, and region constraints. Record whether the selected route is an optimized Martian alias or a fixed model. A different alias can change the experiment even if the visible provider name stays the same.

## Choose the next step

Keep Martian's gateway if it supplies model access you need. Try Caveman locally when context repetition is the clearest problem. For a routing replacement, agree on a scoped pilot and judge the complete task result.

The [Martian switching guide](/switch/martian) covers upstream aliases, direct-provider test configuration, and rollback. [The measurement guide](/guides/measure-agent-cost) defines the evidence needed to call the result cheaper.

Sources: [Martian LiteLLM integration](https://docs.withmartian.com/integrations/litellm), [RouterBench](https://withmartian.com/post/introducing-routerbench), and [Caveman LiteLLM integration](/switch/litellm).
