Use case

How to restrict which AI models one workflow can use

Not every model in your stack should be reachable from every workflow.

Give the workflow its own x-agent-id, then create a model_block policy (or model_allow entries) scoped to that agent. A call from that workflow that names a disallowed model, or would be served one after a reroute, is refused with HTTP 403 before it reaches the provider.

How it works

Policies are checked in the request path alongside budgets. A policy can be scoped to an agent_id, customer_id or agent_name, or left unscoped for the whole account. Both the requested model and the model that would actually serve the call are checked, so a reroute cannot turn a forbidden model into an allowed one. A call with no attribution at all is held to every scoped policy on the account, so leaving the header off is not a way around a rule.

Sample policy (illustrative)
{
  "name": "No pro model in triage",
  "type": "model_block",
  "model": "gpt-5.2-pro",
  "match_mode": "exact",
  "scope": { "agent_id": "ticket-triage" }
}

What to know before relying on it

Policies apply only to calls routed through Spendline, and they match on model names you configure, so a new model with a different name is not covered until you add it to a block or allow list.

Why it matters

A budget alone lets a workflow spend its allowance on the most expensive model available. A scoped block or allow list refuses the model for exactly that workflow.

Frequently asked questions

What does a blocked call return?

HTTP 403 before the request reaches the provider. The body carries code: model_blocked or code: model_not_allowed, the policy that refused it and its scope.

What happens when a scoped block and a reroute disagree?

The block wins. A call is refused if either the requested model or the model a reroute would serve is forbidden for that scope.

See what this would look like in your product.

Start with a guided 30-day free pilot on live production traffic. The 30 days start when your traffic flows through Spendline, not at sign-up. We agree the scope, success criteria and paid terms before you start. There is no Spendline subscription fee during the pilot; your model-provider charges still apply.

Prefer email? fida@spendline.ai