Skip to content

test: cover litigation provider factory selection and OpenRouter config - #110

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-37dd
Draft

test: cover litigation provider factory selection and OpenRouter config#110
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-37dd

Conversation

@cursor

@cursor cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • Litigation provider factory (litigation/providers/factory.py): provider selection for ollama, lm_studio, and openrouter; OpenRouter API key validation (env vs explicit); attribution headers (HTTP-Referer, X-Title); and extra_body provider routing config.

Test files added/updated

  • tests/test_litigation_providers.py (new, 7 tests)

Why these tests materially reduce regression risk

The litigation runner depends on correct provider wiring and OpenRouter configuration. Misconfigured factories fail at runtime with opaque API errors; these tests lock provider class selection, key requirements, and header/body shaping without live network calls.

Validation

pip install -e ".[dev]" && python3 -m pytest tests/

67 passed

Open in Web View Automation 

Add regression tests for ollama/lm_studio/openrouter provider wiring,
API key validation, and OpenRouter attribution headers/extra_body.

Co-authored-by: exios4 <exios4@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant