feat(llm): native Google Gemini provider via OpenAI-compatible endpoint
Add a first-class `gemini` provider so operators can drive missions with a direct GEMINI_API_KEY, instead of only reaching Gemini through OpenRouter. Gemini is wired exactly like xAI: dispatched through OpenAIAdapter against Google's OpenAI-compatible surface. The base URL is https://generativelanguage.googleapis.com/v1beta/openai — the `/openai` segment is required because OpenAIAdapter posts to `${baseUrl}/chat/completions`; without it requests hit `/v1beta/chat/completions`, which Google does not serve. Wires the provider through the type union, adapter factory, config (interface, defaults, model catalog, key env map, getLLMConfig, fallback chain, redaction, .env template), and adds regression tests pinning the `/openai` base-URL segment.
This commit is contained in:
4 files changed
+111
-9
No files matched your search
+1
-1
@@ -6,7 +6,7 @@
|
||||
// LLM CONFIGURATION
|
||||
// =============================================================================
|
||||
|
||||
export type LLMProvider = 'openrouter' | 'venice' | 'anthropic' | 'openai' | 'xai' | 'codex' | 'mock' | 'local' | 'local-agent';
|
||||
export type LLMProvider = 'openrouter' | 'venice' | 'anthropic' | 'openai' | 'xai' | 'gemini' | 'codex' | 'mock' | 'local' | 'local-agent';
|
||||
|
||||
export interface LLMConfig {
|
||||
provider: LLMProvider;
|
||||
|
||||
Reference in new issue
Block a user