[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77NKKFZ246VFMCV8VF8GG82":3,"skill-same:01M77NKKFZ246VFMCV8VF8GG82":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77NKKFZ246VFMCV8VF8GG82","add-provider-package",null,"Guide for adding new AI provider packages to the AI SDK. Use when creating a new @ai-sdk\u002F\u003Cprovider> package to integrate an AI service into the SDK.","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fadd-provider-package\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Guide for adding new AI provider packages to the AI SDK. Use when creating a new @ai-sdk\u002F\u003Cprovider> package to integrate an AI service into the SDK.\"\n---\n## Adding a New Provider Package\n\nThis guide covers the process of creating a new `@ai-sdk\u002F\u003Cprovider>` package to integrate an AI service into the AI SDK.\n\n## First-Party vs Third-Party Providers\n\n- **Third-party packages**: Any provider can create a third-party package. We're happy to link to it from our documentation.\n- **First-party `@ai-sdk\u002F\u003Cprovider>` packages**: If you prefer a first-party package, please create an issue first to discuss.\n\n## Reference Example\n\nSee https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fpull\u002F8136\u002Ffiles for a complete example of adding a new provider.\n\n## Provider Architecture\n\nThe AI SDK uses a layered provider architecture following the adapter pattern:\n\n1. **Specifications** (`@ai-sdk\u002Fprovider`): Defines interfaces like `LanguageModelV4`, `EmbeddingModelV4`, etc.\n2. **Utilities** (`@ai-sdk\u002Fprovider-utils`): Shared code for implementing providers\n3. **Providers** (`@ai-sdk\u002F\u003Cprovider>`): Concrete implementations for each AI service\n4. **Core** (`ai`): High-level functions like `generateText`, `streamText`, `generateObject`\n\n## Step-by-Step Guide\n\n### 1. Create Package Structure\n\nCreate a new folder `packages\u002F\u003Cprovider>` with the following structure:\n\n```\npackages\u002F\u003Cprovider>\u002F\n├── src\u002F\n│   ├── index.ts                  # Main exports\n│   ├── version.ts                # Package version\n│   ├── \u003Cprovider>-provider.ts    # Provider implementation\n│   ├── \u003Cprovider>-provider.test.ts\n│   ├── \u003Cprovider>-*-options.ts   # Model-specific options\n│   └── \u003Cprovider>-*-model.ts     # Model implementations (e.g., language, embedding, image)\n├── package.json\n├── tsconfig.json\n├── tsconfig.build.json\n├── tsup.config.ts\n├── turbo.json\n├── vitest.node.config.js\n├── vitest.edge.config.js\n└── README.md\n```\n\nDo not create a `CHANGELOG.md` file. It will be auto-generated.\n\n### 2. Configure package.json\n\nSet up your `package.json` with:\n\n- `\"name\": \"@ai-sdk\u002F\u003Cprovider>\"`\n- `\"version\": \"0.0.0\"` (initial version, will be updated by changeset)\n- `\"type\": \"module\"`\n- `\"license\": \"Apache-2.0\"`\n- `\"sideEffects\": false`\n- Dependencies on `@ai-sdk\u002Fprovider` and `@ai-sdk\u002Fprovider-utils` (use `workspace:*`)\n- Dev dependencies: `@ai-sdk\u002Ftest-server`, `@types\u002Fnode`, `@vercel\u002Fai-tsconfig`, `tsup`, `typescript`, `zod`\n- `\"engines\": { \"node\": \">=22\" }`\n- Peer dependency on `zod` (both v3 and v4): `\"zod\": \"^3.25.76 || ^4.1.8\"`\n\nExample package entry point configuration:\n\n```json\n{\n  \"type\": \"module\",\n  \"main\": \".\u002Fdist\u002Findex.js\",\n  \"types\": \".\u002Fdist\u002Findex.d.ts\",\n  \"exports\": {\n    \".\u002Fpackage.json\": \".\u002Fpackage.json\",\n    \".\": {\n      \"types\": \".\u002Fdist\u002Findex.d.ts\",\n      \"import\": \".\u002Fdist\u002Findex.js\",\n      \"default\": \".\u002Fdist\u002Findex.js\"\n    }\n  }\n}\n```\n\n### 3. Create TypeScript Configurations\n\n**tsconfig.json**:\n\n```json\n{\n  \"extends\": \"@vercel\u002Fai-tsconfig\u002Fbase.json\",\n  \"include\": [\"src\u002F**\u002F*.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n```\n\n**tsconfig.build.json**:\n\n```json\n{\n  \"extends\": \".\u002Ftsconfig.json\",\n  \"exclude\": [\n    \"**\u002F*.test.ts\",\n    \"**\u002F*.test-d.ts\",\n    \"**\u002F__snapshots__\",\n    \"**\u002F__fixtures__\"\n  ]\n}\n```\n\n### 4. Configure Build Tool (tsup)\n\nCreate `tsup.config.ts`:\n\n```typescript\nimport { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src\u002Findex.ts'],\n  format: ['cjs', 'esm'],\n  dts: true,\n  sourcemap: true,\n  clean: true,\n});\n```\n\n### 5. Configure Test Runners\n\nCreate both `vitest.node.config.js` and `vitest.edge.config.js` (copy from existing provider like `anthropic`).\n\n### 6. Implement Provider\n\n**Provider implementation pattern**:\n\n```typescript\n\u002F\u002F \u003Cprovider>-provider.ts\nimport { NoSuchModelError } from '@ai-sdk\u002Fprovider';\nimport { loadApiKey } from '@ai-sdk\u002Fprovider-utils';\n\nexport interface ProviderSettings {\n  apiKey?: string;\n  baseURL?: string;\n  \u002F\u002F provider-specific settings\n}\n\nexport class ProviderInstance {\n  readonly apiKey?: string;\n  readonly baseURL?: string;\n\n  constructor(options: ProviderSettings = {}) {\n    this.apiKey = options.apiKey;\n    this.baseURL = options.baseURL;\n  }\n\n  private get baseConfig() {\n    return {\n      apiKey: () =>\n        loadApiKey({\n          apiKey: this.apiKey,\n          environmentVariableName: 'PROVIDER_API_KEY',\n          description: 'Provider API key',\n        }),\n      baseURL: this.baseURL ?? 'https:\u002F\u002Fapi.provider.com',\n    };\n  }\n\n  languageModel(modelId: string) {\n    return new ProviderLanguageModel(modelId, this.baseConfig);\n  }\n\n  \u002F\u002F Shorter alias\n  chat(modelId: string) {\n    return this.languageModel(modelId);\n  }\n}\n\n\u002F\u002F Export default instance\nexport const providerName = new ProviderInstance();\n```\n\n### 7. Implement Model Classes\n\nEach model type (language, embedding, image, etc.) should implement the appropriate interface from `@ai-sdk\u002Fprovider`:\n\n- `LanguageModelV4` for text generation models\n- `EmbeddingModelV4` for embedding models\n- `ImageModelV4` for image generation models\n- etc.\n\n**Schema guidelines**:\n\n**Provider Options** (user-facing):\n\n- Use `.optional()` unless `null` is meaningful\n- Be as restrictive as possible for future flexibility\n\n**Response Schemas** (API responses):\n\n- Use `.nullish()` instead of `.optional()`\n- Keep minimal - only include properties you need\n- Allow flexibility for provider API changes\n\n### 8. Create README.md\n\nInclude:\n\n- Brief description linking to documentation\n- Installation instructions\n- Basic usage example\n- Link to full documentation\n\n### 9. Write Tests\n\n- Unit tests for provider logic\n- API response parsing tests using fixtures in `__fixtures__` subdirectory\n- Both Node.js and Edge runtime tests\n\nSee `capture-api-response-test-fixture` skill for capturing real API responses for testing.\n\n### 10. Add Examples\n\nCreate examples in `examples\u002Fai-functions\u002Fsrc\u002F` for each model type the provider supports:\n\n- `generate-text\u002F\u003Cprovider>.ts` - Basic text generation\n- `stream-text\u002F\u003Cprovider>.ts` - Streaming text\n- `generate-object\u002F\u003Cprovider>.ts` - Structured output (if supported)\n- `stream-object\u002F\u003Cprovider>.ts` - Streaming structured output (if supported)\n- `embed\u002F\u003Cprovider>.ts` - Embeddings (if supported)\n- `generate-image\u002F\u003Cprovider>.ts` - Image generation (if supported)\n- etc.\n\nAdd feature-specific examples as needed (e.g., `\u003Cprovider>-tool-call.ts`, `\u003Cprovider>-cache-control.ts`).\n\n### 11. Add Documentation\n\nCreate documentation in `content\u002Fproviders\u002F01-ai-sdk-providers\u002F\u003Clast number + 10>-\u003Cprovider>.mdx`\n\nInclude:\n\n- Setup instructions\n- Available models\n- Model capabilities\n- Provider-specific options\n- Usage examples\n- API configuration\n\n### 12. Create Changeset\n\nRun `pnpm changeset` and:\n\n- Select the new provider package\n- Choose `major` version (for new packages starting at 0.0.0)\n- Describe what the package provides\n\n### 13. Update References\n\nRun `pnpm update-references` from the workspace root to update tsconfig references.\n\n### 14. Build and Test\n\n```bash\n# From workspace root\npnpm build\n\n# From provider package\ncd packages\u002F\u003Cprovider>\npnpm test              # Run all tests\npnpm test:node         # Run Node.js tests\npnpm test:edge         # Run Edge tests\npnpm type-check        # Type checking\n\n# From workspace root\npnpm type-check:full   # Full type check including examples\n```\n\n### 15. Run Examples\n\nTest your examples:\n\n```bash\ncd examples\u002Fai-functions\npnpm tsx src\u002Fgenerate-text\u002F\u003Cprovider>.ts\npnpm tsx src\u002Fstream-text\u002F\u003Cprovider>.ts\n```\n\n## Provider Method Naming\n\n- **Full names**: `languageModel(id)`, `imageModel(id)`, `embeddingModel(id)` (required)\n- **Short aliases**: `.chat(id)`, `.image(id)`, `.embedding(id)` (for DX)\n\n## File Naming Conventions\n\n- Source files: `kebab-case.ts`\n- Test files: `kebab-case.test.ts`\n- Type test files: `kebab-case.test-d.ts`\n- Provider classes: `\u003CProvider>Provider`, `\u003CProvider>LanguageModel`, etc.\n\n## Security Best Practices\n\n- Never use `JSON.parse` directly - use `parseJSON` or `safeParseJSON` from `@ai-sdk\u002Fprovider-utils`\n- Load API keys securely using `loadApiKey` from `@ai-sdk\u002Fprovider-utils`\n- Validate all API responses against schemas\n\n## Error Handling\n\nErrors should extend `AISDKError` from `@ai-sdk\u002Fprovider` and use a marker pattern:\n\n```typescript\nimport { AISDKError } from '@ai-sdk\u002Fprovider';\n\nconst name = 'AI_ProviderError';\nconst marker = `vercel.ai.error.${name}`;\nconst symbol = Symbol.for(marker);\n\nexport class ProviderError extends AISDKError {\n  private readonly [symbol] = true;\n\n  constructor({ message, cause }: { message: string; cause?: unknown }) {\n    super({ name, message, cause });\n  }\n\n  static isInstance(error: unknown): error is ProviderError {\n    return AISDKError.hasMarker(error, marker);\n  }\n}\n```\n\n## Pre-release Mode\n\nIf `main` is set up to publish `beta` releases, no further action is necessary. Just make sure not to backport it to the `vX.Y` stable branch since it will result in an npm version conflict once we exit pre-release mode on `main`.\n\n## Checklist\n\n- [ ] Package structure created in `packages\u002F\u003Cprovider>`\n- [ ] `package.json` configured with correct dependencies\n- [ ] TypeScript configs set up (`tsconfig.json`, `tsconfig.build.json`)\n- [ ] Build configuration (`tsup.config.ts`)\n- [ ] Test configurations (`vitest.node.config.js`, `vitest.edge.config.js`)\n- [ ] Provider implementation complete\n- [ ] Model classes implement appropriate interfaces\n- [ ] Unit tests written and passing\n- [ ] API response test fixtures captured\n- [ ] Examples created in `examples\u002Fai-functions\u002Fsrc\u002F`\n- [ ] Documentation added in `content\u002Fproviders\u002F01-ai-sdk-providers\u002F`\n- [ ] README.md written\n- [ ] Major changeset created\n- [ ] `pnpm update-references` run\n- [ ] All tests passing (`pnpm test` from package)\n- [ ] Type checking passing (`pnpm type-check:full` from root)\n- [ ] Examples run successfully\n\n## Common Issues\n\n- **Missing tsconfig references**: Run `pnpm update-references` from workspace root\n- **Type errors in examples**: Run `pnpm type-check:full` to catch issues early\n- **Test failures**: Ensure both Node and Edge tests pass\n- **Build errors**: Check that `tsup.config.ts` is configured correctly\n\n## Related Documentation\n\n- [Provider Architecture](..\u002F..\u002Fcontributing\u002Fprovider-architecture.md)\n- [Provider Development Notes](..\u002F..\u002Fcontributing\u002Fproviders.md)\n- [Develop AI Functions Example](..\u002Fdevelop-ai-functions-example\u002FSKILL.md)\n- [Capture API Response Test Fixture](..\u002Fcapture-api-response-test-fixture\u002FSKILL.md)\n","## Adding a New Provider Package\n\nThis guide covers the process of creating a new `@ai-sdk\u002F\u003Cprovider>` package to integrate an AI service into the AI SDK.\n\n## First-Party vs Third-Party Providers\n\n- **Third-party packages**: Any provider can create a third-party package. We're happy to link to it from our documentation.\n- **First-party `@ai-sdk\u002F\u003Cprovider>` packages**: If you prefer a first-party package, please create an issue first to discuss.\n\n## Reference Example\n\nSee https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fpull\u002F8136\u002Ffiles for a complete example of adding a new provider.\n\n## Provider Architecture\n\nThe AI SDK uses a layered provider architecture following the adapter pattern:\n\n1. **Specifications** (`@ai-sdk\u002Fprovider`): Defines interfaces like `LanguageModelV4`, `EmbeddingModelV4`, etc.\n2. **Utilities** (`@ai-sdk\u002Fprovider-utils`): Shared code for implementing providers\n3. **Providers** (`@ai-sdk\u002F\u003Cprovider>`): Concrete implementations for each AI service\n4. **Core** (`ai`): High-level functions like `generateText`, `streamText`, `generateObject`\n\n## Step-by-Step Guide\n\n### 1. Create Package Structure\n\nCreate a new folder `packages\u002F\u003Cprovider>` with the following structure:\n\n```\npackages\u002F\u003Cprovider>\u002F\n├── src\u002F\n│   ├── index.ts                  # Main exports\n│   ├── version.ts                # Package version\n│   ├── \u003Cprovider>-provider.ts    # Provider implementation\n│   ├── \u003Cprovider>-provider.test.ts\n│   ├── \u003Cprovider>-*-options.ts   # Model-specific options\n│   └── \u003Cprovider>-*-model.ts     # Model implementations (e.g., language, embedding, image)\n├── package.json\n├── tsconfig.json\n├── tsconfig.build.json\n├── tsup.config.ts\n├── turbo.json\n├── vitest.node.config.js\n├── vitest.edge.config.js\n└── README.md\n```\n\nDo not create a `CHANGELOG.md` file. It will be auto-generated.\n\n### 2. Configure package.json\n\nSet up your `package.json` with:\n\n- `\"name\": \"@ai-sdk\u002F\u003Cprovider>\"`\n- `\"version\": \"0.0.0\"` (initial version, will be updated by changeset)\n- `\"type\": \"module\"`\n- `\"license\": \"Apache-2.0\"`\n- `\"sideEffects\": false`\n- Dependencies on `@ai-sdk\u002Fprovider` and `@ai-sdk\u002Fprovider-utils` (use `workspace:*`)\n- Dev dependencies: `@ai-sdk\u002Ftest-server`, `@types\u002Fnode`, `@vercel\u002Fai-tsconfig`, `tsup`, `typescript`, `zod`\n- `\"engines\": { \"node\": \">=22\" }`\n- Peer dependency on `zod` (both v3 and v4): `\"zod\": \"^3.25.76 || ^4.1.8\"`\n\nExample package entry point configuration:\n\n```json\n{\n  \"type\": \"module\",\n  \"main\": \".\u002Fdist\u002Findex.js\",\n  \"types\": \".\u002Fdist\u002Findex.d.ts\",\n  \"exports\": {\n    \".\u002Fpackage.json\": \".\u002Fpackage.json\",\n    \".\": {\n      \"types\": \".\u002Fdist\u002Findex.d.ts\",\n      \"import\": \".\u002Fdist\u002Findex.js\",\n      \"default\": \".\u002Fdist\u002Findex.js\"\n    }\n  }\n}\n```\n\n### 3. Create TypeScript Configurations\n\n**tsconfig.json**:\n\n```json\n{\n  \"extends\": \"@vercel\u002Fai-tsconfig\u002Fbase.json\",\n  \"include\": [\"src\u002F**\u002F*.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n```\n\n**tsconfig.build.json**:\n\n```json\n{\n  \"extends\": \".\u002Ftsconfig.json\",\n  \"exclude\": [\n    \"**\u002F*.test.ts\",\n    \"**\u002F*.test-d.ts\",\n    \"**\u002F__snapshots__\",\n    \"**\u002F__fixtures__\"\n  ]\n}\n```\n\n### 4. Configure Build Tool (tsup)\n\nCreate `tsup.config.ts`:\n\n```typescript\nimport { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src\u002Findex.ts'],\n  format: ['cjs', 'esm'],\n  dts: true,\n  sourcemap: true,\n  clean: true,\n});\n```\n\n### 5. Configure Test Runners\n\nCreate both `vitest.node.config.js` and `vitest.edge.config.js` (copy from existing provider like `anthropic`).\n\n### 6. Implement Provider\n\n**Provider implementation pattern**:\n\n```typescript\n\u002F\u002F \u003Cprovider>-provider.ts\nimport { NoSuchModelError } from '@ai-sdk\u002Fprovider';\nimport { loadApiKey } from '@ai-sdk\u002Fprovider-utils';\n\nexport interface ProviderSettings {\n  apiKey?: string;\n  baseURL?: string;\n  \u002F\u002F provider-specific settings\n}\n\nexport class ProviderInstance {\n  readonly apiKey?: string;\n  readonly baseURL?: string;\n\n  constructor(options: ProviderSettings = {}) {\n    this.apiKey = options.apiKey;\n    this.baseURL = options.baseURL;\n  }\n\n  private get baseConfig() {\n    return {\n      apiKey: () =>\n        loadApiKey({\n          apiKey: this.apiKey,\n          environmentVariableName: 'PROVIDER_API_KEY',\n          description: 'Provider API key',\n        }),\n      baseURL: this.baseURL ?? 'https:\u002F\u002Fapi.provider.com',\n    };\n  }\n\n  languageModel(modelId: string) {\n    return new ProviderLanguageModel(modelId, this.baseConfig);\n  }\n\n  \u002F\u002F Shorter alias\n  chat(modelId: string) {\n    return this.languageModel(modelId);\n  }\n}\n\n\u002F\u002F Export default instance\nexport const providerName = new ProviderInstance();\n```\n\n### 7. Implement Model Classes\n\nEach model type (language, embedding, image, etc.) should implement the appropriate interface from `@ai-sdk\u002Fprovider`:\n\n- `LanguageModelV4` for text generation models\n- `EmbeddingModelV4` for embedding models\n- `ImageModelV4` for image generation models\n- etc.\n\n**Schema guidelines**:\n\n**Provider Options** (user-facing):\n\n- Use `.optional()` unless `null` is meaningful\n- Be as restrictive as possible for future flexibility\n\n**Response Schemas** (API responses):\n\n- Use `.nullish()` instead of `.optional()`\n- Keep minimal - only include properties you need\n- Allow flexibility for provider API changes\n\n### 8. Create README.md\n\nInclude:\n\n- Brief description linking to documentation\n- Installation instructions\n- Basic usage example\n- Link to full documentation\n\n### 9. Write Tests\n\n- Unit tests for provider logic\n- API response parsing tests using fixtures in `__fixtures__` subdirectory\n- Both Node.js and Edge runtime tests\n\nSee `capture-api-response-test-fixture` skill for capturing real API responses for testing.\n\n### 10. Add Examples\n\nCreate examples in `examples\u002Fai-functions\u002Fsrc\u002F` for each model type the provider supports:\n\n- `generate-text\u002F\u003Cprovider>.ts` - Basic text generation\n- `stream-text\u002F\u003Cprovider>.ts` - Streaming text\n- `generate-object\u002F\u003Cprovider>.ts` - Structured output (if supported)\n- `stream-object\u002F\u003Cprovider>.ts` - Streaming structured output (if supported)\n- `embed\u002F\u003Cprovider>.ts` - Embeddings (if supported)\n- `generate-image\u002F\u003Cprovider>.ts` - Image generation (if supported)\n- etc.\n\nAdd feature-specific examples as needed (e.g., `\u003Cprovider>-tool-call.ts`, `\u003Cprovider>-cache-control.ts`).\n\n### 11. Add Documentation\n\nCreate documentation in `content\u002Fproviders\u002F01-ai-sdk-providers\u002F\u003Clast number + 10>-\u003Cprovider>.mdx`\n\nInclude:\n\n- Setup instructions\n- Available models\n- Model capabilities\n- Provider-specific options\n- Usage examples\n- API configuration\n\n### 12. Create Changeset\n\nRun `pnpm changeset` and:\n\n- Select the new provider package\n- Choose `major` version (for new packages starting at 0.0.0)\n- Describe what the package provides\n\n### 13. Update References\n\nRun `pnpm update-references` from the workspace root to update tsconfig references.\n\n### 14. Build and Test\n\n```bash\n# From workspace root\npnpm build\n\n# From provider package\ncd packages\u002F\u003Cprovider>\npnpm test              # Run all tests\npnpm test:node         # Run Node.js tests\npnpm test:edge         # Run Edge tests\npnpm type-check        # Type checking\n\n# From workspace root\npnpm type-check:full   # Full type check including examples\n```\n\n### 15. Run Examples\n\nTest your examples:\n\n```bash\ncd examples\u002Fai-functions\npnpm tsx src\u002Fgenerate-text\u002F\u003Cprovider>.ts\npnpm tsx src\u002Fstream-text\u002F\u003Cprovider>.ts\n```\n\n## Provider Method Naming\n\n- **Full names**: `languageModel(id)`, `imageModel(id)`, `embeddingModel(id)` (required)\n- **Short aliases**: `.chat(id)`, `.image(id)`, `.embedding(id)` (for DX)\n\n## File Naming Conventions\n\n- Source files: `kebab-case.ts`\n- Test files: `kebab-case.test.ts`\n- Type test files: `kebab-case.test-d.ts`\n- Provider classes: `\u003CProvider>Provider`, `\u003CProvider>LanguageModel`, etc.\n\n## Security Best Practices\n\n- Never use `JSON.parse` directly - use `parseJSON` or `safeParseJSON` from `@ai-sdk\u002Fprovider-utils`\n- Load API keys securely using `loadApiKey` from `@ai-sdk\u002Fprovider-utils`\n- Validate all API responses against schemas\n\n## Error Handling\n\nErrors should extend `AISDKError` from `@ai-sdk\u002Fprovider` and use a marker pattern:\n\n```typescript\nimport { AISDKError } from '@ai-sdk\u002Fprovider';\n\nconst name = 'AI_ProviderError';\nconst marker = `vercel.ai.error.${name}`;\nconst symbol = Symbol.for(marker);\n\nexport class ProviderError extends AISDKError {\n  private readonly [symbol] = true;\n\n  constructor({ message, cause }: { message: string; cause?: unknown }) {\n    super({ name, message, cause });\n  }\n\n  static isInstance(error: unknown): error is ProviderError {\n    return AISDKError.hasMarker(error, marker);\n  }\n}\n```\n\n## Pre-release Mode\n\nIf `main` is set up to publish `beta` releases, no further action is necessary. Just make sure not to backport it to the `vX.Y` stable branch since it will result in an npm version conflict once we exit pre-release mode on `main`.\n\n## Checklist\n\n- [ ] Package structure created in `packages\u002F\u003Cprovider>`\n- [ ] `package.json` configured with correct dependencies\n- [ ] TypeScript configs set up (`tsconfig.json`, `tsconfig.build.json`)\n- [ ] Build configuration (`tsup.config.ts`)\n- [ ] Test configurations (`vitest.node.config.js`, `vitest.edge.config.js`)\n- [ ] Provider implementation complete\n- [ ] Model classes implement appropriate interfaces\n- [ ] Unit tests written and passing\n- [ ] API response test fixtures captured\n- [ ] Examples created in `examples\u002Fai-functions\u002Fsrc\u002F`\n- [ ] Documentation added in `content\u002Fproviders\u002F01-ai-sdk-providers\u002F`\n- [ ] README.md written\n- [ ] Major changeset created\n- [ ] `pnpm update-references` run\n- [ ] All tests passing (`pnpm test` from package)\n- [ ] Type checking passing (`pnpm type-check:full` from root)\n- [ ] Examples run successfully\n\n## Common Issues\n\n- **Missing tsconfig references**: Run `pnpm update-references` from workspace root\n- **Type errors in examples**: Run `pnpm type-check:full` to catch issues early\n- **Test failures**: Ensure both Node and Edge tests pass\n- **Build errors**: Check that `tsup.config.ts` is configured correctly\n\n## Related Documentation\n\n- [Provider Architecture](..\u002F..\u002Fcontributing\u002Fprovider-architecture.md)\n- [Provider Development Notes](..\u002F..\u002Fcontributing\u002Fproviders.md)\n- [Develop AI Functions Example](..\u002Fdevelop-ai-functions-example\u002FSKILL.md)\n- [Capture API Response Test Fixture](..\u002Fcapture-api-response-test-fixture\u002FSKILL.md)\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Fadd-provider-package",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill add-provider-package",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill add-provider-package",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill add-provider-package","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fadd-provider-package\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]