Skip to content

feat(models): add Klein, Klein-Large, and Wan models with updated tests - #29

Merged
Simplereally merged 4 commits into
mainfrom
feature/pollinations-config
Feb 23, 2026
Merged

Simplereally merged 4 commits into
mainfrom
feature/pollinations-config

Conversation

@Simplereally

@Simplereally Simplereally commented Jan 24, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added FLUX.2 Klein (two image variants) and Wan (short video with audio/reference support) as active models.
    • Major lightbox upgrade: versioning, compare mode, integrated edit panel, generation overlay, and enhanced media controls.
  • Tests

    • Expanded coverage for new models, video properties, lightbox flows, and mock refinements.
  • Chores

    • Branding and pricing copy updated (Flux Schnell, model counts, quotas); project config for linter/formatter added.

@vercel

vercel Bot commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bloomstudio Ready Ready Preview, Comment, Open in v0 Feb 23, 2026 10:39am

@coderabbitai

coderabbitai Bot commented Jan 24, 2026

Copy link
Copy Markdown
Contributor
ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between d51ae3c and 4e2c775.

📒 Files selected for processing (2)
  • lib/config/models.test.ts
  • lib/config/models.ts

📝 Walkthrough

Walkthrough

Adds Klein image models and Wan video model, introduces model legacy flags and active/legacy APIs, implements a full-featured lightbox edit/compare UI with related hooks and utilities, updates pricing/schema and branding text, and includes many test and config changes across the codebase.

Changes

Cohort / File(s) Summary
Project config
biome.json
New Biome configuration enabling linter & formatter, schema URL, and ignore patterns.
Model registry & API constraints
lib/config/models.ts, lib/config/models.test.ts, lib/config/api.config.ts, convex/lib/pollinations.ts
Added klein, klein-large (image) and wan (video); introduced isLegacy flag and active/legacy getters/constants; updated tests; added wan duration constraint and included wan in VIDEO_MODELS.
Schemas & pricing
lib/schemas/pollinations.schema.ts, lib/schemas/pollinations-pricing.schema.ts
Zod schemas extended for new model IDs; pricing entries added for klein, klein-large, and wan.
Lightbox & image editing UI
components/images/lightbox/... (image-lightbox.tsx, edit-image-panel.tsx, generation-loading-overlay.tsx, lightbox-actions.tsx, lightbox-compare-view.tsx, lightbox-info-overlay.tsx, lightbox-media-display.tsx, lightbox-pane.tsx, lightbox-pane-overlay.tsx, lightbox-version-strip.tsx, index.ts and many tests)
Large new feature: multi-mode, versioned lightbox with compare/edit workflows, edit panel, generation loading UI, overlays, pane components, version strip, many tests and a barrel export. Review state, prop types, auth gating, and animation/cleanup logic.
Hooks & utilities
hooks/use-image-edit.ts, hooks/use-image-lightbox.ts, lib/utils/detect-image-format.ts
New useImageEdit hook (image edit workflow), useImageLightbox exposes copied and improved timer cleanup, and a new detect-image-format utility with aspect-ratio and tier detection plus formatting helpers.
UI content / branding / pricing pages
app/layout.tsx, app/pricing/*, app/pricing/pricing-data.tsx, lib/seo-config.ts, README.md, components/landing/*, components/pricing/model-value-showcase.tsx, components/landing/models-section.tsx, components/landing/hero-section.tsx, components/landing/competitor-comparison.tsx, components/landing/features-section.tsx, components/landing/value-prop-section.tsx
Rebranded copy and JSON‑LD updates (Flux Schnell, Klein, Z-Image, etc.), pricing/tier text changes, and UI wiring to active-model APIs.
Model queries & hooks
hooks/queries/use-image-models.ts, hooks/queries/use-image-models.test.ts
Introduced includeLegacy option and updated filtering/sorting logic and tests to distinguish active vs legacy models.
Tests & mocks (various)
multiple components/*/*.test.tsx, lib/storage/r2-client.test.ts, lib/storage/retry.test.ts, lib/pollen-auth/context.test.tsx, convex/lib/stripeHelpers.test.ts
Many test updates: removal of ESLint-disable comments, refined mocks (notably AWS S3 module mock), adjusted assertions (fetch args, API key behavior), added no-op promise catches, and expanded lightbox test scaffolding.
Storage / infra config files
oh-my-opencode.json, opencode.json
Large structural rework: agent renames/variants and expanded provider model lists, added schema/experimental/mcp entries; review for compatibility with external tooling.
Misc UI changes
components/gallery/*, components/studio/*, components/pricing/*, components/landing/*, components/studio/upgrade-modal.tsx
Various UI text/content updates, small component prop typing changes to use ModelDefinition/getActiveModels, and minor test lint comment removals.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Lightbox as "Lightbox UI"
  participant Hook as "useImageEdit Hook"
  participant API as "Generation API"
  participant Storage as "Image Storage Service"

  User->>Lightbox: open edit panel / submit edit (prompt, model, tier)
  Lightbox->>Hook: submitEdit(prompt, model, dimensions)
  Hook->>API: POST /generate (params, sourceImage)
  API-->>Hook: 202 Accepted / jobId
  Hook->>Lightbox: update isGenerating state -> show GenerationLoadingOverlay
  API->>Storage: async store generated artifact / callback
  Storage-->>Hook: notify completion (url, metadata)
  Hook->>Lightbox: onSuccess(receive image, versions) -> update versions and UI
  Lightbox->>User: display new version in LightboxVersionStrip
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

🐇✨ I hopped through registries, tests, and names,
Brought Klein thumbnails, Wan videos, and lightbox games,
Edit panels, tiers, and formats now in tow,
Models marked legacy, new APIs to show,
I nibbled bugs and bounced—hooray for the new flow! 🥕🎨

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Simplereally
Simplereally marked this pull request as ready for review January 24, 2026 10:27
@Simplereally

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jan 24, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Mark paid-only models as legacy (isLegacy: true):
- Image: gptimage-large, seedream-pro, nanobanana-pro, kontext, turbo, seedream, nanobanana
- Video: seedance-pro, veo, wan

Active models kept for generation:
- flux, zimage, klein, klein-large, gptimage, seedance

Marketing updates:
- Competitor comparison: 180 -> 900,000 images (Flux Schnell baseline)
- Model showcase: Complete rebuild with active models only
- Features: 13+ -> 6 AI Models
- SEO: Updated all meta descriptions
- README: Updated feature list
- Upgrade modal: Fixed model count and references

All tests passing (2319/2320)
Klein 9B (klein-large) API enforces different constraints than Klein 4B:
- maxPixels: 1,048,576 (1MP) instead of 4MP
- minDimension: 256px instead of 64px
- supportedTiers: SD/HD only (2K exceeds 1MP limit)

Added separate FLUX_KLEIN_9B_ASPECT_RATIOS optimized for 1MP budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Simplereally
Simplereally merged commit d79478d into main Feb 23, 2026
4 checks passed
@Simplereally
Simplereally deleted the feature/pollinations-config branch February 23, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant