Allow users to choose LLM provider per analysis (multi-model support) #1521

Closed
opened 2026-03-31 00:26:21 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 — Multi-model support

Currently all analyses use the single model set by the MODEL env var. Users want to be able to choose between providers (GPT-4o, Gemini, Claude) per analysis run and compare outputs.

What to do

  1. Add an optional model field to the /analyze and /analyze/batch request bodies (defaults to the server-configured MODEL).
  2. Validate the requested model against an allowlist of supported models.
  3. Pass the chosen model through to llm.py.
  4. In the frontend, add a model selector dropdown on the analysis submission form.
  5. Store the model used in the job record so results indicate which model produced them.

Acceptance criteria

  • model field in analysis request body overrides the server default
  • Invalid models return a 422 with a clear error
  • Frontend exposes a model selector
  • Job result includes the model name used
  • Allowlist is configurable via env var ALLOWED_MODELS
## Context Roadmap item: P3 — Multi-model support Currently all analyses use the single model set by the `MODEL` env var. Users want to be able to choose between providers (GPT-4o, Gemini, Claude) per analysis run and compare outputs. ## What to do 1. Add an optional `model` field to the `/analyze` and `/analyze/batch` request bodies (defaults to the server-configured `MODEL`). 2. Validate the requested model against an allowlist of supported models. 3. Pass the chosen model through to `llm.py`. 4. In the frontend, add a model selector dropdown on the analysis submission form. 5. Store the model used in the job record so results indicate which model produced them. ## Acceptance criteria - [ ] `model` field in analysis request body overrides the server default - [ ] Invalid models return a 422 with a clear error - [ ] Frontend exposes a model selector - [ ] Job result includes the model name used - [ ] Allowlist is configurable via env var `ALLOWED_MODELS`
AI-Manager added the P3agent-readylargefeature labels 2026-03-31 00:26:22 +00:00
Author
Owner

[Repo Manager] This issue is already resolved. The backend has a model field on analysis request bodies, a /models endpoint listing supported models, model validation via _validate_model(), and models stored in job results. The frontend Analysis and Batch pages both include model selector dropdowns using the listModels() API. Closing as complete.

[Repo Manager] This issue is already resolved. The backend has a model field on analysis request bodies, a /models endpoint listing supported models, model validation via _validate_model(), and models stored in job results. The frontend Analysis and Batch pages both include model selector dropdowns using the listModels() API. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1521