import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString, MaxLength } from 'class-validator';

export class UpdateAiSettingsDto {
  @ApiPropertyOptional({
    description: 'Base URL of the Anthropic-compatible API endpoint',
    example: 'https://api.anthropic.com/v1',
  })
  @IsOptional()
  @IsString()
  @MaxLength(500)
  apiUrl?: string;

  @ApiPropertyOptional({
    description:
      'Raw API key. Send empty string to clear, "__UNCHANGED__" to leave untouched, omit to leave untouched.',
    example: 'sk-ant-api03-xxxxxxxx',
  })
  @IsOptional()
  @IsString()
  @MaxLength(500)
  apiKey?: string;

  @ApiPropertyOptional({
    description: 'Model identifier to use for Claude calls.',
    example: 'claude-opus-4-5',
  })
  @IsOptional()
  @IsString()
  @MaxLength(120)
  model?: string;
}
