@hevmind/ask 0.1.1 → 0.3.0

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/src/types.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /** Inference providers the search loop and digest builder can run against. */
2
+ export type ProviderName = 'anthropic' | 'openai' | 'openrouter';
3
+
1
4
  export interface HevAskOptions {
2
5
  /**
3
6
  * Content collection name(s) to index and search over.
@@ -6,8 +9,24 @@ export interface HevAskOptions {
6
9
  collections?: string[];
7
10
 
8
11
  /**
9
- * Claude model used by the bounded search loop.
10
- * @default 'claude-haiku-4-5'
12
+ * Inference provider for the agentic loop and the digest builder. Each
13
+ * provider reads its own key from the environment: `ANTHROPIC_API_KEY`,
14
+ * `OPENAI_API_KEY`, or `OPENROUTER_API_KEY`.
15
+ * @default 'anthropic'
16
+ */
17
+ provider?: ProviderName;
18
+
19
+ /**
20
+ * Override the provider's API base URL. Applies to the OpenAI-compatible
21
+ * providers only, so any Chat Completions-compatible endpoint works
22
+ * (e.g. a proxy or a self-hosted gateway).
23
+ */
24
+ providerBaseUrl?: string;
25
+
26
+ /**
27
+ * Model used by the bounded search loop. Defaults per provider:
28
+ * `claude-haiku-4-5` (anthropic), `gpt-4.1-mini` (openai),
29
+ * `anthropic/claude-haiku-4.5` (openrouter).
11
30
  */
12
31
  model?: string;
13
32
 
@@ -38,8 +57,9 @@ export interface HevAskOptions {
38
57
  answerMaxTokens?: number;
39
58
 
40
59
  /**
41
- * Model used by the offline digest builder.
42
- * @default 'claude-opus-4-8'
60
+ * Model used by the offline digest builder. Defaults per provider:
61
+ * `claude-opus-4-8` (anthropic), `gpt-5.1` (openai),
62
+ * `anthropic/claude-opus-4.8` (openrouter).
43
63
  */
44
64
  digestModel?: string;
45
65
 
@@ -69,8 +89,14 @@ export interface HevAskOptions {
69
89
  perDocCap?: number;
70
90
 
71
91
  /**
72
- * Path to the committed ask digest artifact, relative to the site root.
73
- * @default '.hev-ask/digest.json'
92
+ * Path to the committed ask digest tree, relative to the site root.
93
+ * @default '.hev-ask'
94
+ */
95
+ digestDir?: string;
96
+
97
+ /**
98
+ * Deprecated alias for `digestDir`.
99
+ * @default '.hev-ask'
74
100
  */
75
101
  digestPath?: string;
76
102
 
@@ -84,6 +110,8 @@ export interface HevAskOptions {
84
110
  /** The shape the integration serializes into `virtual:hev-ask/config`. */
85
111
  export interface ResolvedConfig {
86
112
  collections: string[] | null;
113
+ provider: ProviderName;
114
+ providerBaseUrl?: string;
87
115
  model: string;
88
116
  digestModel: string;
89
117
  endpoint: string;