mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 04:02:35 +00:00
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:
parent
9b8ea585bd
commit
da66a97ea7
6 changed files with 414 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue