File size: 1,059 Bytes
391c43e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import type { ProviderId } from '@/lib/llm/providers/types';

export type ModelRef = { provider: ProviderId; model: string };

export interface ModelAssignment {
  agent: ModelRef;                          // required
  imageGen: ModelRef | 'agent' | null;      // model 路 reuse agent 路 off
  voiceInput: ModelRef | 'agent' | 'browser' | null;  // model 路 reuse agent 路 on-device 路 off
  autoCompact: boolean;                     // seeded at migration; read-wiring lands in part B
  compactLimit: number | null;              // null = auto (60% of agent ctx); read-wiring in part B
}

export interface ModelTemplate {
  id: string;
  name: string;
  builtin?: boolean;
  description?: string;
  assignment: ModelAssignment;
  // Timestamps for server sync (user templates only; built-ins never sync).
  updatedAt?: Date;       // bumped on every content edit
  lastSyncedAt?: Date;    // when this template last synced with the server
  serverUpdatedAt?: Date; // the server's updatedAt at last sync
}

export type ResolvedAssignment = ModelAssignment;