- Add PerplexityProvider (OpenAI-compatible, reads PERPLEXITY_API_KEY) - Add GeminiProvider (Google Generative Language API adapter, reads GEMINI_API_KEY) - Add createFallbackChain() — ordered provider chain, skips unconfigured, aggregates errors; allows any app to replace custom LLM fallback loops - Extend LLMProviderType with 'perplexity' | 'gemini' - Update factory to resolve and instantiate new provider types - Add PAID_PROVIDERS to llm-router registry (OpenAI, Perplexity) for apps using round-robin routing alongside free-tier providers - 27 tests covering fallback chain, new providers, error/edge cases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
825 B
TypeScript
32 lines
825 B
TypeScript
export { LlmRouter } from './router.js';
|
|
export type { TelemetryEntry } from './router.js';
|
|
|
|
export {
|
|
DEFAULT_PROVIDERS,
|
|
PAID_PROVIDERS,
|
|
createLocalOllamaProvider,
|
|
getAvailableProviders,
|
|
} from './registry.js';
|
|
export { classifyPrompt } from './classifier.js';
|
|
export { HealthTracker } from './health.js';
|
|
export { selectCandidates, pickNext, excludeCandidate, createRoundRobinState } from './selector.js';
|
|
export type { SelectionCandidate } from './selector.js';
|
|
export { sendChatCompletion } from './client.js';
|
|
|
|
export type {
|
|
ModelConfig,
|
|
ProviderConfig,
|
|
PromptCategory,
|
|
ClassificationResult,
|
|
HealthSnapshot,
|
|
RequestRecord,
|
|
RouterConfig,
|
|
ChatMessage,
|
|
ChatCompletionRequest,
|
|
ChatCompletionChoice,
|
|
ChatCompletionUsage,
|
|
ChatCompletionResponse,
|
|
RouteResult,
|
|
RoutePlan,
|
|
} from './types.js';
|