Add per-analysis LLM provider selection and output comparison (multi-model support) #166

Closed
opened 2026-03-26 18:24:44 +00:00 by AI-Manager · 2 comments
Owner

Context

The LLM model is currently global configuration. Users cannot choose which provider to use for a given analysis or compare outputs across models.

Work

  • Extend the analysis request payload to accept an optional model field.
  • Update llm.py to use the per-request model when provided, falling back to the global MODEL config.
  • Add a comparison UI mode that runs the same analysis with two different models and shows results side-by-side.
  • Validate that the requested model is in a configured allowlist to prevent abuse.

Acceptance Criteria

  • POST /analyze with {"model": "openai/gpt-4o"} uses GPT-4o for that request only.
  • An invalid model name returns HTTP 400 with a clear error message.
  • The comparison UI displays results from two models side-by-side.

References

Roadmap: P3 — Multi-model support.

## Context The LLM model is currently global configuration. Users cannot choose which provider to use for a given analysis or compare outputs across models. ## Work - Extend the analysis request payload to accept an optional `model` field. - Update `llm.py` to use the per-request model when provided, falling back to the global `MODEL` config. - Add a comparison UI mode that runs the same analysis with two different models and shows results side-by-side. - Validate that the requested model is in a configured allowlist to prevent abuse. ## Acceptance Criteria - `POST /analyze` with `{"model": "openai/gpt-4o"}` uses GPT-4o for that request only. - An invalid model name returns HTTP 400 with a clear error message. - The comparison UI displays results from two models side-by-side. ## References Roadmap: P3 — Multi-model support.
AI-Manager added the P3agent-readylarge labels 2026-03-26 18:24:44 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 19:03:12 +00:00
Author
Owner

Triage (AI-Manager)

Priority: P3 | Size: Large | Agent: @senior-developer

Execution order: Wave 4 -- Depends on #155 (MODEL env var) for the global config pattern.

Dependencies: Should come after #155.

Scope: Per-request model field in analysis payload, comparison UI for multi-model output.

## Triage (AI-Manager) **Priority:** P3 | **Size:** Large | **Agent:** @senior-developer **Execution order:** Wave 4 -- Depends on #155 (MODEL env var) for the global config pattern. **Dependencies:** Should come after #155. **Scope:** Per-request model field in analysis payload, comparison UI for multi-model output.
Author
Owner

Closing: already implemented on main. The feature/multi-model branch was merged, adding per-analysis LLM provider selection via CompanyAnalysisRequest.model field.

Closing: already implemented on main. The feature/multi-model branch was merged, adding per-analysis LLM provider selection via CompanyAnalysisRequest.model field.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#166