add-provider-package

Scaffold and integrate a new provider package into the AI SDK.

Updated Dec 5, 2024
One-click install
npx skills add https://github.com/yeohj0710/wellnessbox --skill add-provider-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-provider-package
Source: https://github.com/yeohj0710/wellnessbox/tree/main/.agents/skills/add-provider-package
Command: npx skills add https://github.com/yeohj0710/wellnessbox --skill add-provider-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers systematically add new AI provider packages to the AI SDK, ensuring consistency, compatibility, and maintainability across providers.

Core Features & Use Cases

  • Establishes a standardized provider package structure (packages/<provider>/) with src, package.json, tsconfig, tsup, and test configurations.
  • Defines interfaces and patterns for provider implementations (LanguageModelV3, EmbeddingModelV3, etc.) and aligns with @ai-sdk/provider and @ai-sdk/provider-utils.
  • Guides the end-to-end process from scaffolding to publishing, including documentation, examples, tests, and updates to references.

Quick Start

Follow this guide to scaffold a new @ai-sdk provider package and integrate it into the SDK.

Frequently Asked Questions about add-provider-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new AI provider package to the AI SDK?

You add a new provider by scaffolding a standardized package structure with src, configurations, and tests. This enforces provider interfaces and documentation conventions to deliver production-ready packages.

What is the standardized structure for AI SDK provider packages?

The standardized provider package structure uses a packages/<provider>/ directory containing src, package.json, tsconfig, tsup, and test configurations to ensure consistency and maintainability across providers.

Which interfaces do I need to implement when creating an AI SDK provider?

You must implement interfaces like LanguageModelV3 and EmbeddingModelV3, aligning your package with @ai-sdk/provider and @ai-sdk/provider-utils for full compatibility.

What's the best way to ensure my AI provider package is production-ready?

The best way is to enforce provider interfaces and set up test scaffolding alongside tsup configurations. This delivers a standardized, compatible package ready for publishing.

Does scaffolding an AI SDK provider require TypeScript tooling setup?

Yes, scaffolding a provider requires TypeScript tooling setup. You must configure tsconfig for architecture layering and tsup for builds to maintain consistency across provider packages.

What documentation conventions must I follow when adding provider packages?

When adding provider packages, you must follow documentation conventions that include examples and reference updates. This ensures your provider is systematically integrated and maintainable.