feat: add OpenAI-compatible provider #14
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review!14
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-5-provider-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #5.
Validation:
python3 -W error::ResourceWarning -m unittest discover -s tests(29 passing).Automated code review
Reviewed commit:
1695dbd81c3176b464de26666ca1156f08967092Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The pull request adds an OpenAI-compatible provider alongside the existing Ollama provider, abstracting the provider interface via a ReviewRequest dataclass and a unified review_with_provider() dispatcher. Documentation is updated in README.md to reflect the new model name (qwen3.6:35b-a3b-q8_0) and provider configuration options. All 29 unit tests pass.
Blocking findings
None.
Important findings
base = provider.get("base_url", "").rstrip("/")
if not base:
raise ValueError("provider.base_url is required for openai-compatible")
request = urllib.request.Request(base + "/chat/completions", ...)
Impact: If base_url lacks a path prefix (e.g., /v1) and the provider requires it, the request will fail with an ambiguous HTTP error. The current validation only checks for non-empty base_url but does not enforce presence of required API version paths.
Suggested fix: Add explicit validation that base_url ends with a known API path (e.g., '/v1') or raise a clear error if missing, matching the documented requirement in README.md.
Suggestions
None.
Tests and validation
Questions
context_sizeandtemperatureoverrides from config, or are those strictly Ollama-specific?Review limitations
provider.api_key_envand hardcoded defaults like 'OPENAI_API_KEY' are present.Review metadata