pub(super) fn spends_through_gateway(state: &AppState, def_id: &str) -> bool
Whether the agent’s requests go through the gateway and are counted there: it is on a model route, or on an API key.