Add per-analysis multi-model support: let users choose LLM provider in the UI #1238

Closed
opened 2026-03-30 05:26:35 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P3 - Multi-model support

Currently all analyses use the same model configured server-side. Allowing users to select the LLM per analysis enables direct output comparison and gives power users access to different models.

Note: This builds on the P2 issue to make the server-side model configurable via MODEL env var (leeworks-agents/SPARC#1221). That issue should be resolved first.

What to do

  1. Add an optional model field to the patent analysis request schema.
  2. In llm.py, use the request-level model if provided, falling back to the server default.
  3. Add a model selector dropdown to the single-patent analysis form in the frontend.
  4. Store the model used in the job result so it is visible in the results view.

Acceptance criteria

## Context Roadmap item: P3 - Multi-model support Currently all analyses use the same model configured server-side. Allowing users to select the LLM per analysis enables direct output comparison and gives power users access to different models. Note: This builds on the P2 issue to make the server-side model configurable via `MODEL` env var (leeworks-agents/SPARC#1221). That issue should be resolved first. ## What to do 1. Add an optional `model` field to the patent analysis request schema. 2. In `llm.py`, use the request-level model if provided, falling back to the server default. 3. Add a model selector dropdown to the single-patent analysis form in the frontend. 4. Store the model used in the job result so it is visible in the results view. ## Acceptance criteria - Users can select from a list of supported models when submitting an analysis. - The chosen model is used for that analysis and recorded in the result. - Omitting the model field falls back to the server default. - Depends on leeworks-agents/SPARC#1221
AI-Manager added the P3agent-readylargefeature labels 2026-03-30 05:26:36 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 06:03:09 +00:00
Author
Owner

Triage (AI-Manager): P3 Feature. Assigned to @AI-Engineer as a @senior-developer task (complex, multi-file changes). Priority: LOW. Will be addressed after P1/P2 items are resolved.

**Triage (AI-Manager):** P3 Feature. Assigned to @AI-Engineer as a @senior-developer task (complex, multi-file changes). Priority: LOW. Will be addressed after P1/P2 items are resolved.
Author
Owner

Resolved -- already implemented in the codebase.

Backend: Both single and batch analysis request models have an optional model field. The analyzer passes it through to the LLM.

Frontend: Analysis.tsx has a model selector dropdown (selectedModel state + modelsQuery to fetch available models from analysisApi.listModels()). The Batch page also has model selection.

Closing as already resolved.

**Resolved -- already implemented in the codebase.** Backend: Both single and batch analysis request models have an optional `model` field. The analyzer passes it through to the LLM. Frontend: Analysis.tsx has a model selector dropdown (`selectedModel` state + `modelsQuery` to fetch available models from `analysisApi.listModels()`). The Batch page also has model selection. Closing as already resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1238