Skip to content

Model providers

Maku is model-agnostic: maku-gateway ships presets for OpenAI-compatible and Anthropic-compatible APIs (Anthropic, Z.ai, Moonshot Kimi, Mistral, OpenAI, Gemini, Vertex AI, or any custom self-hosted endpoint; see The model gateway). Every run asks for agent-default unless its workflow selects another alias per role or a maintainer pins one task with a model:<alias> label, and each run’s cost is metered at the served model’s configured price in meter.prices (Budgets).

Data-class separation

Each repository and task carries a data class: public or internal. Providers approved only for public repositories are isolated structurally across three layers:

  1. Gateway listeners: maku-gateway exposes separate public (:8080) and internal (:8081) listeners with distinct JWT audiences (maku-gateway.public.<alias> vs maku-gateway.internal.<alias>). A public-only alias does not exist on the internal listener.
  2. Run admission: maku-run-controller refuses an internal AgentRun that names a public-only provider alias (Roles).
  3. Factory config validation: maku-factory applies public-only per-role overrides to public tasks only.

Example (the ai-native-ref reference deployment): agent-default maps to GLM on Z.ai for public tasks and Claude on the Anthropic API for internal tasks, with Moonshot Kimi, Mistral, and Gemini on Vertex AI (on Google Cloud) configured as opt-in public-only aliases:

AliasModel (reference example)TierProcessed in
kimi-frontierKimi K3.1 Pro (k3.1-pro)frontierChina
mistral-standardMistral Medium 3.5 (mistral-medium-2604)standardEU
mistral-lightMistral Small 4 (mistral-small-2603)lightEU
gemini-standardGemini 4 Neon (gemini-4-neon), on Vertex AIstandardEU (Vertex eu multi-region)
gemini-lightGemini 4 Hydrogen (gemini-4-hydrogen), on Vertex AIlightEU (Vertex eu multi-region)

Field note from live runs: Mistral is not recommended as an implementer because it can spend a run’s full token budget on a small change. The harness is chosen separately: OpenCode by default unless a maintainer labels the task harness:openhands (OpenCode harness).

Selecting a second provider per role

A workflow can run its reviewer (or judge) on a second model family so correlated mistakes do not slip past review (ADR-0058). Configure models.<role> on a workflow in your Factory resource:

workflows:
  standard:
    models: {reviewer: kimi-frontier}
RuleWhy
Each alias serves its own tier only; config load refuses cross-tier mismatchesRun caps stay aligned with the tier and the gateway’s hourly rate limit
Any role without an override keeps the default aliasNo unintended change to existing workflows
An implementer stage’s judge may name a light alias (for example mistral-light)Judges run a single fresh-context check
Every served model has a row in meter.prices (including cache reads)Dollar caps and spend attribution stay accurate

A run never switches model mid-conversation, and there is no automatic failover to another provider: a provider 429 ends the run cleanly rather than silently moving data to a different processor.

Provider quirk (Mistral): agentgateway v1.6 expects Chat Completions content as a string, whereas Mistral reasoning models return structured content chunks; maku-gateway’s Mistral preset forces reasoning_effort: "none".

Keyless Gemini on Vertex AI: maku-gateway can call Vertex AI using GKE Workload Identity with no API key in a Secret. A task pinned to a Gemini/Vertex alias runs on OpenHands (with one comment explaining why) until agentgateway translates OpenCode’s exclusive tool-schema bounds (maku#798).

Hosted APIs vs self-hosted models

Hosted frontier APIs are faster to adopt, cheaper at moderate volume, and stronger on hard coding tasks. Self-hosted open-weights serving (such as vLLM on cluster GPUs) makes sense when you need:

  • Zero external egress: prompts never leave your cluster network.
  • Weight pinning: model weights are pinned to an exact commit SHA rather than silently updated by a vendor.
  • Dedicated latency: warm in-cluster replicas for sub-200 ms editor tab completion.

For a full GitOps reference stack that pairs Maku with self-hosted GPU model serving on Kubernetes (including autoscaling and the four-GPU cost floor), see AI Native Reference › Model serving.