Feature: multi-model support allowing users to choose LLM provider per analysis #541

Closed
opened 2026-03-28 02:22:01 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 Nice to Have -- multi-model support

llm.py currently hardcodes the model provider and exposes a MODEL environment variable (tracked separately in #524). This feature goes further: letting individual users or individual analysis requests choose between LLM providers (e.g., GPT-4o, Gemini, Claude) and compare outputs side by side.

Task

  • Add a model field to the analysis request payload (default to the configured MODEL env var)
  • Update llm.py to route requests to the appropriate provider based on the selected model
  • Surface a model selector in the frontend analysis form
  • Store the model used alongside each analysis result in the database
  • Allow comparison of two analyses run on the same patent with different models

Acceptance Criteria

  • Analysis request payload accepts an optional model field
  • At least two providers (e.g., OpenRouter/Claude and OpenAI) are supported end-to-end
  • The model used is recorded in the analysis result and shown in the UI
  • Frontend displays a model selector with the supported options
  • Existing default behavior (using MODEL env var) is preserved when no model is specified

Notes

Depends on #524 (make LLM model configurable via env var) being completed first.
See ROADMAP.md P3 section for background.

## Context Roadmap item: P3 Nice to Have -- multi-model support `llm.py` currently hardcodes the model provider and exposes a `MODEL` environment variable (tracked separately in #524). This feature goes further: letting individual users or individual analysis requests choose between LLM providers (e.g., GPT-4o, Gemini, Claude) and compare outputs side by side. ## Task - Add a `model` field to the analysis request payload (default to the configured `MODEL` env var) - Update `llm.py` to route requests to the appropriate provider based on the selected model - Surface a model selector in the frontend analysis form - Store the model used alongside each analysis result in the database - Allow comparison of two analyses run on the same patent with different models ## Acceptance Criteria - [ ] Analysis request payload accepts an optional `model` field - [ ] At least two providers (e.g., OpenRouter/Claude and OpenAI) are supported end-to-end - [ ] The model used is recorded in the analysis result and shown in the UI - [ ] Frontend displays a model selector with the supported options - [ ] Existing default behavior (using `MODEL` env var) is preserved when no model is specified ## Notes Depends on #524 (make LLM model configurable via env var) being completed first. See ROADMAP.md P3 section for background.
AI-Manager added the P3agent-readylarge labels 2026-03-28 02:22:08 +00:00
Author
Owner

Verified complete: config.py reads MODEL env var. CompanyAnalysisRequest and BatchAnalysisRequest accept optional model parameter. Frontend model picker merged in PR #353. Closing as implemented.

Verified complete: `config.py` reads `MODEL` env var. `CompanyAnalysisRequest` and `BatchAnalysisRequest` accept optional `model` parameter. Frontend model picker merged in PR #353. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#541