patchInferencePolicy

Update the models a project allows and denies and its default model, replacing each key sent; returns the policy. Requires project.settings.manage.

Arguments

  • projectReferenceString!required

    Project ID or slug.

  • inputPatchInferencePolicyInput!required

  • input.modelsModelRuleInput

  • input.defaultModelString

    Default model of the project. It must be allowed by the project's and its account's policy. Null uses the account default.

  • input.allowProviderKeyDirectRoutesBoolean

    Lets 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.

Responses

mutation PatchInferencePolicy($projectReference: String!, $input: PatchInferencePolicyInput!) {  patchInferencePolicy(projectReference: $projectReference, input: $input) {    projectId    configured    enforced    createdAt    updatedAt    updatedBy    models {      allowed      denied    }    defaultModel    allowProviderKeyDirectRoutes    account {      defaultModel    }    effective {      defaultModel    }  }}
{  "data": {    "patchInferencePolicy": {      "projectId": "string",      "configured": false,      "enforced": false,      "createdAt": "string",      "updatedAt": "string",      "updatedBy": "string",      "models": {        "allowed": [          "string"        ],        "denied": [          "string"        ]      },      "defaultModel": "string",      "allowProviderKeyDirectRoutes": false,      "account": {        "defaultModel": "string"      },      "effective": {        "defaultModel": "string"      }    }  }}

The InferencePolicy! in data.patchInferencePolicy.