gair per-CSN blocked model settings screen
How the gair admin console lets you specify, per project (CSN), the models that must not be used. An unchecked model is not executed for that project's gair calls — the selected fallback model runs instead.
📋 Overview
This screen is where an admin blocks models per project (CSN).
- Who can use it: admins (uLevel 70+) who also have access to the target CSN. Without the permission you get an access-denied notice instead of the list.
- What is the default: every model is checked (all allowed). A CSN with no saved setting behaves exactly as before.
- What happens when you uncheck a model: that model is not executed for that CSN's gair calls. The fallback model runs instead, and the substitution is recorded in the usage log.
- Related screens: CSN access allow/revoke and SK registration live in the other panels of the same screen. Usage is in the gair usage stats screen.
🚀 Quick start
- Open the gair access admin tile in the Configuration group of the admin page (
/admin). - In the per-CSN blocked model settings panel, pick the target CSN.
- Uncheck the models you do not want and choose a fallback model on that row.
- Click Save.
📊 Details
1. The model list
| Item | Description |
|---|---|
| List | The 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. |
| Allowed | Checked — the model may be used (default). |
| Blocked | Unchecked — the model is not used for that CSN. |
| Fallback model | The model that runs instead of the blocked one. Choices are the other models in the same list. |
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 it is stored
The setting is saved as two entries of the target CSN's gair settings.
| Setting key | Content |
|---|---|
blocked_models | The list of blocked models |
blocked_model_fallbacks | The blocked-model → fallback-model mapping |
The setting applies per CSN only. There is no global value — a CSN with no setting keeps using every model, exactly as before.
4. How it affects a call
- The gair router decides the execution model for the request.
- If that model is on the blocked list, it is replaced with the fallback model.
- The substituted request still succeeds — the caller never gets an error.
- The usage log keeps the originally judged model and the model actually executed separately.
That is why "requested model" and "executed model" can differ in the usage log.
❓ Troubleshooting
| Symptom | What to check |
|---|---|
| The list is empty | Make sure a target CSN is selected and that you have admin rights plus access to that CSN. |
| Saving failed | Read the reason shown on screen. Saving is rejected when a model is not in the catalog or when a model is mapped to itself as fallback. |
| Saved, but calls are unchanged | Check that the calls for this CSN arrive with that project's SK. This setting is per CSN. |
| I want to confirm a substitution | In the gair usage stats screen, look for rows where the original model and the executed model differ. |
🔌 API reference
| Method | Path | Description |
|---|---|---|
| GET | /api/gair/v1/admin/model-policy?csn=N | Model list + current blocked list + fallback mapping |
| POST | /api/gair/v1/admin/model-policy | Save the blocked list and fallback mapping |
Authentication uses the admin session token (x-api-key header). The secret key (SK) never passes through this screen.
📌 Metadata
| Item | Value |
|---|---|
| Screen path | /[locale]/admin/gair-access |
| Related issue | giip #7193 |
| Server API | giipfaw giipAiModelPolicy · giipdb pApiGairModelPolicyAdminbyAK |
| Storage | tSystemParameter(category='gair') — blocked_models · blocked_model_fallbacks |
| Permissions | admin (uLevel 70+) plus access to the target CSN |