---
title: "Update virtual model config"
method: PATCH
path: "/v1/ai-gateway/virtual-model-configs"
tags: ["api-ai-gateway"]
---

# Update virtual model config

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

Update a virtual model config

## Query parameters

- `teamId` string
- `slug` string

## Response `200`

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

## Other responses

- `400`
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `404`
- `410`
- `500`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/revisions/6ed5b7605027/schema)
