Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

unsupportedFileSourceError.md

34 lines851 Bytes

1---
2id: unsupportedFileSourceError
3title: unsupportedFileSourceError
4---
5​
6```ts
7function unsupportedFileSourceError(providerName, detail?): Error;
8```
9​
10Defined in: packages/ai/src/utilities/content-source.ts:53
11​
12Build the standard error a non-issuer adapter throws when it encounters a
13`{ type: 'file' }` source it can't consume — either because the provider has
14no file-reference input surface, or because the endpoint requires raw bytes
15(image edits, Veo) rather than a reference.
16​
17## Parameters
18​
19### providerName
20​
21`string`
22​
23### detail?
24​
25`string`
26​
27Optional context appended to the message (e.g. a modality or
28endpoint name, or a pointer to the adapter that does support references).
29When provided it replaces the generic remediation tail, so a site-specific
30hint ("pass inline bytes") is never contradicted by generic advice.
31​
32## Returns
33​
34`Error`