Skip to content

Commit 5bafc5c

Browse files
samdentyshaperlgrammel
authored
fix (providers/fal): improve model compatibility (#5855) (#5892)
Co-authored-by: Walter Korman <shaper@vercel.com> Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
1 parent 99466ff commit 5bafc5c

4 files changed

Lines changed: 34 additions & 2 deletions

File tree

.changeset/slimy-chefs-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ai-sdk/fal': patch
3+
---
4+
5+
fix (providers/fal): improve model compatibility
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { fal } from '@ai-sdk/fal';
2+
import { experimental_generateImage as generateImage } from 'ai';
3+
import { presentImages } from '../lib/present-image';
4+
import 'dotenv/config';
5+
6+
async function main() {
7+
const { images } = await generateImage({
8+
model: fal.image('fal-ai/luma-photon'),
9+
prompt: 'A hyrax atop a stump in a forest among fireflies at dusk',
10+
});
11+
await presentImages(images);
12+
}
13+
14+
main().catch(console.error);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { fal } from '@ai-sdk/fal';
2+
import { experimental_generateImage as generateImage } from 'ai';
3+
import { presentImages } from '../lib/present-image';
4+
import 'dotenv/config';
5+
6+
async function main() {
7+
const { images } = await generateImage({
8+
model: fal.image('fal-ai/recraft-v3'),
9+
prompt:
10+
'A Sumatran rhino meandering through a dense forest among fireflies at dusk',
11+
});
12+
await presentImages(images);
13+
}
14+
15+
main().catch(console.error);

packages/fal/src/fal-image-model.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ const falErrorSchema = z.union([falValidationErrorSchema, falHttpErrorSchema]);
173173

174174
const falImageSchema = z.object({
175175
url: z.string(),
176-
width: z.number(),
177-
height: z.number(),
178176
content_type: z.string(),
179177
});
180178

0 commit comments

Comments
 (0)