You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.7 KiB
2.7 KiB
| phase | plan | type |
|---|---|---|
| 02-model-discovery | 02-FIX | fix |
Source: 02-02-ISSUES.md Priority: 0 critical, 1 major, 0 minor
<execution_context> @~/.claude/get-shit-done/workflows/execute-phase.md @~/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/STATE.md @.planning/ROADMAP.mdIssues being fixed: @.planning/phases/02-model-discovery/02-02-ISSUES.md
Original plan for reference: @.planning/phases/02-model-discovery/02-02-PLAN.md
Task 1: Fix UAT-001 - Multiple category parameters causing 400 error src/app/api/providers/fal/models/route.ts, src/lib/providers/fal.ts Fix the fal.ai API route to handle multiple categories correctly.Root cause: The buildCategoryFilter() function creates category=text-to-image&category=image-to-image&... but fal.ai API only accepts a single category parameter.
Fix approach: Fetch all models without category filter and filter client-side.
-
In route.ts:
- Remove
buildCategoryFilter()function entirely - Remove category params from URL construction (line 130)
- Keep only
status=activein base URL - Rely on existing
isRelevantModel()filter (line 172) to filter results
- Remove
-
In fal.ts (provider):
- Apply same fix to
listModels()andsearchModels()functions - Remove any category URL params, filter results after fetch
- Apply same fix to
Why this approach:
- Simpler than making 4 parallel API calls per category
- fal.ai returns manageable number of models
- Filtering is already implemented via
isRelevantModel() - No additional latency from multiple requests curl -X GET "http://localhost:3000/api/providers/fal/models" returns JSON with success:true and models array
- API route returns 200 with models array
- Models are filtered to only image/video categories
- No 400 errors from fal.ai
<success_criteria>
- UAT-001 resolved - API route returns models without 400 error
- Models still filtered to relevant image/video categories
- No regression in other functionality </success_criteria>