pydo.genai.update_model_router()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.genai.update_model_router(
    uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    body={
        "description": "\"My Model Router Description\"",
        "fallback_models": [...],
        "name": "\"my-model-router\"",
        ...,
    },
)
Returns JSONRaises HttpResponseError

Description

To update a model router, send a PUT request to /v2/gen-ai/models/routers/{uuid}.

Parameters

uuid string required

Model router id

description string optional

Example: "My Model Router Description"

Model router description

fallback_models array of objects optional
name string optional

Example: "my-model-router"

Model router name: lowercase, at most 255 characters, only a-z, 0-9, and hyphens

policies array of objects optional

Router policies

Show child properties
custom_task object optional

Task definition embedded in a model router config.

Show child properties
description string optional

Example: "Summarize long-form text"

Short task description

name string optional

Example: "Custom Summarization"

Task name

models array of strings optional

Example: ['example string']

Models assigned to the task

selection_policy object optional

Selection policy preference for choosing among assigned models.

Show child properties
prefer string optional

Example: "cheapest"

One of: none, cheapest, fastest

task_slug string optional

Example: "summarization"

Task slug

regions array of strings optional

Example: ['example string']

DEPRECATED: this field does not affect deployment and model routers are always
deployed to all regions. Must be omitted or set to ["all"].

uuid string optional

Example: "12345678-1234-1234-1234-123456789012"

Model router id

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "description": "\"My Model Router Description\"",
  "fallback_models": [],
  "name": "\"my-model-router\"",
  "policies": [
    {
      "models": [
        "example string"
      ],
      "task_slug": "\"summarization\""
    }
  ],
  "regions": [
    "example string"
  ],
  "uuid": "\"12345678-1234-1234-1234-123456789012\""
}

resp = client.genai.update_model_router(uuid="\"123e4567-e89b-12d3-a456-426614174000\"", body=req)

Response Example

Show Response Example
{
  "model_router": {
    "config": {
      "fallback_models": [
        "example string"
      ],
      "policies": []
    },
    "created_at": "2023-01-01T00:00:00Z",
    "description": "example string",
    "name": "example name",
    "regions": [
      "example string"
    ],
    "updated_at": "2023-01-01T00:00:00Z",
    "uuid": "123e4567-e89b-12d3-a456-426614174000"
  }
}

More Information

See /v2/gen-ai/models/routers/{uuid} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.