---
title: update-virtual-model-config
product: vercel
url: /docs/rest-api/api-ai-gateway/update-virtual-model-config
canonical_url: "https://vercel.com/docs/rest-api/api-ai-gateway/update-virtual-model-config"
last_updated: 2026-08-12
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about update-virtual-model-config on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Update virtual model config

```http
PATCH /v1/ai-gateway/virtual-model-configs
```

Update a virtual model config

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "description": "Public response shape for virtual model configs. Used so OpenAPI generation can avoid ElectroDB's recursive EntityItem types.",
  "required": [
    "createdAt",
    "deleted",
    "kind",
    "ownerId",
    "status",
    "updatedAt",
    "virtualModelSlug"
  ],
  "properties": {
    "ownerId": {
      "type": "string",
      "description": "Team (owner) that owns this VMC."
    },
    "virtualModelSlug": {
      "type": "string",
      "description": "Client-facing alias used as the model slug in Gateway calls."
    },
    "displayName": {
      "type": "string",
      "description": "Human-readable name for UI."
    },
    "description": {
      "type": "string",
      "description": "Optional description for UI."
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether this VMC is soft-deleted.",
      "enum": [
        false,
        true
      ]
    },
    "status": {
      "type": "string",
      "description": "UI lifecycle status: draft, active, or archived."
    },
    "visibility": {
      "type": "string",
      "description": "Visibility in listings: public, internal, or stealth."
    },
    "updatedBy": {
      "type": "string",
      "description": "User id that last updated this VMC."
    },
    "kind": {
      "type": "string",
      "description": "VMC kind: alias, relay, or router."
    },
    "baseUrl": {
      "type": "string",
      "description": "For kind=relay: URL the gateway forwards requests to as a transparent proxy."
    },
    "instanceId": {
      "type": "string",
      "description": "The concrete model-provider instance this VMC resolves to."
    },
    "providerOrder": {
      "type": "array",
      "description": "Ordered list of providers to try as fallbacks on failure.",
      "items": {
        "type": "string"
      }
    },
    "providerOnly": {
      "type": "array",
      "description": "Restrict routing to only these providers.",
      "items": {
        "type": "string"
      }
    },
    "inferenceRegion": {
      "type": "object",
      "description": "Region pinned on the VMC for system-credential routing (alias/router only).",
      "properties": {
        "providers": {
          "type": "object",
          "description": "Per-provider region overrides keyed by provider slug.",
          "additionalProperties": {
            "type": "object",
            "description": "Per-provider region overrides keyed by provider slug.",
            "nullable": true
          }
        },
        "scope": {
          "type": "string",
          "description": "Pin scope: `specific` (one provider region), `zone` (geo zone), or `global`.",
          "enum": [
            "global",
            "specific",
            "zone"
          ]
        },
        "geoRegion": {
          "type": "string",
          "description": "Geo zone (e.g. \"us\", \"eu\")."
        },
        "providerRegion": {
          "type": "string",
          "description": "Provider-specific region identifier."
        }
      }
    },
    "modelSlug": {
      "type": "string",
      "description": "Canonical model slug this VMC maps to (e.g. \"creator/model\"). Not used by kind=router."
    },
    "models": {
      "type": "array",
      "description": "For kind=router: ordered candidates, model slugs or router references. Otherwise: fallback models.",
      "items": {
        "type": "string"
      }
    },
    "selector": {
      "type": "string",
      "description": "For kind=router: how to order candidates.",
      "enum": [
        "cost",
        "priority",
        "tps",
        "ttft"
      ]
    },
    "requires": {
      "type": "array",
      "description": "For kind=router: capability tags a candidate must have.",
      "items": {
        "type": "string"
      }
    },
    "byokCredentialIds": {
      "type": "array",
      "description": "BYOK credential IDs allowed for this VMC.",
      "items": {
        "type": "string"
      }
    },
    "observabilityTags": {
      "type": "array",
      "description": "Observability tags attached to requests through this VMC.",
      "items": {
        "type": "string"
      }
    },
    "sort": {
      "type": "string",
      "description": "Rank eligible providers by an attribute.",
      "enum": [
        "cost",
        "latency",
        "price",
        "throughput",
        "tps",
        "ttft"
      ]
    },
    "has": {
      "type": "array",
      "description": "Limit providers to those with these features.",
      "items": {
        "type": "string",
        "description": "Limit providers to those with these features.",
        "enum": [
          "implicit-caching",
          "vision"
        ]
      }
    },
    "caching": {
      "type": "string",
      "description": "Use caching if available.",
      "enum": [
        "auto"
      ]
    },
    "serviceTier": {
      "type": "string",
      "description": "Service tier for providers that support it.",
      "enum": [
        "fast",
        "flex",
        "priority"
      ]
    },
    "providerTimeouts": {
      "type": "object",
      "description": "Per-request provider timeouts in ms, keyed by provider slug for BYOK credentials.",
      "properties": {
        "byok": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        }
      }
    },
    "zeroDataRetention": {
      "type": "boolean",
      "description": "Only use providers with zero data retention.",
      "enum": [
        false,
        true
      ]
    },
    "hipaaCompliant": {
      "type": "boolean",
      "description": "Only use HIPAA-compliant providers.",
      "enum": [
        false,
        true
      ]
    },
    "disallowPromptTraining": {
      "type": "boolean",
      "description": "Only use providers that will not train on your prompts.",
      "enum": [
        false,
        true
      ]
    },
    "speed": {
      "type": "string",
      "description": "Only use fastest providers with short timeouts.",
      "enum": [
        "fast"
      ]
    },
    "allowFallbackFromFast": {
      "type": "boolean",
      "description": "Allow fallback from fast to standard providers on failure.",
      "enum": [
        false,
        true
      ]
    },
    "createdAt": {
      "type": "number",
      "description": "Creation timestamp (epoch ms)."
    },
    "updatedAt": {
      "type": "number",
      "description": "Last update timestamp (epoch ms)."
    }
  }
}
```

### 400: No description

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

### 500: No description

---

## Related

- [api-ai-gateway endpoints](/docs/rest-api#api-ai-gateway)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
