Update inference policy models

patchInferencePolicy(projectReference: String!, input: PatchInferencePolicyInput!): InferencePolicy!

Requires project.settings.manage.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!YesProject ID or slug.
inputPatchInferencePolicyInput!Yes

Input fields

input

PatchInferencePolicyInput

FieldTypeRequiredDescription
modelsModelRuleInputNo
defaultModelStringNoDefault model of the project. It must be allowed by the project's and its account's policy. Null uses the account default.
allowProviderKeyDirectRoutesBooleanNoLets the account's saved provider keys call their provider directly although the project states no tier: the default EU floor is waived on those routes only. Every stated requirement still applies. Omit to keep the stored value.

Response

Returns InferencePolicy!. Open the type for its fields and nested types.

FieldTypeDescription
projectIdID!
configuredBoolean!Whether the project states a policy. False returns the defaults the project is served under: EU-only, with an eu-resident minimum tier, while the EU default is on; every allowed model once it has ended.
enforcedBoolean!
createdAtString
updatedAtString
updatedByID
modelsModelRule!Models the project itself allows and denies. They only narrow its account.
defaultModelStringThe project's own default model. Null uses the account default, then the built-in default.

All fields of InferencePolicy.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

query.graphql
mutation PatchInferencePolicy($projectReference: String!, $input: PatchInferencePolicyInput!) {  patchInferencePolicy(projectReference: $projectReference, input: $input) {    projectId    createdAt    updatedAt    allowProviderKeyDirectRoutes    configured  }}
variables.json
{  "projectReference": "00000000-0000-4000-8000-000000000001",  "input": {}}