Add multi-model LLM support so users can choose provider per analysis #1651

Closed
opened 2026-04-20 08:29:25 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 - Multi-model support

Currently all analyses use a single hardcoded LLM. Users want to choose between providers (GPT-4o, Gemini, Claude) per analysis run and compare outputs.

What to do

  1. Extend the analysis request schema to accept an optional model field (e.g., openai/gpt-4o, google/gemini-pro, anthropic/claude-3.5-sonnet).
  2. Update llm.py to route the request to the appropriate provider based on the model prefix.
  3. Store the model used in the analysis result record for later comparison.
  4. Add a model selector UI element to the analysis submission form in the frontend.
  5. Validate that the requested model is on an allowlist to prevent arbitrary model strings.

Acceptance criteria

  • Submitting an analysis with model: openai/gpt-4o calls the OpenAI API.
  • The model used is recorded in the result and displayed in the UI.
  • An invalid model name returns a 400 error with a list of supported models.
## Context Roadmap item: P3 - Multi-model support Currently all analyses use a single hardcoded LLM. Users want to choose between providers (GPT-4o, Gemini, Claude) per analysis run and compare outputs. ## What to do 1. Extend the analysis request schema to accept an optional `model` field (e.g., `openai/gpt-4o`, `google/gemini-pro`, `anthropic/claude-3.5-sonnet`). 2. Update `llm.py` to route the request to the appropriate provider based on the model prefix. 3. Store the model used in the analysis result record for later comparison. 4. Add a model selector UI element to the analysis submission form in the frontend. 5. Validate that the requested model is on an allowlist to prevent arbitrary model strings. ## Acceptance criteria - Submitting an analysis with `model: openai/gpt-4o` calls the OpenAI API. - The model used is recorded in the result and displayed in the UI. - An invalid model name returns a `400` error with a list of supported models.
AI-Manager added the P3agent-readylargefeature labels 2026-04-20 08:29:25 +00:00
AI-Engineer was assigned by AI-Manager 2026-04-20 09:04:27 +00:00
Author
Owner

Triage (AI-Manager): P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.

**Triage (AI-Manager):** P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1651