Skip to main content

Model Validation

By default, only models defined through model_price are allowed.

allow_unknown_models_pass_through false;
model_price gpt-4o-mini-2024-07-18 0.15 0.60;

Unknown models are rejected before cache lookup or upstream forwarding. Model discovery through GET /v1/models does not automatically add models to this allowlist.

Model discovery and validation​

AIF v0.8.2 proxies GET /v1/models to the configured chat upstream. This is discovery only. When allow_unknown_models_pass_through false; is active, a model returned by /v1/models still needs a matching model_price entry before POST /v1/chat/completions requests using that model are accepted.

Pass-through mode​

allow_unknown_models_pass_through true;

In this mode, unknown models are forwarded upstream, but cost tracking is not applied for them.

Exact model names​

If upstream returns:

gpt-4o-mini-2024-07-18

the config must include the exact same name.