@jaypie/llm 1.3.9 → 1.3.10
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/cjs/constants.d.ts +53 -4
- package/dist/cjs/index.cjs +351 -122
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +65 -6
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/operate/adapters/AnthropicAdapter.d.ts +3 -2
- package/dist/cjs/operate/adapters/BedrockAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/GoogleAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/OpenAiAdapter.d.ts +7 -1
- package/dist/cjs/operate/adapters/OpenRouterAdapter.d.ts +5 -1
- package/dist/cjs/operate/adapters/XaiAdapter.d.ts +11 -1
- package/dist/cjs/operate/types.d.ts +3 -0
- package/dist/cjs/providers/google/types.d.ts +5 -0
- package/dist/cjs/types/LlmProvider.interface.d.ts +9 -0
- package/dist/cjs/util/effort.d.ts +42 -0
- package/dist/esm/constants.d.ts +53 -4
- package/dist/esm/index.d.ts +65 -6
- package/dist/esm/index.js +351 -122
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operate/adapters/AnthropicAdapter.d.ts +3 -2
- package/dist/esm/operate/adapters/BedrockAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/GoogleAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/OpenAiAdapter.d.ts +7 -1
- package/dist/esm/operate/adapters/OpenRouterAdapter.d.ts +5 -1
- package/dist/esm/operate/adapters/XaiAdapter.d.ts +11 -1
- package/dist/esm/operate/types.d.ts +3 -0
- package/dist/esm/providers/google/types.d.ts +5 -0
- package/dist/esm/types/LlmProvider.interface.d.ts +9 -0
- package/dist/esm/util/effort.d.ts +42 -0
- package/package.json +1 -1
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral reasoning-effort levels — a five-point relative scale that
|
|
3
|
+
* deliberately borrows no provider's vocabulary. Each adapter translates these
|
|
4
|
+
* to its provider's native control (OpenAI `reasoning.effort`, Anthropic
|
|
5
|
+
* `output_config.effort`, Gemini `thinkingLevel`/`thinkingBudget`, Grok
|
|
6
|
+
* `reasoning_effort`, OpenRouter `reasoning.effort`), spreading the scale across
|
|
7
|
+
* the provider's available range. Omitting `effort` leaves the provider default
|
|
8
|
+
* untouched, so it is safe to set across a fallback chain.
|
|
9
|
+
*/
|
|
10
|
+
export declare const EFFORT: {
|
|
11
|
+
readonly LOWEST: "lowest";
|
|
12
|
+
readonly LOW: "low";
|
|
13
|
+
readonly MEDIUM: "medium";
|
|
14
|
+
readonly HIGH: "high";
|
|
15
|
+
readonly HIGHEST: "highest";
|
|
16
|
+
};
|
|
17
|
+
export type LlmEffort = (typeof EFFORT)[keyof typeof EFFORT];
|
|
1
18
|
export declare const MODEL: {
|
|
2
19
|
FABLE: string;
|
|
3
20
|
OPUS: string;
|
|
@@ -7,13 +24,26 @@ export declare const MODEL: {
|
|
|
7
24
|
GEMINI_FLASH: string;
|
|
8
25
|
GEMINI_FLASH_LITE: string;
|
|
9
26
|
GEMINI_PRO: string;
|
|
27
|
+
SOL: string;
|
|
28
|
+
TERRA: string;
|
|
29
|
+
LUNA: string;
|
|
30
|
+
/** @deprecated use MODEL.SOL (gpt-5.6-sol) */
|
|
10
31
|
GPT: string;
|
|
32
|
+
/** @deprecated use MODEL.TERRA (gpt-5.6-terra) */
|
|
11
33
|
GPT_MINI: string;
|
|
34
|
+
/** @deprecated use MODEL.LUNA (gpt-5.6-luna) */
|
|
12
35
|
GPT_NANO: string;
|
|
13
36
|
GROK: string;
|
|
37
|
+
OPENROUTER: {
|
|
38
|
+
GLM: string;
|
|
39
|
+
LUNA: string;
|
|
40
|
+
SONNET: string;
|
|
41
|
+
};
|
|
14
42
|
};
|
|
15
43
|
export declare const PROVIDER: {
|
|
16
44
|
readonly BEDROCK: {
|
|
45
|
+
readonly DEFAULT: "amazon.nova-pro-v1:0";
|
|
46
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.BEDROCK.DEFAULT. */
|
|
17
47
|
readonly MODEL: {
|
|
18
48
|
readonly DEFAULT: "amazon.nova-lite-v1:0";
|
|
19
49
|
readonly LARGE: "amazon.nova-pro-v1:0";
|
|
@@ -25,16 +55,18 @@ export declare const PROVIDER: {
|
|
|
25
55
|
readonly REGION: "AWS_REGION";
|
|
26
56
|
};
|
|
27
57
|
readonly ANTHROPIC: {
|
|
58
|
+
readonly DEFAULT: string;
|
|
28
59
|
readonly MAX_TOKENS: {
|
|
29
60
|
readonly DEFAULT: 16384;
|
|
30
61
|
};
|
|
62
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.ANTHROPIC.DEFAULT, or pick a specific model from MODEL.*. */
|
|
31
63
|
readonly MODEL: {
|
|
32
64
|
readonly DEFAULT: "claude-sonnet-4-6";
|
|
33
65
|
readonly LARGE: "claude-opus-4-8";
|
|
34
66
|
readonly SMALL: "claude-sonnet-4-6";
|
|
35
67
|
readonly TINY: "claude-haiku-4-5";
|
|
36
68
|
};
|
|
37
|
-
readonly MODEL_MATCH_WORDS: readonly ["anthropic", "claude", "haiku", "opus", "sonnet"];
|
|
69
|
+
readonly MODEL_MATCH_WORDS: readonly ["anthropic", "claude", "fable", "haiku", "mythos", "opus", "sonnet"];
|
|
38
70
|
readonly NAME: "anthropic";
|
|
39
71
|
readonly PROMPT: {
|
|
40
72
|
readonly AI: "\n\nAssistant:";
|
|
@@ -51,6 +83,8 @@ export declare const PROVIDER: {
|
|
|
51
83
|
};
|
|
52
84
|
/** @deprecated Use PROVIDER.GOOGLE — "Google" is the provider; Gemini is the model family */
|
|
53
85
|
readonly GEMINI: {
|
|
86
|
+
readonly DEFAULT: string;
|
|
87
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.GOOGLE.DEFAULT, or pick a specific model from MODEL.*. */
|
|
54
88
|
readonly MODEL: {
|
|
55
89
|
readonly DEFAULT: "gemini-3.1-pro-preview";
|
|
56
90
|
readonly LARGE: "gemini-3.1-pro-preview";
|
|
@@ -65,6 +99,8 @@ export declare const PROVIDER: {
|
|
|
65
99
|
};
|
|
66
100
|
};
|
|
67
101
|
readonly GOOGLE: {
|
|
102
|
+
readonly DEFAULT: string;
|
|
103
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.GOOGLE.DEFAULT, or pick a specific model from MODEL.*. */
|
|
68
104
|
readonly MODEL: {
|
|
69
105
|
readonly DEFAULT: "gemini-3.1-pro-preview";
|
|
70
106
|
readonly LARGE: "gemini-3.1-pro-preview";
|
|
@@ -79,16 +115,20 @@ export declare const PROVIDER: {
|
|
|
79
115
|
};
|
|
80
116
|
};
|
|
81
117
|
readonly OPENAI: {
|
|
118
|
+
readonly DEFAULT: string;
|
|
119
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENAI.DEFAULT, or pick a specific model from MODEL.*. */
|
|
82
120
|
readonly MODEL: {
|
|
83
121
|
readonly DEFAULT: "gpt-5.4";
|
|
84
122
|
readonly LARGE: "gpt-5.5";
|
|
85
123
|
readonly SMALL: "gpt-5.4-mini";
|
|
86
124
|
readonly TINY: "gpt-5.4-nano";
|
|
87
125
|
};
|
|
88
|
-
readonly MODEL_MATCH_WORDS: readonly ["openai", "
|
|
126
|
+
readonly MODEL_MATCH_WORDS: readonly ["gpt", "luna", "openai", "sol", "terra", RegExp];
|
|
89
127
|
readonly NAME: "openai";
|
|
90
128
|
};
|
|
91
129
|
readonly OPENROUTER: {
|
|
130
|
+
readonly DEFAULT: string;
|
|
131
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENROUTER.DEFAULT, or pick a specific route from MODEL.OPENROUTER.*. */
|
|
92
132
|
readonly MODEL: {
|
|
93
133
|
readonly DEFAULT: "anthropic/claude-sonnet-4-6";
|
|
94
134
|
readonly LARGE: "anthropic/claude-opus-4-8";
|
|
@@ -107,6 +147,8 @@ export declare const PROVIDER: {
|
|
|
107
147
|
readonly XAI: {
|
|
108
148
|
readonly API_KEY: "XAI_API_KEY";
|
|
109
149
|
readonly BASE_URL: "https://api.x.ai/v1";
|
|
150
|
+
readonly DEFAULT: string;
|
|
151
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.XAI.DEFAULT, or pick a specific model from MODEL.*. */
|
|
110
152
|
readonly MODEL: {
|
|
111
153
|
readonly DEFAULT: "grok-latest";
|
|
112
154
|
readonly LARGE: "grok-latest";
|
|
@@ -119,6 +161,7 @@ export declare const PROVIDER: {
|
|
|
119
161
|
};
|
|
120
162
|
export type LlmProviderName = typeof PROVIDER.ANTHROPIC.NAME | typeof PROVIDER.BEDROCK.NAME | typeof PROVIDER.GOOGLE.NAME | typeof PROVIDER.OPENAI.NAME | typeof PROVIDER.OPENROUTER.NAME | typeof PROVIDER.XAI.NAME;
|
|
121
163
|
export declare const DEFAULT: {
|
|
164
|
+
/** @deprecated Size tiers are retired in 2.0. Use DEFAULT.PROVIDER.DEFAULT, or pick a specific model from MODEL.*. */
|
|
122
165
|
readonly MODEL: {
|
|
123
166
|
readonly BASE: "gpt-5.4";
|
|
124
167
|
readonly LARGE: "gpt-5.5";
|
|
@@ -126,19 +169,25 @@ export declare const DEFAULT: {
|
|
|
126
169
|
readonly TINY: "gpt-5.4-nano";
|
|
127
170
|
};
|
|
128
171
|
readonly PROVIDER: {
|
|
172
|
+
readonly DEFAULT: string;
|
|
173
|
+
/** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENAI.DEFAULT, or pick a specific model from MODEL.*. */
|
|
129
174
|
readonly MODEL: {
|
|
130
175
|
readonly DEFAULT: "gpt-5.4";
|
|
131
176
|
readonly LARGE: "gpt-5.5";
|
|
132
177
|
readonly SMALL: "gpt-5.4-mini";
|
|
133
178
|
readonly TINY: "gpt-5.4-nano";
|
|
134
179
|
};
|
|
135
|
-
readonly MODEL_MATCH_WORDS: readonly ["openai", "
|
|
180
|
+
readonly MODEL_MATCH_WORDS: readonly ["gpt", "luna", "openai", "sol", "terra", RegExp];
|
|
136
181
|
readonly NAME: "openai";
|
|
137
182
|
};
|
|
138
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* @deprecated Size-tier catalogs are retired in 2.0. Pick specific models from
|
|
186
|
+
* MODEL.* (grouped by provider via MODEL_MATCH_WORDS / determineModelProvider).
|
|
187
|
+
*/
|
|
139
188
|
export declare const ALL: {
|
|
140
189
|
readonly BASE: readonly ["claude-sonnet-4-6", "gemini-3.1-pro-preview", "gpt-5.4", "grok-latest"];
|
|
141
|
-
readonly COMBINED: readonly ("claude-
|
|
190
|
+
readonly COMBINED: readonly ("claude-opus-4-8" | "claude-haiku-4-5" | "gemini-3.5-flash" | "gemini-3.1-flash-lite" | "gemini-3.1-pro-preview" | "gpt-5.5" | "gpt-5.4-mini" | "gpt-5.4-nano" | "grok-latest" | "claude-sonnet-4-6" | "gpt-5.4" | "grok-4-1-fast-reasoning" | "grok-4-1-fast-non-reasoning")[];
|
|
142
191
|
readonly LARGE: readonly ["claude-opus-4-8", "gemini-3.1-pro-preview", "gpt-5.5", "grok-latest"];
|
|
143
192
|
readonly SMALL: readonly ["claude-sonnet-4-6", "gemini-3.5-flash", "gpt-5.4-mini", "grok-4-1-fast-reasoning"];
|
|
144
193
|
readonly TINY: readonly ["claude-haiku-4-5", "gemini-3.1-flash-lite", "gpt-5.4-nano", "grok-4-1-fast-non-reasoning"];
|