forked from 0xWheatyz/SPARC
Multi-model LLM support: let users choose provider per analysis and compare outputs #351
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
All analyses use a single hardcoded model. Users cannot compare outputs across providers (GPT-4o, Gemini, Claude variants) or choose a different model for cost/quality tradeoffs.
Work
modelfield.llm.pyto route requests to the specified model/provider via OpenRouter (which already supports multiple providers).Acceptance Criteria
gpt-4o,gemini-pro).Reference
Roadmap item: P3 — Multi-model support.
[Repo Manager] Triaged. Backend fully supports per-request model selection: API accepts optional model field, llm.py routes to specified model via OpenRouter, results store the model used. Missing: (1) frontend model selector dropdown on Analysis and Batch pages, (2) model comparison UI to view outputs side-by-side. Assigning to @developer for frontend work.
Triage Assessment
Priority: P3
Complexity: Large (but remaining work is medium)
Status: Partially implemented
Current State
llm.pyfully supports optionalmodelparameter with provider routing via OpenRouterapi.py) hasmodelfield onAnalyzeRequestandBatchAnalyzeRequestschemasGET /modelsendpoint with curatedSUPPORTED_MODELSlistRemaining Work
Analysis.tsxanalyzeCompany()inclient.tsdoes not accept a model parameterCompare.tsxpage exists but needs verificationDecision
Assigning to
@developerfor frontend completion. Backend is done; remaining work is UI components and API client wiring.Status Update
PR #353 has been opened to complete this feature.
The backend already had the
modelparameter onllm.pymethods, but it was never threaded through the analyzer or API layers. This PR wires it end-to-end:Backend changes:
analyzer.py: All analysis methods now accept and forwardmodelparameterapi.py: Single company endpoint accepts?model=query param; batch endpoints passrequest.modelto analyzerFrontend changes:
client.ts:analyzeCompany(),analyzeBatch(),analyzeBatchAsync()accept optionalmodel; addedlistModels()methodAnalysis.tsx: Model selector dropdown that fetches fromGET /modelsand shows provider infoBatch.tsx: Model selector alongside the workers sliderTypeScript compilation passes cleanly. All three acceptance criteria are now satisfied: