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.9 KiB

phase plan type
12-model-improvements 1 execute
Extend model cache TTL and verify Replicate image models work end-to-end.

Purpose: Reduce API calls with longer cache duration and confirm Replicate image generation functions correctly. Output: Updated cache configuration and verified working Replicate image generation.

<execution_context> ~/.claude/get-shit-done/workflows/execute-phase.md ~/.claude/get-shit-done/references/checkpoints.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md

Key files:

@src/lib/providers/cache.ts

Prior context:

Model cache currently uses 10-minute TTL. Models don't change frequently, so longer TTL reduces API calls. Replicate image generation implemented in Phase 2-3, needs end-to-end verification.

Task 1: Extend model cache TTL to 1 hour src/lib/providers/cache.ts Change DEFAULT_TTL from 10 minutes (10 * 60 * 1000) to 1 hour (60 * 60 * 1000). Update the comment to reflect "1 hour" instead of "10 minutes". This reduces API calls to provider model listing endpoints. grep "DEFAULT_TTL" src/lib/providers/cache.ts shows 60 * 60 * 1000 Cache TTL is 1 hour (3,600,000 ms) Extended cache TTL configuration 1. Start dev server: npm run dev 2. Open http://localhost:3000 3. Configure a Replicate API key in Settings if not already done 4. Click the Replicate icon in the floating action bar to open model search 5. Search for "flux" and select a text-to-image model (e.g., "black-forest-labs/flux-schnell") 6. Add a prompt like "a mountain landscape at sunset" 7. Click Run (Cmd+Enter) to generate an image 8. Confirm: Image appears in the output node 9. Confirm: No errors in console or UI Type "approved" if Replicate image generation works, or describe any issues Before declaring phase complete: - [ ] `npm run build` succeeds without errors - [ ] Cache TTL is set to 1 hour - [ ] Replicate image model generates successfully (human verified)

<success_criteria>

  • Cache TTL extended to 1 hour
  • Replicate image generation verified working
  • Build passes
  • Phase 12 complete </success_criteria>
After completion, create `.planning/phases/12-model-improvements/12-01-SUMMARY.md`:

Phase 12-01: Model Improvements Summary

[Substantive one-liner - what shipped]

Accomplishments

  • [Key outcome 1]
  • [Key outcome 2]

Files Created/Modified

  • path/to/file.ts - Description

Decisions Made

[Key decisions and rationale, or "None"]

Issues Encountered

[Problems and resolutions, or "None"]

Next Step

Phase complete, ready for milestone v1.1 completion.