client-py connected

This commit is contained in:
2026-03-27 16:33:40 -04:00
parent c76887ab92
commit c3a8fae132
55 changed files with 1598 additions and 426 deletions

View File

@@ -19,11 +19,33 @@ export interface ModelConfig {
maxTokens?: number;
}
/**
* License tier model configuration
*/
export interface LicenseTierModels {
default: string;
cost_optimized: string;
complex: string;
allowed_models?: string[];
blocked_models?: string[];
}
/**
* License models configuration
*/
export interface LicenseModelsConfig {
free: LicenseTierModels;
pro: LicenseTierModels;
enterprise: LicenseTierModels;
}
/**
* Provider configuration with API keys
*/
export interface ProviderConfig {
anthropicApiKey?: string;
defaultModel?: ModelConfig;
licenseModels?: LicenseModelsConfig;
}
/**
@@ -77,15 +99,26 @@ export class LLMProviderFactory {
* Get default model based on environment
*/
getDefaultModel(): ModelConfig {
if (this.config.defaultModel) {
return this.config.defaultModel;
}
if (!this.config.anthropicApiKey) {
throw new Error('Anthropic API key not configured');
}
return {
provider: LLMProvider.ANTHROPIC,
model: 'claude-3-5-sonnet-20241022',
model: 'claude-sonnet-4-6',
};
}
/**
* Get license models configuration
*/
getLicenseModelsConfig(): LicenseModelsConfig | undefined {
return this.config.licenseModels;
}
}
/**
@@ -94,14 +127,14 @@ export class LLMProviderFactory {
export const MODELS = {
CLAUDE_SONNET: {
provider: LLMProvider.ANTHROPIC,
model: 'claude-3-5-sonnet-20241022',
model: 'claude-sonnet-4-6',
},
CLAUDE_HAIKU: {
provider: LLMProvider.ANTHROPIC,
model: 'claude-3-5-haiku-20241022',
model: 'claude-haiku-4-5-20251001',
},
CLAUDE_OPUS: {
provider: LLMProvider.ANTHROPIC,
model: 'claude-3-opus-20240229',
model: 'claude-opus-4-6',
},
} as const satisfies Record<string, ModelConfig>;