feat: unified LLM config, OpenRouter, safety guards, multi-model eval#98
Merged
Conversation
…i-model eval - Unify 6 per-provider API key fields into single LLM_API_KEY with backward-compatible migration via model_validator - Replace if/elif factory chain with registry-based provider pattern - Add OpenRouter as OpenAI-compatible provider (reuses OpenAICompatProvider with custom base_url) - Add API safety guards: mask secrets in GET /config, sanitize exceptions, input sanitization for prompt injection, tighten CORS from wildcard to localhost - Add slowapi rate limiting on POST /investigate (10/min) and POST /chat (20/min) - Add --provider, --model, --api-key flags to eval runner for multi-model testing - Add eval/run_multi_model.py orchestrator with --mock dry-run support - Change REFLECTION_INTERVAL default from 3 to 2 for fairer model comparison
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
VarunGitGood
added a commit
that referenced
this pull request
Jul 5, 2026
feat: unified LLM config, OpenRouter, safety guards, multi-model eval
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
OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.) into singleLLM_API_KEYwith backward-compatiblemodel_validatormigration — old configs keep working_PROVIDERSdict lookup, cleaner extension pathOpenAICompatProviderwith custombase_url. SetLLM_PROVIDER=openrouter+ keyGET /config, generic exception messages (real errors server-side only), prompt injection sanitization, CORS locked tolocalhost:{UI_PORT}(configurable viaCORS_ORIGINS), slowapi rate limiting on/investigate(10/min) and/chat(20/min)--provider,--model,--api-keyflags onrun_evals.py; newrun_multi_model.pyorchestrator with--mockdry-runTest plan
uv run pytest tests/ -v)run_multi_model.py --mockrenders comparison table correctlytest_config_isolation.pyGET /configreturns masked keys/investigatequery gets sanitized