@redplanethq/sdk 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -54,6 +54,68 @@ declare const LLMModelType: {
54
54
  };
55
55
  type LLMModelType = (typeof LLMModelType)[keyof typeof LLMModelType];
56
56
 
57
+ /**
58
+ * Unified LLM provider catalog. Single source of truth shared across:
59
+ * - Webapp env validator (apps/webapp/app/env.server.ts) → CHAT_PROVIDERS
60
+ * - Webapp BYOK service (services/byok.server.ts) → BYOK_PROVIDERS
61
+ * - Webapp BYOK API route (routes/api.v1.byok.tsx) → BYOK_PROVIDERS
62
+ * - Webapp BYOK UI (routes/settings.workspace.models.tsx) → BYOK_PROVIDER_SPECS
63
+ * - CLI self-host wizard (packages/cli/src/utils/setup/local.ts)
64
+ *
65
+ * Add a provider here, every surface picks it up.
66
+ */
67
+ interface ProviderBaseUrl {
68
+ /** Env var name (e.g. "OPENAI_BASE_URL"). */
69
+ var: string;
70
+ /** Whether the user MUST supply a value (true for azure/ollama, false for openai's optional proxy). */
71
+ required: boolean;
72
+ /** Placeholder shown in the wizard / settings form. */
73
+ placeholder: string;
74
+ /** Short hint shown alongside the input. */
75
+ hint?: string;
76
+ }
77
+ interface ProviderSpec {
78
+ /** Stable string id (matches CHAT_PROVIDER env value, BYOK provider type). */
79
+ id: string;
80
+ /** Human-readable label. */
81
+ label: string;
82
+ /** Eligible as a server-level CHAT_PROVIDER env value. */
83
+ serverDefault: boolean;
84
+ /** Eligible to be configured as a per-workspace BYOK key. */
85
+ byokSupported: boolean;
86
+ /** Env var holding the API key, or null when the provider doesn't use one (ollama). */
87
+ apiKeyVar: string | null;
88
+ /** Placeholder string for the API key field (e.g. "sk-...", "sk-ant-..."). */
89
+ apiKeyPlaceholder: string;
90
+ /** Optional/required base URL (openai proxy, azure endpoint, ollama URL). */
91
+ baseUrl?: ProviderBaseUrl;
92
+ /** Marks the provider as Azure-style (special UI handling for endpoint+key forms). */
93
+ isAzure?: boolean;
94
+ /** Default chat model the wizard suggests. */
95
+ defaultChatModel: string;
96
+ /** Optional hint displayed near the model input (e.g. routing prefix conventions). */
97
+ modelHint?: string;
98
+ }
99
+ declare const PROVIDER_SPECS: Record<string, ProviderSpec>;
100
+ declare const ALL_PROVIDERS: string[];
101
+ /** Providers eligible as a server-level CHAT_PROVIDER env value. */
102
+ declare const CHAT_PROVIDERS: readonly [string, ...string[]];
103
+ /** Providers eligible as a per-workspace BYOK key. */
104
+ declare const BYOK_PROVIDERS: readonly [string, ...string[]];
105
+ /** Providers that can also be used as embeddings backends. */
106
+ declare const EMBEDDING_PROVIDERS: readonly ["openai", "google", "ollama", "azure"];
107
+ type ChatProvider = (typeof CHAT_PROVIDERS)[number];
108
+ type BYOKProvider = (typeof BYOK_PROVIDERS)[number];
109
+ type EmbeddingProvider = (typeof EMBEDDING_PROVIDERS)[number];
110
+ declare function isSupportedProvider(id: string): boolean;
111
+ declare function isByokProvider(id: string): boolean;
112
+ declare function isChatProvider(id: string): boolean;
113
+ /**
114
+ * Convenience accessor: returns the spec for an id, throwing on unknowns.
115
+ * Use the boolean guards above for validation paths.
116
+ */
117
+ declare function getProviderSpec(id: string): ProviderSpec;
118
+
57
119
  /**
58
120
  * Interface for document node in the reified knowledge graph
59
121
  * Documents are parent containers for episodic chunks
@@ -1367,4 +1429,4 @@ declare class CoreClient {
1367
1429
  checkAuth(): Promise<MeResponse>;
1368
1430
  }
1369
1431
 
1370
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
1432
+ export { ALL_PROVIDERS, APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, type BYOKProvider, BYOK_PROVIDERS, CHAT_PROVIDERS, COMPACTED_SESSION_NODE_PROPERTIES, type ChatProvider, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, EMBEDDING_PROVIDERS, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EmbeddingProvider, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, PROVIDER_SPECS, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, type ProviderBaseUrl, type ProviderSpec, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec, getProviderSpec, isByokProvider, isChatProvider, isSupportedProvider };
package/dist/index.d.ts CHANGED
@@ -54,6 +54,68 @@ declare const LLMModelType: {
54
54
  };
55
55
  type LLMModelType = (typeof LLMModelType)[keyof typeof LLMModelType];
56
56
 
57
+ /**
58
+ * Unified LLM provider catalog. Single source of truth shared across:
59
+ * - Webapp env validator (apps/webapp/app/env.server.ts) → CHAT_PROVIDERS
60
+ * - Webapp BYOK service (services/byok.server.ts) → BYOK_PROVIDERS
61
+ * - Webapp BYOK API route (routes/api.v1.byok.tsx) → BYOK_PROVIDERS
62
+ * - Webapp BYOK UI (routes/settings.workspace.models.tsx) → BYOK_PROVIDER_SPECS
63
+ * - CLI self-host wizard (packages/cli/src/utils/setup/local.ts)
64
+ *
65
+ * Add a provider here, every surface picks it up.
66
+ */
67
+ interface ProviderBaseUrl {
68
+ /** Env var name (e.g. "OPENAI_BASE_URL"). */
69
+ var: string;
70
+ /** Whether the user MUST supply a value (true for azure/ollama, false for openai's optional proxy). */
71
+ required: boolean;
72
+ /** Placeholder shown in the wizard / settings form. */
73
+ placeholder: string;
74
+ /** Short hint shown alongside the input. */
75
+ hint?: string;
76
+ }
77
+ interface ProviderSpec {
78
+ /** Stable string id (matches CHAT_PROVIDER env value, BYOK provider type). */
79
+ id: string;
80
+ /** Human-readable label. */
81
+ label: string;
82
+ /** Eligible as a server-level CHAT_PROVIDER env value. */
83
+ serverDefault: boolean;
84
+ /** Eligible to be configured as a per-workspace BYOK key. */
85
+ byokSupported: boolean;
86
+ /** Env var holding the API key, or null when the provider doesn't use one (ollama). */
87
+ apiKeyVar: string | null;
88
+ /** Placeholder string for the API key field (e.g. "sk-...", "sk-ant-..."). */
89
+ apiKeyPlaceholder: string;
90
+ /** Optional/required base URL (openai proxy, azure endpoint, ollama URL). */
91
+ baseUrl?: ProviderBaseUrl;
92
+ /** Marks the provider as Azure-style (special UI handling for endpoint+key forms). */
93
+ isAzure?: boolean;
94
+ /** Default chat model the wizard suggests. */
95
+ defaultChatModel: string;
96
+ /** Optional hint displayed near the model input (e.g. routing prefix conventions). */
97
+ modelHint?: string;
98
+ }
99
+ declare const PROVIDER_SPECS: Record<string, ProviderSpec>;
100
+ declare const ALL_PROVIDERS: string[];
101
+ /** Providers eligible as a server-level CHAT_PROVIDER env value. */
102
+ declare const CHAT_PROVIDERS: readonly [string, ...string[]];
103
+ /** Providers eligible as a per-workspace BYOK key. */
104
+ declare const BYOK_PROVIDERS: readonly [string, ...string[]];
105
+ /** Providers that can also be used as embeddings backends. */
106
+ declare const EMBEDDING_PROVIDERS: readonly ["openai", "google", "ollama", "azure"];
107
+ type ChatProvider = (typeof CHAT_PROVIDERS)[number];
108
+ type BYOKProvider = (typeof BYOK_PROVIDERS)[number];
109
+ type EmbeddingProvider = (typeof EMBEDDING_PROVIDERS)[number];
110
+ declare function isSupportedProvider(id: string): boolean;
111
+ declare function isByokProvider(id: string): boolean;
112
+ declare function isChatProvider(id: string): boolean;
113
+ /**
114
+ * Convenience accessor: returns the spec for an id, throwing on unknowns.
115
+ * Use the boolean guards above for validation paths.
116
+ */
117
+ declare function getProviderSpec(id: string): ProviderSpec;
118
+
57
119
  /**
58
120
  * Interface for document node in the reified knowledge graph
59
121
  * Documents are parent containers for episodic chunks
@@ -1367,4 +1429,4 @@ declare class CoreClient {
1367
1429
  checkAuth(): Promise<MeResponse>;
1368
1430
  }
1369
1431
 
1370
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
1432
+ export { ALL_PROVIDERS, APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, type BYOKProvider, BYOK_PROVIDERS, CHAT_PROVIDERS, COMPACTED_SESSION_NODE_PROPERTIES, type ChatProvider, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, EMBEDDING_PROVIDERS, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EmbeddingProvider, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, PROVIDER_SPECS, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, type ProviderBaseUrl, type ProviderSpec, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec, getProviderSpec, isByokProvider, isChatProvider, isSupportedProvider };
package/dist/index.js CHANGED
@@ -78,6 +78,163 @@ var GeminiModels = [
78
78
  exports.LLMModelEnum.GEMINI20FLASHLITE
79
79
  ];
80
80
 
81
+ // ../types/dist/llm/providers.js
82
+ var PROVIDER_SPECS = {
83
+ openai: {
84
+ id: "openai",
85
+ label: "OpenAI",
86
+ serverDefault: true,
87
+ byokSupported: true,
88
+ apiKeyVar: "OPENAI_API_KEY",
89
+ apiKeyPlaceholder: "sk-...",
90
+ baseUrl: {
91
+ var: "OPENAI_BASE_URL",
92
+ required: false,
93
+ placeholder: "https://api.openai.com/v1",
94
+ hint: "Leave blank for OpenAI direct, or paste an OpenAI-compatible proxy URL"
95
+ },
96
+ defaultChatModel: "gpt-5.2-2025-12-11"
97
+ },
98
+ anthropic: {
99
+ id: "anthropic",
100
+ label: "Anthropic",
101
+ serverDefault: true,
102
+ byokSupported: true,
103
+ apiKeyVar: "ANTHROPIC_API_KEY",
104
+ apiKeyPlaceholder: "sk-ant-...",
105
+ defaultChatModel: "claude-opus-4-7"
106
+ },
107
+ google: {
108
+ id: "google",
109
+ label: "Google",
110
+ serverDefault: true,
111
+ byokSupported: true,
112
+ apiKeyVar: "GOOGLE_GENERATIVE_AI_API_KEY",
113
+ apiKeyPlaceholder: "AIza...",
114
+ defaultChatModel: "gemini-2.5-pro"
115
+ },
116
+ ollama: {
117
+ id: "ollama",
118
+ label: "Ollama (local)",
119
+ serverDefault: true,
120
+ byokSupported: true,
121
+ apiKeyVar: null,
122
+ apiKeyPlaceholder: "",
123
+ baseUrl: {
124
+ var: "OLLAMA_URL",
125
+ required: true,
126
+ placeholder: "http://localhost:11434",
127
+ hint: "URL of your local Ollama server"
128
+ },
129
+ defaultChatModel: "llama3.2",
130
+ modelHint: "Use model IDs like ollama/llama3.2"
131
+ },
132
+ azure: {
133
+ id: "azure",
134
+ label: "Azure OpenAI",
135
+ serverDefault: true,
136
+ byokSupported: true,
137
+ apiKeyVar: "AZURE_API_KEY",
138
+ apiKeyPlaceholder: "sk-...",
139
+ baseUrl: {
140
+ var: "AZURE_BASE_URL",
141
+ required: true,
142
+ placeholder: "https://<resource>.openai.azure.com/openai/v1",
143
+ hint: "Your Azure OpenAI resource endpoint"
144
+ },
145
+ isAzure: true,
146
+ defaultChatModel: "gpt-4o",
147
+ modelHint: "Use model IDs like azure/gpt-4o (deployment name after azure/)"
148
+ },
149
+ openrouter: {
150
+ id: "openrouter",
151
+ label: "OpenRouter",
152
+ serverDefault: true,
153
+ byokSupported: true,
154
+ apiKeyVar: "OPENROUTER_API_KEY",
155
+ apiKeyPlaceholder: "sk-or-...",
156
+ defaultChatModel: "openrouter/anthropic/claude-3.5-haiku",
157
+ modelHint: "Use model IDs like openrouter/anthropic/claude-3.5-haiku"
158
+ },
159
+ deepseek: {
160
+ id: "deepseek",
161
+ label: "DeepSeek",
162
+ serverDefault: true,
163
+ byokSupported: true,
164
+ apiKeyVar: "DEEPSEEK_API_KEY",
165
+ apiKeyPlaceholder: "sk-...",
166
+ defaultChatModel: "deepseek-chat"
167
+ },
168
+ vercel: {
169
+ id: "vercel",
170
+ label: "Vercel AI Gateway",
171
+ serverDefault: true,
172
+ byokSupported: true,
173
+ apiKeyVar: "VERCEL_AI_GATEWAY_API_KEY",
174
+ apiKeyPlaceholder: "aig-...",
175
+ defaultChatModel: "vercel/anthropic/claude-sonnet-4-5",
176
+ modelHint: "Use model IDs like vercel/anthropic/claude-sonnet-4-5"
177
+ },
178
+ groq: {
179
+ id: "groq",
180
+ label: "Groq",
181
+ serverDefault: true,
182
+ byokSupported: true,
183
+ apiKeyVar: "GROQ_API_KEY",
184
+ apiKeyPlaceholder: "gsk_...",
185
+ defaultChatModel: "groq/llama-3.3-70b-versatile",
186
+ modelHint: "Use model IDs like groq/llama-3.3-70b-versatile"
187
+ },
188
+ mistral: {
189
+ id: "mistral",
190
+ label: "Mistral",
191
+ serverDefault: true,
192
+ byokSupported: true,
193
+ apiKeyVar: "MISTRAL_API_KEY",
194
+ apiKeyPlaceholder: "...",
195
+ defaultChatModel: "mistral-large-latest"
196
+ },
197
+ xai: {
198
+ id: "xai",
199
+ label: "xAI (Grok)",
200
+ serverDefault: true,
201
+ byokSupported: true,
202
+ apiKeyVar: "XAI_API_KEY",
203
+ apiKeyPlaceholder: "xai-...",
204
+ defaultChatModel: "grok-3-mini",
205
+ modelHint: "Use model IDs like grok-3-mini"
206
+ }
207
+ };
208
+ var ALL_PROVIDERS = Object.keys(PROVIDER_SPECS);
209
+ var CHAT_PROVIDERS = ALL_PROVIDERS.filter((id) => PROVIDER_SPECS[id].serverDefault);
210
+ var BYOK_PROVIDERS = ALL_PROVIDERS.filter((id) => PROVIDER_SPECS[id].byokSupported);
211
+ var EMBEDDING_PROVIDERS = [
212
+ "openai",
213
+ "google",
214
+ "ollama",
215
+ "azure"
216
+ ];
217
+ function isSupportedProvider(id) {
218
+ return id in PROVIDER_SPECS;
219
+ }
220
+ __name(isSupportedProvider, "isSupportedProvider");
221
+ function isByokProvider(id) {
222
+ var _a;
223
+ return ((_a = PROVIDER_SPECS[id]) === null || _a === void 0 ? void 0 : _a.byokSupported) === true;
224
+ }
225
+ __name(isByokProvider, "isByokProvider");
226
+ function isChatProvider(id) {
227
+ var _a;
228
+ return ((_a = PROVIDER_SPECS[id]) === null || _a === void 0 ? void 0 : _a.serverDefault) === true;
229
+ }
230
+ __name(isChatProvider, "isChatProvider");
231
+ function getProviderSpec(id) {
232
+ const spec = PROVIDER_SPECS[id];
233
+ if (!spec) throw new Error(`Unknown provider id: ${id}`);
234
+ return spec;
235
+ }
236
+ __name(getProviderSpec, "getProviderSpec");
237
+
81
238
  // ../types/dist/graph/graph.entity.js
82
239
  var EPISODIC_NODE_PROPERTIES = `{
83
240
  uuid: e.uuid,
@@ -832,13 +989,17 @@ var CoreClient = class {
832
989
  }
833
990
  };
834
991
 
992
+ exports.ALL_PROVIDERS = ALL_PROVIDERS;
835
993
  exports.ActionStatus = ActionStatus;
836
994
  exports.AuthorizationCodeResponseSchema = AuthorizationCodeResponseSchema;
995
+ exports.BYOK_PROVIDERS = BYOK_PROVIDERS;
996
+ exports.CHAT_PROVIDERS = CHAT_PROVIDERS;
837
997
  exports.COMPACTED_SESSION_NODE_PROPERTIES = COMPACTED_SESSION_NODE_PROPERTIES;
838
998
  exports.ClaudeModels = ClaudeModels;
839
999
  exports.CoreClient = CoreClient;
840
1000
  exports.CoreClientError = CoreClientError;
841
1001
  exports.DocumentSchema = DocumentSchema;
1002
+ exports.EMBEDDING_PROVIDERS = EMBEDDING_PROVIDERS;
842
1003
  exports.ENTITY_NODE_PROPERTIES = ENTITY_NODE_PROPERTIES;
843
1004
  exports.EPISODIC_NODE_PROPERTIES = EPISODIC_NODE_PROPERTIES;
844
1005
  exports.EXPLICIT_PATTERN_TYPES = EXPLICIT_PATTERN_TYPES;
@@ -869,6 +1030,7 @@ exports.MeResponseSchema = MeResponseSchema;
869
1030
  exports.OAuth2Params = OAuth2Params;
870
1031
  exports.OpenAIModels = OpenAIModels;
871
1032
  exports.PATTERN_TYPES = PATTERN_TYPES;
1033
+ exports.PROVIDER_SPECS = PROVIDER_SPECS;
872
1034
  exports.QUALITY_THRESHOLDS = QUALITY_THRESHOLDS;
873
1035
  exports.RegisterGatewayRequestSchema = RegisterGatewayRequestSchema;
874
1036
  exports.RegisterGatewayResponseSchema = RegisterGatewayResponseSchema;
@@ -880,5 +1042,9 @@ exports.StatementAspects = StatementAspects;
880
1042
  exports.TokenExchangeInputSchema = TokenExchangeInputSchema;
881
1043
  exports.TokenExchangeResponseSchema = TokenExchangeResponseSchema;
882
1044
  exports.VOICE_ASPECTS = VOICE_ASPECTS;
1045
+ exports.getProviderSpec = getProviderSpec;
1046
+ exports.isByokProvider = isByokProvider;
1047
+ exports.isChatProvider = isChatProvider;
1048
+ exports.isSupportedProvider = isSupportedProvider;
883
1049
  //# sourceMappingURL=index.js.map
884
1050
  //# sourceMappingURL=index.js.map