Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

index.ts

52 lines1.3 KB

1/**
2 * @module @tanstack/ai-llmgateway
3 *
4 * LLM Gateway provider adapter for TanStack AI.
5 * Provides tree-shakeable adapters for LLM Gateway's OpenAI-compatible Chat
6 * Completions API, which routes one endpoint to hundreds of models across
7 * many providers.
8 */
9​
10// Text (Chat) adapter
11export {
12 LLMGatewayTextAdapter,
13 createLLMGatewayText,
14 llmGatewayText,
15 type LLMGatewayTextConfig,
16 type LLMGatewayTextProviderOptions,
17} from './adapters/text'
18​
19// Summarize - thin factory functions over @tanstack/ai's ChatStreamSummarizeAdapter
20export {
21 createLLMGatewaySummarize,
22 llmGatewaySummarize,
23 type LLMGatewaySummarizeConfig,
24 type LLMGatewaySummarizeModel,
25} from './adapters/summarize'
26​
27// Types
28export type {
29 LLMGatewayChatModelProviderOptionsByName,
30 LLMGatewayChatModelToolCapabilitiesByName,
31 LLMGatewayModelInputModalitiesByName,
32 ResolveProviderOptions,
33 ResolveInputModalities,
34 LLMGatewayChatModels,
35 LLMGatewayModelId,
36} from './model-meta'
37export { LLMGATEWAY_CHAT_MODELS } from './model-meta'
38export type {
39 LLMGatewayTextMetadata,
40 LLMGatewayImageMetadata,
41 LLMGatewayAudioMetadata,
42 LLMGatewayVideoMetadata,
43 LLMGatewayDocumentMetadata,
44 LLMGatewayMessageMetadataByModality,
45} from './message-types'
46​
47// Utils
48export {
49 getLLMGatewayApiKeyFromEnv,
50 withLLMGatewayDefaults,
51 type LLMGatewayClientConfig,
52} from './utils/client'