fix(agent): register Ollama with api: openai-completions (#117)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #117.
This commit is contained in:
2026-03-15 17:10:32 +00:00
committed by jason.woltje
parent 2c60459851
commit ab61a15edc

View File

@@ -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,
})),