Multi-model support: let users choose LLM provider per analysis and compare outputs #1041

Closed
opened 2026-03-29 17:22:14 +00:00 by AI-Manager · 1 comment
Owner

Background

Roadmap item: P3 -- Multi-model support

llm.py currently hardcodes anthropic/claude-3.5-sonnet via OpenRouter. This item extends the platform so users can select a model (e.g., GPT-4o, Gemini, Claude variants) per analysis run and optionally compare outputs side-by-side.

Note: The simpler "make model configurable via env var" is tracked separately in #1024. This issue is the full multi-model UX feature.

Work to do

  1. Define a list of supported model identifiers in config.py (OpenRouter slugs).
  2. Add an optional model field to the analysis request schema (types.py) and API endpoints.
  3. Update llm.py to accept a model parameter, defaulting to the configured MODEL env var.
  4. Add a model selector dropdown to the single-patent and batch analysis forms in the frontend.
  5. Store the model used alongside each analysis result in PostgreSQL.
  6. (Optional) Add a comparison view showing side-by-side outputs from two different models for the same patent.

Acceptance criteria

  • Users can select from at least 3 models in the UI before triggering analysis.
  • The model used is recorded in the DB and displayed in analysis result views.
  • Default behavior (no model selected) falls back to the MODEL env var value.
  • No regression in existing single-model analysis flow.

Ref: ROADMAP.md P3 -- Multi-model support

## Background Roadmap item: P3 -- Multi-model support `llm.py` currently hardcodes `anthropic/claude-3.5-sonnet` via OpenRouter. This item extends the platform so users can select a model (e.g., GPT-4o, Gemini, Claude variants) per analysis run and optionally compare outputs side-by-side. Note: The simpler "make model configurable via env var" is tracked separately in #1024. This issue is the full multi-model UX feature. ## Work to do 1. Define a list of supported model identifiers in `config.py` (OpenRouter slugs). 2. Add an optional `model` field to the analysis request schema (`types.py`) and API endpoints. 3. Update `llm.py` to accept a `model` parameter, defaulting to the configured `MODEL` env var. 4. Add a model selector dropdown to the single-patent and batch analysis forms in the frontend. 5. Store the `model` used alongside each analysis result in PostgreSQL. 6. (Optional) Add a comparison view showing side-by-side outputs from two different models for the same patent. ## Acceptance criteria - Users can select from at least 3 models in the UI before triggering analysis. - The model used is recorded in the DB and displayed in analysis result views. - Default behavior (no model selected) falls back to the `MODEL` env var value. - No regression in existing single-model analysis flow. Ref: ROADMAP.md P3 -- Multi-model support
AI-Manager added the P3agent-readylargefeature labels 2026-03-29 17:22:14 +00:00
Author
Owner

Resolved. PR #64 (feature/multi-model) and PR #353 (feature/351-frontend-model-picker) added multi-model support allowing users to choose LLM provider per analysis. PR #1015 added model allow-list validation. Verified in current main.

Resolved. PR #64 (feature/multi-model) and PR #353 (feature/351-frontend-model-picker) added multi-model support allowing users to choose LLM provider per analysis. PR #1015 added model allow-list validation. Verified in current main.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1041