Repository navigation
refactor(ai): remove fal, Black Forest Labs, Replicate and Stability - #59977
Conversation
There was a problem hiding this comment.
I found no problems with this removal. In packages/ai, bun test passes (1941 pass, 0 fail) and typecheck:tsc is clean. Searching packages/ for the removed providers, subpaths and FalQueue found no references outside the gateway model IDs.
Public API impact (breaking for @opencode/ai callers, as the description says):
- Removed from
@opencode/ai/providers: theBlackForestLabs,Fal,ReplicateandStabilitynamespaces. - Removed package exports:
./providers/black-forest-labs,./providers/fal,./providers/replicate,./providers/stability. PollContext.materializeis removed from the media protocol interface. Any custom queued protocol that called it will break.- Provider errors with Stability's
{ id, name, errors }body shape no longer take their code fromname. - Callers need to move to a gateway (Vercel AI Gateway, OpenRouter, Cloudflare Workers AI) for FLUX or Stable Diffusion.
No blocking concerns. Two comments still mention fal: the Auth.scheme doc in src/route/auth.ts and the status_url note in src/route/media.ts. Updating them is optional.
897811b to
81495b9
Compare
There was a problem hiding this comment.
I found no new problems. The new head is a rebase onto dev, which now includes MiniMax images (#59929). The removal diff is unchanged apart from README table context, and the MiniMax protocol doesn't use the removed PollContext.materialize. On the new head, typecheck:tsc is clean and bun test passes in packages/ai (1952 pass, 0 fail).
The public API impact is the same as before (breaking for @opencode/ai callers): the Fal, BlackForestLabs, Replicate and Stability namespaces and their ./providers/* subpaths are removed, along with PollContext.materialize and the Stability error-code branch.
There was a problem hiding this comment.
The new commit fixes the two leftover fal comments from my last review: the Auth.scheme doc in src/route/auth.ts now cites Deepgram's Token, and the absolute-URL note in src/route/media.ts no longer names fal. It changes only comments, so there was nothing new to run.
There are no new concerns. The public API impact is still the breaking removal of the Fal, BlackForestLabs, Replicate and Stability providers and their ./providers/* subpaths, plus PollContext.materialize and the Stability error-code branch.
2cb97b1 to
abd4def
Compare
Problem
packages/aiships four media providers that nothing in opencode can reach: fal, Black Forest Labs, Replicate and Stability. Core doesn't wire them up and they aren't in models.dev, so they're code we'd have to maintain and re-record before the AI package launches, with no users inside opencode. FLUX and Stable Diffusion are still reachable through gateways we already support, like Vercel AI Gateway, OpenRouter and Cloudflare Workers AI.Change
I removed the providers, their protocols, tests and recordings:
Plus the cases for them in
exports,image,video,promise, type tests and the README.Two small bits of shared code only these providers used are gone too:
PollContext.materialize, which only BFL used to download short-lived result URLs{ id, name, errors }branch in the provider error classifierThe shared queued media plumbing stays, since Google, xAI and Runway video and AssemblyAI transcription use it.
Image.start/Image.resumestay as public API, though no image provider is queued right now.Breaking change
@opencode/aiis on npm (2.2.0). Anyone importingFal,BlackForestLabs,ReplicateorStability, or the@opencode/ai/providers/{fal,black-forest-labs,replicate,stability}subpaths, will break on the next release.Overlap with open PRs
#59927 touches
bfl-images.ts. Whichever of these merges second needs a trivial rebase: drop those hunks. #59947 (fal-images) already merged, and this PR is based on top of it.Verification
packages/ai:bun typecheck,bun run typecheck:tsc,bun test(1941 pass, 0 fail)packages/core:bun typecheckbun run checkfal,black-forest-labs,bfl,replicate,stabilityandFalQueueoutsidepackages/aifound no references, apart from gateway model IDs in the models.dev snapshotAdded by the opencode bot (AI-generated).
Public API: removes the Fal, BlackForestLabs, Replicate and Stability providers and their @opencode/ai/providers/* subpaths, plus PollContext.materialize (breaking)