giip
PartnersSES Proposal
5 min read

gair model policy screen (per user)

How to block the gair models you do not want to use and pick a replacement model for each one. An unchecked model is not executed by your gair calls — the selected fallback model runs instead.

📋 Overview

This screen is where each user blocks the models gair must not run for them.

  • Who can use it: you, once signed in. This screen shows only your own policy — you can neither see nor change anyone else's.
  • What is the default: every model is checked (all allowed). With nothing saved, calls behave exactly as before.
  • What happens when you uncheck a model: your gair calls do not run that model. The fallback model runs instead, and the substitution is recorded in the usage log.
  • What about models blocked for the whole organization: they are a floor and cannot be re-enabled here. They show up as "blocked by the organization" and are locked. The organization policy is managed in the admin console.

🤖 Open my model policy →

🚀 Quick start

  1. Click Open my model policy on the gair introduction page (/gair), or open the gair model policy entry on your profile page.
  2. Uncheck the models you do not want to use.
  3. Choose a fallback model on that row (optional).
  4. Click Save.

📊 Details

1. The model list

ItemDescription
ListThe models the gair router actually knows. It is produced by the same catalog function the router uses, so the screen list and the router list never drift apart.
AllowedChecked — the model may be used (default).
Blocked for meUnchecked — the model is not used by your gair calls.
Blocked by the organizationBlocked for the whole organization. It cannot be re-enabled (locked).
Fallback modelThe model that runs instead of the blocked one. Choices are the other models in the list that the organization has not blocked.

2. If you do not pick a fallback

Saving without a fallback model is fine. The router then picks an allowed model of the same kind automatically (for example, a code-oriented call falls back to a code model).

A designated fallback that is itself blocked is not an error either. The router walks one step further to that model's own fallback and keeps going until it finds an allowed model.

3. Where your setting is stored

Per user (usn) and their organization (csn).

ItemContent
StoragetGairUserModelPolicy — one row per blocked model per user
Key(csn, usn, modelId)
DefaultNo row means the model is allowed (all allowed)

4. How the organization policy and yours are combined

The router applies the organization policy first and your policy on top of it.

  1. A model the organization blocked stays blocked — your policy cannot re-enable it.
  2. A model you blocked is blocked; its fallback is the one you picked, or an automatic pick when you did not pick one.
  3. If both you and the organization block the same model and the organization also named a replacement, the organization's replacement is used.

5. How it affects a call

  1. The gair router decides the execution model for the request.
  2. If that model is on the blocked list, it is replaced with the fallback model.
  3. The substituted request still succeeds — the caller never gets an error.
  4. The usage log keeps the originally judged model, the model actually executed, and the policy layer that applied (organization / yours) separately.

That is why "requested model" and "executed model" can differ in the usage log.

6. When this screen does not apply

When a gair call arrives with a project secret key (SK), gair cannot identify the user — the SK carries no user information. In that case only the organization policy applies and the setting you chose here is not applied. Your setting applies to calls that arrive with your own session token.

❓ Troubleshooting

SymptomWhat to check
The list is emptyCheck that you are signed in. Without a session the screen does not query.
Saving failedRead the reason shown on screen. Saving is rejected when a model is not in the list or when a model is mapped to itself as fallback.
I want to re-enable a model the organization blockedNot from this screen. The organization policy is managed in the admin console.
Saved, but calls are unchangedCheck whether those calls arrive with a project secret key (SK). The SK path applies the organization policy only.

🔌 API reference

MethodPathDescription
GET/api/gair/v1/user/model-policyModel list + your blocked list + fallback mapping + organization floor list
POST/api/gair/v1/user/model-policySave your blocked list and fallback mapping

Authentication uses your own session token (x-api-key header). Nobody else's policy can be read or written through this API — the server derives the user from the token. The secret key (SK) never passes through this screen.

📌 Metadata

ItemValue
Screen path/[locale]/settings/gair-model-policy
Entry pointsgair introduction page (/gair) · profile page (/profile)
Related issuegiip #7283
Server APIgiipfaw giipAiUserModelPolicy · giipdb pApiGairUserModelPolicybyAK
StoragetGairUserModelPolicy — (csn, usn, modelId)
Permissionsyour own session only