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:
Mario Zechner 2025-08-25 21:31:29 +02:00
parent 9b8ea585bd
commit da66a97ea7
6 changed files with 414 additions and 2 deletions

View file

@ -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,