All files / features / llm-configs llmConfigsCrudConfig.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 27 28 29 30 31 32 33 34 35 36 37 3852x   1x                                                               52x      
import type { CrudFieldConfig, CrudFieldType } from '@/layers/interfaces'
 
export const LLM_CONFIG_FIELD_SET: CrudFieldConfig[] = [
  {
    field: 'name',
    title: 'Name',
    validation: { required: true, minLength: 3, maxLength: 100 },
  },
  {
    field: 'base_url',
    title: 'Base URL',
    description: 'OpenAI-compatible API endpoint URL',
    validation: { required: true },
  },
  {
    field: 'model',
    title: 'Model',
    description: 'Model identifier (e.g. gpt-4o, claude-sonnet-4-20250514)',
    validation: { required: true },
  },
  {
    field: 'default_temperature',
    title: 'Default Temperature',
    description:
      'Controls response creativity (0.0–2.0). Low values (0.0–0.3): factual, deterministic — best for coding, structured extraction, and math. Moderate (0.5–0.7): balanced. High values (0.8–2.0): creative, varied — best for prose, ideation, and dialog. Overridable per-pipeline via .agent-platform manifests.',
  },
  {
    field: 'api_key',
    title: 'API Key',
    description: 'Encrypted at rest. Never returned in API responses. Edit: leave empty to keep existing key, enter a new value to rotate.',
    validation: { required: true },
  },
]
 
export const LLM_CONFIG_FIELD_TYPES: Record<string, CrudFieldType> = {
  api_key: 'password',
}