From ab61a15edc93577e7d9bbe235781624bfcf3e8a7 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 15 Mar 2026 17:10:32 +0000 Subject: [PATCH] fix(agent): register Ollama with api: openai-completions (#117) Co-authored-by: Jason Woltje Co-committed-by: Jason Woltje --- apps/gateway/src/agent/provider.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/gateway/src/agent/provider.service.ts b/apps/gateway/src/agent/provider.service.ts index 9b84df3..8c73fe6 100644 --- a/apps/gateway/src/agent/provider.service.ts +++ b/apps/gateway/src/agent/provider.service.ts @@ -92,15 +92,16 @@ export class ProviderService implements OnModuleInit { .map((modelId: string) => modelId.trim()) .filter(Boolean); - this.registerCustomProvider({ - id: 'ollama', - name: 'Ollama', + this.registry.registerProvider('ollama', { baseUrl: `${ollamaUrl}/v1`, apiKey: 'ollama', + api: 'openai-completions' as never, models: modelIds.map((id) => ({ id, name: id, reasoning: false, + input: ['text'] as ('text' | 'image')[], + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 8192, maxTokens: 4096, })),