Skip to content

feat(media): add Higgsfield to video and image generators, allow typed models - #9756

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/higgsfield-media-models
Nov 7, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
feat/higgsfield-media-models

Conversation

@myxamediyar

Copy link
Copy Markdown
Contributor

Summary

  • Add Higgsfield as a provider in the Video Generator: Kling 3.0 Turbo/Pro/Standard, Kling 2.5 Turbo Pro, Seedance 2.0, MiniMax H3, Hailuo 2.3 Standard (text-to-video)
  • Add Higgsfield to the Image Generator: SOUL, SOUL V2, SOUL Cinema, Z-Image Turbo
  • Model settings come from Higgsfield's model pages and are validated before a paid request
  • Switch the video and image model fields to comboboxes so users can type a model the catalog doesn't list yet
  • Typed models send the prompt only; IDs are checked as safe model names or endpoint paths
  • Retired IDs (veo-3, dall-e-3, gpt-image-1) keep their existing errors; a plain model ID from another provider fails fast
  • Custom Fal.ai endpoints require the user's own Fal.ai key, so the hosted key can't be under-billed on an unpriced endpoint
  • Combobox: mediaModelOptions skips the LLM model-permission filter for these fields, restoreDefaultWhenCleared refills the default after a provider switch, and hidden alias options stay hidden
  • Legacy Video Generator V1/V2 and Image Generator V1 keep their dropdowns

Type of Change

  • New feature

Testing

  • Compared provider requests built on staging vs this branch for 2,605 cases (every existing model ID and alias, with/without settings, retired IDs, every block version's param mapping): no differences
  • Exercised typed model IDs: valid paths per provider, path traversal, query injection, settings rejection, hosted Fal key rejection
  • Type-check, lint, check:audits, and the block-registry check passed locally; full test suite runs in CI
  • Not yet run against the live Higgsfield API

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 7, 2026 1:50am UTC

Request Review

@myxamediyar
myxamediyar marked this pull request as ready for review November 6, 2026 21:06
@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds Higgsfield image and video generation and lets users type model IDs outside the catalog.

  • The Video Generator can send video requests to Higgsfield.
  • The Image Generator can send image requests to Higgsfield.
  • The newer media generators accept model IDs that are not in their catalogs.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Image or video generator] --> B{Listed model?}
  B -->|Yes| C[Check supported settings]
  B -->|No| D[Check model ID and reject settings]
  D --> E{Custom Fal.ai endpoint?}
  E -->|Yes| F[Require user-owned key]
  E -->|No| G[Build provider request]
  F --> G
  C --> G
  G --> H[Submit and wait for result]
  H --> I[Download and store media]
Loading

Reviews (4) · Last reviewed commit: "refactor(higgsfield): share one API clie..." · Reviewed by Greptile

Comment thread apps/sim/lib/internal/image/request.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 26 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/internal/image/request.ts Resolved
Comment thread apps/sim/lib/media/custom-model.ts Resolved
Comment thread apps/sim/lib/media/image-catalog.ts Resolved
@myxamediyar

Copy link
Copy Markdown
Contributor Author

@greptile

@myxamediyar

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@myxamediyar I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/lib/media/higgsfield.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 27 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@myxamediyar

Copy link
Copy Markdown
Contributor Author

@greptile

@myxamediyar

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@myxamediyar I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 28 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

myxamediyar and others added 4 commits November 6, 2026 17:48
…d models

- Add Higgsfield as a provider in the Video Generator (Kling 3.0, Kling 2.5 Turbo, Seedance 2.0, MiniMax H3, Hailuo 2.3) and Image Generator (SOUL, SOUL V2, SOUL Cinema, Z-Image Turbo)
- Switch the video and image model fields to comboboxes so users can type a model the catalog does not list
- Send typed model IDs with the prompt only; validate them as safe model names or endpoint paths
- Keep retired model errors, reject stale cross-provider values, and require a user Fal.ai key for custom Fal endpoints
…ault after provider switch

- trim `model` at the image and video input schemas so a padded catalog ID still matches its catalog entry
- reject `visualReference` for typed direct-video models, which only send the prompt
- refill the combobox default after a provider switch even if the user had cleared the field
- update the image operations test to the typed-model behavior

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Higgsfield helpers

- move the typed-model checks from mocked fetch calls to buildImageGenerationRequest, covering padded catalog and retired IDs
- add TSDoc to higgsfieldStatusUrl and higgsfieldFailureMessage
- say in the combobox comments that a cleared required field gets its default back when reopened

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d media generators

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@waleedlatif1
waleedlatif1 force-pushed the feat/higgsfield-media-models branch from 1b3b6c6 to f7c6b00 Compare November 7, 2026 01:50
@waleedlatif1

Copy link
Copy Markdown
Collaborator

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 30 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 2eb80dd into staging Nov 7, 2026
79 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/higgsfield-media-models branch November 7, 2026 01:58
@waleedlatif1

Copy link
Copy Markdown
Collaborator

@myxamediyar merged. Before merging I rebased on #9749 and pointed the Higgsfield block tools at lib/media/higgsfield.ts, so the base URL, auth header and status handling now live in one place.

Tested live: SOUL V2 with settings, Z-Image Turbo, a typed SOUL Cinema ID (prompt only), Kling 3.0 Turbo (3s, 9:16, 720p) and Kling 3.0 Std with sound off. All came back fine, and bad input was rejected with clear errors.

For next time:

  • When two PRs hit the same vendor, put the shared client in the first PR and build the second on top of it. That avoids the duplicate helpers and the generated-file conflicts.
  • Diffing 2,605 requests against staging was a really good way to prove there was no regression. Keep doing that.

This branch was previously deployed

1 inactive deployment
Preview — f7c6b00e Deployed Nov 7, 2026 by vercel[bot]
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.

2 participants