feat: Add Ollama as an AI provider, implementing its API for agent in…#6
feat: Add Ollama as an AI provider, implementing its API for agent in…#6vkop007 wants to merge 3 commits intosachaa:masterfrom
Conversation
…vocation, tool use, and context compaction, and introducing new UI settings for provider selection and Ollama host configuration.
|
Thanks for the contribution! Really like the idea of adding Ollama support, local models are a great option to have. I have a few concerns I'd like to see addressed before merging: Architecture: Provider abstraction needed The biggest issue is that invokeOllama/compactOllama duplicate nearly the entire structure of the Anthropic equivalents (~200 lines). If we add a third provider later (OpenAI, Gemini, etc.), we'd be triplicating everything. I'd like to see this refactored into a provider interface/strategy pattern, the tool-use loop, logging, and message posting are identical; only the API call shape and response parsing differ. Bugs / must-fix:
Nice to haves (not blocking):
Happy to pair on the provider abstraction if you'd like, I think that's the main thing to get right before this goes in. |
|
This is so much better! Nice progress on the refactor, the discriminated union types for the payloads are really clean, and the provider abstraction is a solid improvement. Two small things to address before merging:
|
…ically for Ollama
feat(ai): integrate Ollama as local AI provider