Contributions are welcome. Here is how to get started.
git clone https://github.com/Stackbilt-dev/llm-providers.git
cd llm-providers
npm installnpm run typecheck # Type-check without emitting
npm test # Run tests once
npm run test:watch # Re-run on file changes
npm run build # Compile to dist/-
Keep the core logic intact. This library was extracted from a production system. Changes to the provider implementations, circuit breaker, retry, or cost tracking logic should be well-motivated and tested.
-
No new runtime dependencies. The package has zero production dependencies by design. Dev dependencies (TypeScript, vitest, Cloudflare types) are fine.
-
Type safety. All public APIs must be fully typed. No
anyin exported signatures. -
Tests. New features or bug fixes should include tests. Run
npm testbefore submitting. -
Commits. Use conventional commit messages (
feat:,fix:,docs:,chore:).
- Create
src/providers/<name>.tsextendingBaseProvider. - Implement all abstract methods:
generateResponse,validateConfig,getModels,estimateCost,healthCheck. - Add the provider to
LLMProviderFactory.initializeProviders()insrc/factory.ts. - Export from
src/index.ts. - Add tests in
src/__tests__/.
By contributing, you agree that your contributions will be licensed under the Apache-2.0 license.