Address upstream issues 60 and 62

This commit is contained in:
Joseph Magly committed 2026-07-09 11:50:16 -04:00
1 parent 0b2c4f545a
commit df37e7c423
11 files changed
+328 -79

No files matched your search

+11
View File
@@ -1209,6 +1209,8 @@ export class LLMBackbone extends EventEmitter<LLMEvents> {
return new OpenAIAdapter(config); // xAI (Grok Build / grok-*) is OpenAI-compatible
case 'gemini':
return new OpenAIAdapter(config); // Gemini via Google's OpenAI-compatible endpoint (baseUrl ends in /v1beta/openai)
case 'deepseek':
return new OpenAIAdapter(config); // DeepSeek native API is OpenAI-compatible
case 'codex':
return new CodexAdapter(config);
case 'mock':
@@ -1483,6 +1485,12 @@ export function createOpenAIBackbone(apiKey?: string, model?: string): LLMBackbo
return new LLMBackbone(llmConfig);
}
export function createDeepSeekBackbone(apiKey?: string, model?: string): LLMBackbone {
const llmConfig = config.getLLMConfig('deepseek', model);
if (apiKey) llmConfig.apiKey = apiKey;
return new LLMBackbone(llmConfig);
}
export function createMockBackbone(): LLMBackbone {
return new LLMBackbone({
provider: 'mock',
@@ -1521,6 +1529,9 @@ export function createBestAvailableBackbone(): LLMBackbone {
if (providers.includes('openai')) {
return createOpenAIBackbone();
}
if (providers.includes('deepseek')) {
return createDeepSeekBackbone();
}
// Default to mock if no API keys configured
console.warn('No API keys configured. Using mock provider.');