Skip to main content

agentmux_srv_core/backend/model_gateway/
mod.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Model routes and the gateway (`docs/specs/SPEC_AGENT_MODEL_ROUTES_ANY_MODEL_SPAWN_AND_SWITCH_2026_11_06.md`).
5//!
6//! An agent runs a harness on a model route with a key. A route is an entry in [`catalog`]; its key is
7//! a Vault entry that never leaves srv. The harness is pointed at `/api/v1/model/<route>/...` with a
8//! per-agent token ([`token`]), and the handler (`server::model_gateway_handlers`) adds the real key
9//! upstream, streams the answer back, and counts what each agent used ([`spend`], [`usage`]).
10
11pub mod ask;
12pub mod bedrock;
13pub mod chat_adapter;
14pub mod cap;
15pub mod catalog;
16pub mod launch;
17pub mod pending_route;
18pub mod request;
19pub mod spend;
20pub mod switch;
21pub mod token;
22pub mod trial;
23pub mod usage;
24
25/// The path prefix the gateway is served under; the route id and the harness's own path follow.
26pub const PATH_PREFIX: &str = agentmux_common::gateway_stamp::PATH_PREFIX;