vercel/ai · error · Error
The provider does not support skills. Make sure it exposes a
Error message
The provider does not support skills. Make sure it exposes a skills() method.
What it means
uploadSkill (packages/ai/src/upload-skill/upload-skill.ts:33) resolves a SkillsV4 API from the provider: it uses `api.uploadSkill` if present, otherwise calls `api.skills()`. If the provider exposes neither, it throws this Error. Skills upload is an optional provider capability that this provider has not implemented.
Source
Thrown at packages/ai/src/upload-skill/upload-skill.ts:33
};
export async function uploadSkill({
api,
files,
displayTitle,
providerOptions,
}: {
api: SkillsV4 | ProviderV4;
} & Omit<SkillsV4UploadSkillCallOptions, 'files'> & {
files: UploadSkillFile[];
}): Promise<UploadSkillResult> {
const skillsApi: SkillsV4 =
'uploadSkill' in api
? api
: typeof api.skills === 'function'
? api.skills()
: (() => {
throw new Error(
'The provider does not support skills. Make sure it exposes a skills() method.',
);
})();
const normalizedFiles: SkillsV4File[] = files.map(file => ({
...file,
data:
file.data instanceof Uint8Array || typeof file.data === 'string'
? { type: 'data', data: file.data }
: file.data,
}));
const result = await skillsApi.uploadSkill({
files: normalizedFiles,
displayTitle,
providerOptions,
});
View on GitHub (pinned to 69428b1f8b)
Solutions
- Pass the correct provider instance that implements skills support (check `typeof provider.skills === 'function'`).
- Upgrade the provider package to a version with SkillsV4 (skills()/uploadSkill) support.
- Add a capability check before calling uploadSkill and handle unsupported providers gracefully.
- Choose a provider that supports skill uploads if this capability is required.
Example fix
// before
await uploadSkill({ api: openai('gpt-4o'), files }); // wrong object
// after
if (typeof openai.skills !== 'function') throw new Error('Skills unsupported');
await uploadSkill({ api: openai, files }); Defensive patterns
Strategy: type-guard
Validate before calling
function supportsSkills(api: unknown): api is { skills(): SkillsV4 } {
return api != null &&
(typeof (api as any).skills === 'function' || 'uploadSkill' in (api as any));
}
if (!supportsSkills(provider)) throw new Error('Provider does not support skill uploads'); Type guard
function hasSkillsApi(api: unknown): api is { skills(): SkillsV4 } | { uploadSkill: SkillsV4['uploadSkill'] } {
return typeof api === 'object' && api !== null &&
('uploadSkill' in api || typeof (api as { skills?: unknown }).skills === 'function');
} Try / catch
try {
await uploadSkill({ api: provider, files });
} catch (e) {
if (e instanceof Error && e.message.includes('does not support skills')) {
throw new Error(`${providerName} does not support skill uploads; use a provider with skills() support`);
}
throw e;
} Prevention
- Pass the provider instance (not a model) to uploadSkill.
- Feature-detect `typeof provider.skills === 'function'` before exposing skill upload UI.
- Upgrade provider packages to versions implementing SkillsV4.
- Document provider capability requirements where uploadSkill is used.
When it happens
Trigger: Calling `uploadSkill({ api: provider, files, ... })` with a provider instance that has no `skills()` factory method and no `uploadSkill` method.
Common situations: Calling uploadSkill against a provider package/version without skills support; passing a model or a different provider's object; using a provider that only supports files but not skills; outdated dependency versions.
Related errors
- The provider does not support file uploads. Make sure it exp
- maxEmbeddingsPerCall must be greater than 0
- maxInputBytesPerCall must be greater than 0
- No image generated.
- No object generated: the model did not return a response.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/98bb2fdddde44eb5.
Report an issue: GitHub.