Feature: Phase 5 - Provider Layer with LLM and Retriever Adapters#7
Merged
Conversation
- Define LLMProvider ABC with async generate() and get_token_count() methods - Define Retriever ABC with async retrieve() method - Define LLMResponse, Document, and TokenUsage Pydantic v2 models - Implement OpenAI adapter with tiktoken token counting - Implement Gemini adapter with google-genai SDK - Implement Anthropic adapter with anthropic SDK - Implement Groq adapter with groq SDK - Implement OpenRouter adapter with httpx (OpenAI-compatible API) - Implement Ollama adapter with httpx (local REST API) - Implement ChromaRetriever adapter with chromadb - Add 138 unit tests covering all providers (ABCs, models, adapters) - All tests passing, linting passes (ruff)
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.
Summary
Implement Phase 5 (Providers) for OpenAgent Eval - a complete provider layer with LLM and Retriever interfaces, adapters for 6 LLM providers and 1 retriever, and comprehensive unit tests.
Motivation
Phase 5 is required to enable the evaluation pipeline to interact with external LLM services and vector databases. The provider layer follows the adapter pattern, allowing the framework to be framework-agnostic while supporting multiple LLM providers and retrieval backends.
Files Modified
New Files
Modified Files
Architectural Decisions
Breaking Changes
None - this is a new module addition.
Testing
Remaining TODOs
None - Phase 5 is complete.
Assumptions & Limitations