Thanks for helping improve OpenProvider.
OpenProvider is a free-model LLM gateway, so contributions should keep provider keys server-side, preserve OpenAI-compatible behavior, and avoid exposing paid models when free-only mode is enabled.
npm install
cp .env.example .env
npm run build
npm run test:providersYou only need keys for the providers you want to test. Providers without keys are skipped.
- Run
npm run build. - Run
npm run lint. - Run
npm run security:auditwhen changing auth, API routes, provider credentials, request parsing, CORS, or remote media fetching. - Run
npm run verifybefore dependency upgrades or production deploy changes. - Run
npm run test:providerswhen changing provider discovery, routing, env loading, or model filtering. - Do not commit
.envor provider API keys. - Keep changes scoped to the provider, router, server, or docs area you are touching.
- Follow
ARCHITECTURE.mdwhen adding routes, components, or shared helpers. - Update
README.mdand.env.examplewhen adding or changing provider configuration.
- Add the provider id to
ProviderIdinsrc/core/types.ts. - Add env loading and default base URLs in
src/config/env.ts. - Add discovery path handling in
src/core/providerDiscovery.ts. - Add parser support in
src/core/modelDiscovery.tsif the provider response shape is different. - Add a fallback provider definition under
src/providers/. - Register the provider in
src/core/modelRegistry.ts. - Document the provider in
README.mdand.env.example. - Verify with
npm run test:providers.
OpenProvider should expose only free or free-allocation models by default.
- If a provider exposes pricing metadata, paid models must be filtered out.
- OpenRouter models should require explicit free markers or zero pricing.
- Non-chat models such as embeddings, rerank, OCR, audio, image, moderation, TTS, ASR, and transcription should be filtered out.
- If a provider has a free daily allocation but paid overage, document that clearly.
- Never print, log, or commit API keys.
- Keep platform secrets in
.envor deployment secrets only. - Save provider credentials through Account -> Provider setup so they stay encrypted per user.
- Do not add client-side code that talks directly to provider APIs.
- Treat provider response bodies carefully because error messages can sometimes include account details.
- Read
SECURITY.mdbefore changing authentication, API key handling, CORS, or credential storage.
Use short, descriptive commit messages:
add cloudflare workers ai provider
fix cohere chat model discovery
document provider setup