feat(cluster,api,models,cli): add cluster-aware model catalog deployments and request routing

This commit is contained in:
2026-04-20 23:00:50 +00:00
parent 83cacd0cf1
commit 4f2266e1b7
55 changed files with 3970 additions and 1630 deletions
+13 -36
View File
@@ -1,9 +1,9 @@
/**
* ModelGrid Configuration Interfaces
*
* Defines the configuration structure for the ModelGrid daemon.
* ModelGrid configuration interfaces.
*/
import type { IModelCatalog, IModelCatalogEntry } from './catalog.ts';
import type { IClusterConfig } from './cluster.ts';
import type { IContainerConfig } from './container.ts';
/**
@@ -50,12 +50,12 @@ export interface IGpuAssignmentConfig {
* Model management configuration
*/
export interface IModelConfig {
/** URL to fetch greenlit models list */
greenlistUrl: string;
/** Whether to auto-pull models when requested */
autoPull: boolean;
/** Default container type for new models */
defaultContainer: 'ollama' | 'vllm' | 'tgi';
/** URL to fetch the public catalog */
registryUrl: string;
/** Whether to auto-start a deployment when requested */
autoDeploy: boolean;
/** Default engine for new deployments */
defaultEngine: 'vllm';
/** Models to auto-load on startup */
autoLoad: string[];
}
@@ -76,37 +76,14 @@ export interface IModelGridConfig {
containers: IContainerConfig[];
/** Model management configuration */
models: IModelConfig;
/** Cluster configuration */
cluster: IClusterConfig;
/** Health check interval in milliseconds */
checkInterval: number;
}
/**
* Greenlit model entry from remote list
*/
export interface IGreenlitModel {
/** Model name (e.g., "llama3:8b") */
name: string;
/** Preferred container type */
container: 'ollama' | 'vllm' | 'tgi';
/** Minimum VRAM required in GB */
minVram: number;
/** Optional tags for categorization */
tags?: string[];
/** Optional description */
description?: string;
}
/**
* Greenlit models list structure
*/
export interface IGreenlitModelsList {
/** List version */
version: string;
/** Last updated timestamp */
lastUpdated: string;
/** List of greenlit models */
models: IGreenlitModel[];
}
export type IRegistryModel = IModelCatalogEntry;
export type IRegistryCatalog = IModelCatalog;
/**
* Update status information