feat(providers): added ollama support and openai#10
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for multiple LLM providers (OpenAI and Ollama) alongside the existing Anthropic integration, introducing a provider abstraction layer and updating the codebase to use standardized model naming conventions.
Changes:
- Introduced provider abstraction with base classes and implementations for Anthropic, OpenAI, and Ollama
- Refactored model naming from descriptive names (e.g., "Claude Haiku 3") to standardized identifiers (e.g., "claude-haiku")
- Updated cost tracking to handle free local models and new provider structure
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/harvestor/providers/base.py | New base provider abstraction defining the interface for all LLM providers |
| src/harvestor/providers/anthropic.py | Anthropic provider implementation with Claude models |
| src/harvestor/providers/openai.py | OpenAI provider implementation with GPT models |
| src/harvestor/providers/ollama.py | Ollama provider implementation for local models |
| src/harvestor/providers/init.py | Provider registry and factory function |
| src/harvestor/parsers/llm_parser.py | Refactored to use provider abstraction instead of direct Anthropic client |
| src/harvestor/core/harvestor.py | Updated to support multi-provider initialization and removed direct Anthropic dependencies |
| src/harvestor/core/cost_tracker.py | Updated to handle free models and new pricing structure |
| src/harvestor/config.py | Refactored to re-export provider models for backwards compatibility |
| src/harvestor/schemas/base.py | Added new provider-based extraction strategies |
| tests/*.py | Updated test patches and model references to use new naming conventions |
| example.py | Updated to demonstrate multi-provider usage |
| src/harvestor/cli/main.py | Added model listing functionality and updated default model |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@copilot review