- Added support for Google Gemini, OpenAI, Anthropic, and Azure OpenAI - Implemented API key validation with auto model detection - Added Error Boundary for better error handling - Migrated PDF generation to native jsPDF (better quality) - Added PWA support with offline capabilities - Implemented tests with Vitest - Fixed language consistency (PT-BR) - Improved accessibility (ARIA)
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
export type AIProvider = 'gemini' | 'openai' | 'anthropic' | 'azure';
|
|
|
|
export interface ProviderConfig {
|
|
id: AIProvider;
|
|
name: string;
|
|
description: string;
|
|
models: string[];
|
|
requiresEndpoint?: boolean;
|
|
defaultModel: string;
|
|
}
|
|
|
|
export const PROVIDERS: ProviderConfig[] = [
|
|
{
|
|
id: 'gemini',
|
|
name: 'Google Gemini',
|
|
description: 'Modelos avançados do Google com visão multimodal',
|
|
models: ['gemini-2.0-flash', 'gemini-2.5-flash', 'gemini-2.5-pro'],
|
|
defaultModel: 'gemini-2.5-flash'
|
|
},
|
|
{
|
|
id: 'openai',
|
|
name: 'OpenAI',
|
|
description: 'GPT-4 e modelos de visão da OpenAI',
|
|
models: ['gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4-vision-preview'],
|
|
defaultModel: 'gpt-4o'
|
|
},
|
|
{
|
|
id: 'anthropic',
|
|
name: 'Anthropic (Claude)',
|
|
description: 'Claude 3 com análise avançada de documentos',
|
|
models: ['claude-3-opus-20240229', 'claude-3-sonnet-20240229', 'claude-3-haiku-20240307'],
|
|
defaultModel: 'claude-3-sonnet-20240229'
|
|
},
|
|
{
|
|
id: 'azure',
|
|
name: 'Azure OpenAI',
|
|
description: 'OpenAI via Azure com segurança enterprise',
|
|
models: ['gpt-4', 'gpt-4-32k', 'gpt-35-turbo'],
|
|
requiresEndpoint: true,
|
|
defaultModel: 'gpt-4'
|
|
}
|
|
]; |