{
  "db_name": "PostgreSQL",
  "query": "\n        UPDATE deployed_models SET\n            model_name   = COALESCE($2, model_name),\n            alias        = COALESCE($3, alias),\n            description  = CASE\n                WHEN $4 THEN $5\n                ELSE description\n            END,\n\n            -- Three-state update for model_type\n            type = CASE\n                WHEN $6 THEN $7\n                ELSE type\n            END,\n\n            -- Three-state update for capabilities\n            capabilities = CASE\n                WHEN $8 THEN $9\n                ELSE capabilities\n            END,\n\n            status     = COALESCE($10, status),\n            last_sync  = CASE\n                WHEN $11 THEN $12\n                ELSE last_sync\n            END,\n            deleted    = COALESCE($13, deleted),\n\n            -- Three-state update for rate limiting\n            requests_per_second = CASE\n                WHEN $14 THEN $15\n                ELSE requests_per_second\n            END,\n            burst_size = CASE\n                WHEN $16 THEN $17\n                ELSE burst_size\n            END,\n\n            -- Three-state update for capacity\n            capacity = CASE\n                WHEN $18 THEN $19\n                ELSE capacity\n            END,\n            batch_capacity = CASE\n                WHEN $20 THEN $21\n                ELSE batch_capacity\n            END,\n\n            -- Three-state update for throughput\n            throughput = CASE\n                WHEN $37 THEN $38\n                ELSE throughput\n            END,\n\n            -- Individual field updates for provider/downstream pricing\n            downstream_pricing_mode = CASE\n                WHEN $22 THEN $23\n                ELSE downstream_pricing_mode\n            END,\n            downstream_input_price_per_token = CASE\n                WHEN $24 THEN $25\n                ELSE downstream_input_price_per_token\n            END,\n            downstream_output_price_per_token = CASE\n                WHEN $26 THEN $27\n                ELSE downstream_output_price_per_token\n            END,\n            downstream_hourly_rate = CASE\n                WHEN $28 THEN $29\n                ELSE downstream_hourly_rate\n            END,\n            downstream_input_token_cost_ratio = CASE\n                WHEN $30 THEN $31\n                ELSE downstream_input_token_cost_ratio\n            END,\n\n            -- Composite model fields\n            lb_strategy = COALESCE($32, lb_strategy),\n            fallback_enabled = COALESCE($33, fallback_enabled),\n            fallback_on_rate_limit = COALESCE($34, fallback_on_rate_limit),\n            fallback_on_status = COALESCE($35, fallback_on_status),\n            sanitize_responses = COALESCE($36, sanitize_responses),\n            fallback_with_replacement = COALESCE($39, fallback_with_replacement),\n            fallback_max_attempts = CASE\n                WHEN $40 THEN $41\n                ELSE fallback_max_attempts\n            END,\n            trusted = COALESCE($42, trusted),\n            open_responses_adapter = COALESCE($43, open_responses_adapter),\n\n            -- Batch completion windows\n            allowed_batch_completion_windows = CASE\n                WHEN $44 THEN $45\n                ELSE allowed_batch_completion_windows\n            END,\n\n            -- Catalog metadata\n            metadata = CASE\n                WHEN $46 THEN $47\n                ELSE metadata\n            END,\n\n            display_name = COALESCE($48, display_name),\n\n            updated_at = NOW()\n        WHERE id = $1\n        RETURNING *\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "model_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "alias",
        "type_info": "Varchar"
      },
      {
        "ordinal": 3,
        "name": "description",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "type",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "capabilities",
        "type_info": "TextArray"
      },
      {
        "ordinal": 6,
        "name": "created_by",
        "type_info": "Uuid"
      },
      {
        "ordinal": 7,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "updated_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "status",
        "type_info": "Varchar"
      },
      {
        "ordinal": 10,
        "name": "last_sync",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 11,
        "name": "deleted",
        "type_info": "Bool"
      },
      {
        "ordinal": 12,
        "name": "hosted_on",
        "type_info": "Uuid"
      },
      {
        "ordinal": 13,
        "name": "requests_per_second",
        "type_info": "Float4"
      },
      {
        "ordinal": 14,
        "name": "burst_size",
        "type_info": "Int4"
      },
      {
        "ordinal": 15,
        "name": "downstream_pricing_mode",
        "type_info": "Varchar"
      },
      {
        "ordinal": 16,
        "name": "downstream_input_price_per_token",
        "type_info": "Numeric"
      },
      {
        "ordinal": 17,
        "name": "downstream_output_price_per_token",
        "type_info": "Numeric"
      },
      {
        "ordinal": 18,
        "name": "downstream_hourly_rate",
        "type_info": "Numeric"
      },
      {
        "ordinal": 19,
        "name": "downstream_input_token_cost_ratio",
        "type_info": "Numeric"
      },
      {
        "ordinal": 20,
        "name": "capacity",
        "type_info": "Int4"
      },
      {
        "ordinal": 21,
        "name": "batch_capacity",
        "type_info": "Int4"
      },
      {
        "ordinal": 22,
        "name": "is_composite",
        "type_info": "Bool"
      },
      {
        "ordinal": 23,
        "name": "lb_strategy",
        "type_info": "Varchar"
      },
      {
        "ordinal": 24,
        "name": "fallback_enabled",
        "type_info": "Bool"
      },
      {
        "ordinal": 25,
        "name": "fallback_on_rate_limit",
        "type_info": "Bool"
      },
      {
        "ordinal": 26,
        "name": "fallback_on_status",
        "type_info": "Int4Array"
      },
      {
        "ordinal": 27,
        "name": "sanitize_responses",
        "type_info": "Bool"
      },
      {
        "ordinal": 28,
        "name": "throughput",
        "type_info": "Float4"
      },
      {
        "ordinal": 29,
        "name": "fallback_with_replacement",
        "type_info": "Bool"
      },
      {
        "ordinal": 30,
        "name": "fallback_max_attempts",
        "type_info": "Int4"
      },
      {
        "ordinal": 31,
        "name": "allowed_batch_completion_windows",
        "type_info": "TextArray"
      },
      {
        "ordinal": 32,
        "name": "trusted",
        "type_info": "Bool"
      },
      {
        "ordinal": 33,
        "name": "open_responses_adapter",
        "type_info": "Bool"
      },
      {
        "ordinal": 34,
        "name": "metadata",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 35,
        "name": "display_name",
        "type_info": "Text"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Varchar",
        "Varchar",
        "Bool",
        "Text",
        "Bool",
        "Varchar",
        "Bool",
        "TextArray",
        "Varchar",
        "Bool",
        "Timestamptz",
        "Bool",
        "Bool",
        "Float4",
        "Bool",
        "Int4",
        "Bool",
        "Int4",
        "Bool",
        "Int4",
        "Bool",
        "Varchar",
        "Bool",
        "Numeric",
        "Bool",
        "Numeric",
        "Bool",
        "Numeric",
        "Bool",
        "Numeric",
        "Varchar",
        "Bool",
        "Bool",
        "Int4Array",
        "Bool",
        "Bool",
        "Float4",
        "Bool",
        "Bool",
        "Int4",
        "Bool",
        "Bool",
        "Bool",
        "TextArray",
        "Bool",
        "Jsonb",
        "Text"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      true,
      true,
      true,
      false,
      false,
      false,
      false,
      true,
      false,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      false,
      true,
      true,
      true,
      true,
      false,
      true,
      true,
      true,
      true,
      false,
      true,
      false,
      true
    ]
  },
  "hash": "4f74f919afb5d5f8df9ebfa7b087f23a5964af5fbc43faf82ee08b033750c4c2"
}
