Browse Source
Tasks completed: 3/3 - Add schema endpoint and model schema fetching - Add parameter UI component - Pass parameters through generation pipeline SUMMARY: .planning/phases/06-video-and-polish/06-03-SUMMARY.md Resolved: ISS-001 - Generate nodes now adapt to model requirementshandoff-20260429-1057
4 changed files with 155 additions and 14 deletions
@ -0,0 +1,18 @@ |
|||
# Issues |
|||
|
|||
Deferred enhancements and improvements discovered during development. |
|||
|
|||
## Open Issues |
|||
|
|||
(None currently) |
|||
|
|||
## Resolved Issues |
|||
|
|||
### ISS-001: Generate node should adapt to model requirements |
|||
|
|||
**Discovered:** 2026-01-09 during UAT for Phase 5 |
|||
**Resolved:** 2026-01-10 in Phase 06-03 (Custom model parameters) |
|||
**Resolution:** Added /api/models/[modelId] endpoint to fetch model parameter schemas from Replicate and fal.ai. Created ModelParameters component that renders dynamic inputs based on schema. Parameters flow through to providers during generation. |
|||
|
|||
--- |
|||
*Last updated: 2026-01-10* |
|||
@ -0,0 +1,119 @@ |
|||
--- |
|||
phase: 06-video-and-polish |
|||
plan: 03 |
|||
subsystem: api, ui |
|||
tags: [openapi, parameters, replicate, fal, schema] |
|||
|
|||
# Dependency graph |
|||
requires: |
|||
- phase: 06-02 |
|||
provides: Video playback in output node |
|||
provides: |
|||
- Model parameter schema fetching endpoint |
|||
- Dynamic parameter UI component |
|||
- Parameter passing through generation pipeline |
|||
affects: [external-providers, generate-nodes] |
|||
|
|||
# Tech tracking |
|||
tech-stack: |
|||
added: [] |
|||
patterns: |
|||
- Schema fetching and caching for model parameters |
|||
- Dynamic UI generation from OpenAPI schema |
|||
|
|||
key-files: |
|||
created: |
|||
- src/app/api/models/[modelId]/route.ts |
|||
- src/components/nodes/ModelParameters.tsx |
|||
modified: |
|||
- src/lib/providers/types.ts |
|||
- src/types/index.ts |
|||
- src/components/nodes/GenerateImageNode.tsx |
|||
- src/components/nodes/GenerateVideoNode.tsx |
|||
- src/store/workflowStore.ts |
|||
- src/app/api/generate/route.ts |
|||
|
|||
key-decisions: |
|||
- "Fetch schema from provider API at model selection time" |
|||
- "Filter internal params, prioritize user-relevant ones (seed, steps, guidance)" |
|||
- "Collapsible parameters section to keep UI compact" |
|||
- "Skip array type parameters for now (complex)" |
|||
|
|||
patterns-established: |
|||
- "Schema endpoint: /api/models/[modelId]?provider=..." |
|||
- "10-minute cache TTL for schema data" |
|||
|
|||
issues-created: [] |
|||
|
|||
# Metrics |
|||
duration: 5min |
|||
completed: 2026-01-10 |
|||
--- |
|||
|
|||
# Phase 6 Plan 3: Custom Model Parameters Summary |
|||
|
|||
**Dynamic model parameters fetched from provider schemas, enabling seed, steps, guidance, and other model-specific inputs** |
|||
|
|||
## Performance |
|||
|
|||
- **Duration:** 5 min |
|||
- **Started:** 2026-01-10T09:39:02Z |
|||
- **Completed:** 2026-01-10T09:44:35Z |
|||
- **Tasks:** 3 |
|||
- **Files modified:** 8 |
|||
|
|||
## Accomplishments |
|||
|
|||
- Created /api/models/[modelId] endpoint for fetching model parameter schemas |
|||
- Added ModelParameter interface to type system |
|||
- Built reusable ModelParameters component with collapsible UI |
|||
- Integrated parameters into Generate and GenerateVideo nodes |
|||
- Parameters flow through workflowStore to API route to providers |
|||
- Resolved ISS-001: Generate node now adapts to model requirements |
|||
|
|||
## Task Commits |
|||
|
|||
Each task was committed atomically: |
|||
|
|||
1. **Task 1: Add schema endpoint and model schema fetching** - `beb0af3` (feat) |
|||
2. **Task 2: Add parameter UI component** - `1e60f18` (feat) |
|||
3. **Task 3: Pass parameters through generation pipeline** - `e7ebee2` (feat) |
|||
|
|||
**Plan metadata:** (pending) |
|||
|
|||
## Files Created/Modified |
|||
|
|||
- `src/app/api/models/[modelId]/route.ts` - New endpoint for fetching model parameter schemas |
|||
- `src/lib/providers/types.ts` - Added ModelParameter interface |
|||
- `src/components/nodes/ModelParameters.tsx` - New collapsible parameter inputs component |
|||
- `src/types/index.ts` - Added parameters field to NanoBananaNodeData and GenerateVideoNodeData |
|||
- `src/components/nodes/GenerateImageNode.tsx` - Integrated ModelParameters component |
|||
- `src/components/nodes/GenerateVideoNode.tsx` - Integrated ModelParameters component |
|||
- `src/store/workflowStore.ts` - Include parameters in request payloads |
|||
- `src/app/api/generate/route.ts` - Added logging for custom parameters |
|||
|
|||
## Decisions Made |
|||
|
|||
- Fetch schema from provider API when model is selected (not upfront) |
|||
- Filter out internal parameters (webhook, sync_mode, etc.) |
|||
- Prioritize common parameters (seed, steps, guidance_scale, negative_prompt) |
|||
- Use 10-minute cache TTL for schema data (same as model lists) |
|||
- Collapsible "Parameters" section to keep node UI compact |
|||
|
|||
## Deviations from Plan |
|||
|
|||
None - plan executed exactly as written. |
|||
|
|||
## Issues Encountered |
|||
|
|||
None |
|||
|
|||
## Next Phase Readiness |
|||
|
|||
- Model parameters feature complete |
|||
- ISS-001 resolved |
|||
- Ready for next plan (06-04) |
|||
|
|||
--- |
|||
*Phase: 06-video-and-polish* |
|||
*Completed: 2026-01-10* |
|||
Loading…
Reference in new issue