provider-adapter

Scaffold LLM provider adapters with core methods and factory registration.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/apireaisecurity/apire-ai-security-platform --skill provider-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: provider-adapter
Source: https://github.com/apireaisecurity/apire-ai-security-platform/tree/main/apire-redteam-kit/.agent/skills/provider-adapter
Command: npx skills add https://github.com/apireaisecurity/apire-ai-security-platform --skill provider-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold new LLM provider adapters following a standardized BaseProviderAdapter pattern, reducing boilerplate and speeding integration.

Core Features & Use Cases

  • Standardized scaffolding: generate adapter skeletons with core methods like formatRequest, buildHeaders, buildUrl, parseResponse, and fetchModels.
  • Easy integration: register adapters in AdapterFactory and wire them into the backend module for immediate use.
  • Provider expansion: add support for OpenAI-compatible, custom, and new providers (e.g., Groq, Perplexity, Together AI) with consistent interfaces.

Quick Start

Follow the scaffold steps to create a new provider adapter, register it in the factory, and wire it into the backend module.

Frequently Asked Questions about provider-adapter

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

FAQPage Schema
How do I create a new LLM provider adapter in NestJS?

To create a new LLM provider adapter in NestJS, scaffold the adapter class with core methods including formatRequest, buildHeaders, buildUrl, parseResponse, and fetchModels, then register it in the AdapterFactory to enable standardized API formatting.

What is the BaseProviderAdapter pattern for LLM integration?

The BaseProviderAdapter pattern is a standardized structure for LLM integration that defines required methods including formatRequest, buildHeaders, buildUrl, parseResponse, and fetchModels to ensure consistent interfaces across different providers.

How do I add support for OpenAI-compatible providers like Groq or Together AI?

To add support for OpenAI-compatible providers like Groq or Together AI, generate an adapter skeleton using the scaffold, wire it into the backend module, and register it in the AdapterFactory to enable immediate model discovery and standardized API formatting.

Can I use TypeScript to build custom LLM provider adapters?

Yes, you can use TypeScript to build custom LLM provider adapters. The scaffold generates adapter skeletons in TypeScript, implementing core methods and wiring steps required for production-ready adapters with standardized API formatting.

What steps are needed to register a new adapter in the AdapterFactory?

To register a new adapter in the AdapterFactory, add the provider to the ProviderType enum, implement the adapter class with core methods, register it in the factory, and expose it through the backend module for immediate use.

Does scaffolding LLM adapters work for mock providers?

Yes, scaffolding LLM adapters works for mock providers. The scaffold supports OpenAI-compatible, custom, and mock providers, applying consistent interfaces and core methods for production-ready adapter creation.