Bosphorus

← Knowledge base

How a request is checked: limits, policy and teams

The order Bosphorus checks every request in, what each check counts against, which team governs an aimo chat, and what 0 means for every limit.

GovernanceLimitsTeamsPolicyChecked against the product on

Every request that reaches a model through Bosphorus passes a fixed series of checks first: who is calling, which models they may use, the policy engine, the team’s token budget, the key’s and the person’s rate limits, and the team’s concurrency. This article lists the checks in the order they run, says what each one counts against, and explains how a team that holds people as well as keys decides whose limits apply.

Everything below was checked against the running product on 16 October 2026.

At a glance

Who does what

Who What they do
Administrator Creates teams, adds people and keys to them, and sets each team’s concurrency and token budget, each key’s rates and each person’s quota profile on Teams & keys. Sets the policy posture on Policies.
Each person Nothing to configure. They see a refusal as a normal reply in the chat workspace, or as a status code in their own programs.

The checks, in order

# Check Counts against Set on Refused as
1 Who is calling Key and person Teams & keys, Access 401, or 403 user_not_admitted
2 Size and shape — — 413 request_too_large, or 400
3 Allowed models Person, key, team Teams & keys → Model profiles 403 model_not_allowed
4 Policy Key, person, team Policies 403 policy_denied
5 Model available — Providers 503 no_node
6 Team token budget Team Teams & keys 429
7 Key rate limit Key Teams & keys 429 with retry-after
8 Person rate limit Person (chat workspace only) Teams & keys → Users & quotas 429
9 Team concurrency Team Teams & keys 429 after 30 seconds

After the last check the request is sent to the model, the real token count is settled, and the answer is scanned. Each step is described below.

Who is calling, and size and shape

The key in the Authorization header is looked up first. The person behind it comes from the key itself when it is a personal key, from the chat workspace’s signed identity, or from a sign-in token. A person who is pending approval, suspended or not entitled to the platform is refused here. The body is then read with a 16 MiB cap, counted as it arrives, so an oversized upload is refused part-way rather than read whole. A request with no model or no messages is refused before any other check runs.

Allowed models

One model profile applies to each request: the most specific one that is set, in the order person, then key, then team, then the profile named default. Profiles never combine. An empty list allows every model, and the platform’s own help assistant is always allowed. A profile can also suggest a default model for the picker; that is a suggestion, never a check.

The answer is held until after the policy check, so a policy refusal is reported first and works even when no model is online.

Policy

The policy engine reads the whole conversation, not just the last message. An administrator can switch a ruleset off or into shadow mode, and exempt or target teams, on Policies. Clearing the OPA checks box on a key skips the engine for that key; clearing it on a person skips it for that person’s chat-workspace conversations. Either skip is written down. If the engine cannot be reached, the installation’s setting decides: by default the request continues and the outage is recorded. When only an older message in a conversation is flagged, that message is blanked and the conversation continues. Policy guardrails lists every rule.

Team token budget

The team’s budget covers a rolling 24 hours: the tokens already logged, plus what the requests still running are expected to use. That estimate is the request’s max_tokens (600 when none is sent, at most 32,768), and it is settled to the real count when the request ends. A budget of 0 means no budget.

Rate limits: per key, then per person

Each key has requests per minute and tokens per minute over a 60-second window. The request slot and the token estimate are claimed together, so a burst cannot slip past, and a claim is given back if a later check refuses. Refusals carry x-ratelimit-* headers and retry-after.

Every chat-workspace user arrives on one shared service key, so each person there also gets their own window, taken from their quota profile. Personal keys and API keys are not limited per person; the key’s own limit covers them.

Concurrency and priority

Max concurrent is the number of a team’s requests that may run at once, across every gateway replica. Others wait up to 30 seconds for a slot and are then refused. A streamed answer holds its slot until the stream ends. It is at least 1; a team with no quota of its own gets 4.

Priority does not rank one team against another today. Each team has its own pool of slots and its own line of waiting requests, so two teams never compete for the same slot, and every request in one team’s line carries that team’s priority. Waiting requests are therefore served first come, first served. The value is still passed to the policy engine as identity.priority, where a rule could read it.

After the model answers

If a node on your own hardware fails before it sends its first byte, the request moves to another node without being charged a second time. The estimates from the budget and the rate limits are settled to the real token count, and usage and cost are written under the governing team, the key and the person. The answer is then scanned against the policy’s content rules. That scan records what it finds and never blocks, because the answer has already been delivered.

What a chat-workspace user sees

The chat workspace locks a conversation whose last answer was an error. So for people chatting there, a refusal arrives as a normal assistant reply: ⛔ for a policy or model refusal, ⏳ for a budget, rate or concurrency refusal, ⚠️ for anything else. The reply carries X-GpuPool-Error and X-GpuPool-Error-Status headers, and the activity log records the real refusal. API callers always get the status code.

Which team governs a request

Checks 3, 4, 6 and 9, and the usage report, use one team: the governing team. It is the API key’s team, unless the request is a chat-workspace conversation by someone who is in a team of their own. The first rule that matches decides:

  1. No person behind the request, such as a script on a service key: the key’s team.
  2. The key is the person’s own (the editor extension, an agent, a personal key on My variables): the key’s team. A person’s own keys move with them when they join a team, so this is their team anyway.
  3. The person arrived some other way than the chat workspace’s signed identity: the key’s team.
  4. The person has no team, is in default, or is in the key’s own team: the key’s team.
  5. Otherwise, a chat-workspace conversation by a person in a team of their own: the person’s team.

On Teams & keys, each team card lists its members. Add member takes a person’s e-mail address, and Remove from team… in a member’s ⋯ menu returns them to default; their own active keys move with them both ways. A service key moves on its own with Move to team…. The Users & quotas tab has a team selector on every row.

Four examples, with a team called Field Engineering that has 4 slots:

Who Governing team Why
A member of Field Engineering chats in the chat workspace Field Engineering Its budget, its 4 slots and its model profile apply, and the usage report counts the chat there.
The same person uses the editor extension Field Engineering Their personal key moved into the team when they were added.
A script on the team’s service key Field Engineering No person, so the key’s team.
Someone with no team chats in the chat workspace The chat workspace’s own team Everyone not in a team shares it.

Two consequences to plan for. A model profile set on the chat workspace’s service key outranks every person’s team profile, because the key comes before the team: leave that key’s profile empty and put platform-wide restrictions on default. And a new team with a budget of 0 and no profile gives its members no budget limit and the default profile, even when the chat workspace’s own team is stricter. An installation can also switch this behaviour off, after which every check uses the key’s team.

What 0 and empty mean

Setting Where 0 or empty means
Team max concurrent Teams & keys, team card Saved as 1, never 0. A team with no quota of its own gets 4.
Team token budget / 24h Teams & keys, team card No budget limit.
Key requests and tokens per minute Teams & keys, key row No limit.
Quota profile requests and tokens per minute Teams & keys → Users & quotas No limit.
Model profile’s list of models Teams & keys → Model profiles Every model.
Connector profile’s list Connectors No connectors.
OPA checks cleared on a key or a person Teams & keys The policy engine is skipped for that key or person, and the skip is logged.
Team priority Teams & keys, team card No effect today, at any value.

Three profile chains

Profile Order, first match wins What it decides
Model profile Person → API key → governing team → default Which models can be used. An empty list allows all.
Quota profile Person → default Each chat-workspace person’s requests and tokens per minute.
Connector profile Person → person’s team → API key → key’s team → default Which personal connectors, such as OneDrive, are offered. An empty list offers none.

The other routes

The order above is the chat route. The Ollama-style and Anthropic-format routes translate the request and call the chat route, so they pass every check. The others differ:

Route Model profile Policy Team budget Key limit Person limit Concurrency
Chat, Ollama-style, Anthropic-format Yes Yes Yes Yes Chat workspace only Yes
Embeddings Yes Yes Yes Yes No Yes
Speech to text Yes No No Requests only Chat workspace, requests only Yes
MCP tool calls — Tool arguments No No No No

MCP servers are scoped to the API key’s team, not the person’s, and to the people and keys an administrator grants each server.