feat(ai): Add auto-generated TypeScript models with factory function
- Generate models.generated.ts from models.json with proper types - Categorize providers: OpenAI (Responses), OpenAI-compatible, Anthropic, Gemini - Create createLLM() factory with TypeScript overloads for type safety - Auto-detect base URLs and environment variables for providers - Support 353 models across 39 providers with full autocompletion - Exclude generated file from git (rebuilt on npm build)
This commit is contained in:
@@ -3,6 +3,21 @@
|
||||
|
||||
export const version = "0.5.8";
|
||||
|
||||
// Export generated models and factory
|
||||
export {
|
||||
ANTHROPIC_MODELS,
|
||||
type AnthropicModel,
|
||||
type CreateLLMOptions,
|
||||
createLLM,
|
||||
GEMINI_MODELS,
|
||||
type GeminiModel,
|
||||
type ModelData,
|
||||
OPENAI_COMPATIBLE_PROVIDERS,
|
||||
OPENAI_MODELS,
|
||||
type OpenAICompatibleProvider,
|
||||
type OpenAIModel,
|
||||
type ProviderData,
|
||||
} from "./models.generated.js";
|
||||
// Export models utilities
|
||||
export {
|
||||
getAllProviders,
|
||||
|
||||
Reference in New Issue
Block a user