@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.
@@ -2,6 +2,23 @@ import * as _jaypie_types from '@jaypie/types';
2
2
  import { JsonObject, AnyValue, NaturalMap, NaturalSchema, JsonReturn } from '@jaypie/types';
3
3
  import { z } from 'zod/v4';
4
4
 
5
+ /**
6
+ * Provider-neutral reasoning-effort levels — a five-point relative scale that
7
+ * deliberately borrows no provider's vocabulary. Each adapter translates these
8
+ * to its provider's native control (OpenAI `reasoning.effort`, Anthropic
9
+ * `output_config.effort`, Gemini `thinkingLevel`/`thinkingBudget`, Grok
10
+ * `reasoning_effort`, OpenRouter `reasoning.effort`), spreading the scale across
11
+ * the provider's available range. Omitting `effort` leaves the provider default
12
+ * untouched, so it is safe to set across a fallback chain.
13
+ */
14
+ declare const EFFORT: {
15
+ readonly LOWEST: "lowest";
16
+ readonly LOW: "low";
17
+ readonly MEDIUM: "medium";
18
+ readonly HIGH: "high";
19
+ readonly HIGHEST: "highest";
20
+ };
21
+ type LlmEffort = (typeof EFFORT)[keyof typeof EFFORT];
5
22
  declare const MODEL: {
6
23
  FABLE: string;
7
24
  OPUS: string;
@@ -11,13 +28,26 @@ declare const MODEL: {
11
28
  GEMINI_FLASH: string;
12
29
  GEMINI_FLASH_LITE: string;
13
30
  GEMINI_PRO: string;
31
+ SOL: string;
32
+ TERRA: string;
33
+ LUNA: string;
34
+ /** @deprecated use MODEL.SOL (gpt-5.6-sol) */
14
35
  GPT: string;
36
+ /** @deprecated use MODEL.TERRA (gpt-5.6-terra) */
15
37
  GPT_MINI: string;
38
+ /** @deprecated use MODEL.LUNA (gpt-5.6-luna) */
16
39
  GPT_NANO: string;
17
40
  GROK: string;
41
+ OPENROUTER: {
42
+ GLM: string;
43
+ LUNA: string;
44
+ SONNET: string;
45
+ };
18
46
  };
19
47
  declare const PROVIDER: {
20
48
  readonly BEDROCK: {
49
+ readonly DEFAULT: "amazon.nova-pro-v1:0";
50
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.BEDROCK.DEFAULT. */
21
51
  readonly MODEL: {
22
52
  readonly DEFAULT: "amazon.nova-lite-v1:0";
23
53
  readonly LARGE: "amazon.nova-pro-v1:0";
@@ -29,16 +59,18 @@ declare const PROVIDER: {
29
59
  readonly REGION: "AWS_REGION";
30
60
  };
31
61
  readonly ANTHROPIC: {
62
+ readonly DEFAULT: string;
32
63
  readonly MAX_TOKENS: {
33
64
  readonly DEFAULT: 16384;
34
65
  };
66
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.ANTHROPIC.DEFAULT, or pick a specific model from MODEL.*. */
35
67
  readonly MODEL: {
36
68
  readonly DEFAULT: "claude-sonnet-4-6";
37
69
  readonly LARGE: "claude-opus-4-8";
38
70
  readonly SMALL: "claude-sonnet-4-6";
39
71
  readonly TINY: "claude-haiku-4-5";
40
72
  };
41
- readonly MODEL_MATCH_WORDS: readonly ["anthropic", "claude", "haiku", "opus", "sonnet"];
73
+ readonly MODEL_MATCH_WORDS: readonly ["anthropic", "claude", "fable", "haiku", "mythos", "opus", "sonnet"];
42
74
  readonly NAME: "anthropic";
43
75
  readonly PROMPT: {
44
76
  readonly AI: "\n\nAssistant:";
@@ -55,6 +87,8 @@ declare const PROVIDER: {
55
87
  };
56
88
  /** @deprecated Use PROVIDER.GOOGLE — "Google" is the provider; Gemini is the model family */
57
89
  readonly GEMINI: {
90
+ readonly DEFAULT: string;
91
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.GOOGLE.DEFAULT, or pick a specific model from MODEL.*. */
58
92
  readonly MODEL: {
59
93
  readonly DEFAULT: "gemini-3.1-pro-preview";
60
94
  readonly LARGE: "gemini-3.1-pro-preview";
@@ -69,6 +103,8 @@ declare const PROVIDER: {
69
103
  };
70
104
  };
71
105
  readonly GOOGLE: {
106
+ readonly DEFAULT: string;
107
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.GOOGLE.DEFAULT, or pick a specific model from MODEL.*. */
72
108
  readonly MODEL: {
73
109
  readonly DEFAULT: "gemini-3.1-pro-preview";
74
110
  readonly LARGE: "gemini-3.1-pro-preview";
@@ -83,16 +119,20 @@ declare const PROVIDER: {
83
119
  };
84
120
  };
85
121
  readonly OPENAI: {
122
+ readonly DEFAULT: string;
123
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENAI.DEFAULT, or pick a specific model from MODEL.*. */
86
124
  readonly MODEL: {
87
125
  readonly DEFAULT: "gpt-5.4";
88
126
  readonly LARGE: "gpt-5.5";
89
127
  readonly SMALL: "gpt-5.4-mini";
90
128
  readonly TINY: "gpt-5.4-nano";
91
129
  };
92
- readonly MODEL_MATCH_WORDS: readonly ["openai", "gpt", RegExp];
130
+ readonly MODEL_MATCH_WORDS: readonly ["gpt", "luna", "openai", "sol", "terra", RegExp];
93
131
  readonly NAME: "openai";
94
132
  };
95
133
  readonly OPENROUTER: {
134
+ readonly DEFAULT: string;
135
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENROUTER.DEFAULT, or pick a specific route from MODEL.OPENROUTER.*. */
96
136
  readonly MODEL: {
97
137
  readonly DEFAULT: "anthropic/claude-sonnet-4-6";
98
138
  readonly LARGE: "anthropic/claude-opus-4-8";
@@ -111,6 +151,8 @@ declare const PROVIDER: {
111
151
  readonly XAI: {
112
152
  readonly API_KEY: "XAI_API_KEY";
113
153
  readonly BASE_URL: "https://api.x.ai/v1";
154
+ readonly DEFAULT: string;
155
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.XAI.DEFAULT, or pick a specific model from MODEL.*. */
114
156
  readonly MODEL: {
115
157
  readonly DEFAULT: "grok-latest";
116
158
  readonly LARGE: "grok-latest";
@@ -123,6 +165,7 @@ declare const PROVIDER: {
123
165
  };
124
166
  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;
125
167
  declare const DEFAULT: {
168
+ /** @deprecated Size tiers are retired in 2.0. Use DEFAULT.PROVIDER.DEFAULT, or pick a specific model from MODEL.*. */
126
169
  readonly MODEL: {
127
170
  readonly BASE: "gpt-5.4";
128
171
  readonly LARGE: "gpt-5.5";
@@ -130,16 +173,22 @@ declare const DEFAULT: {
130
173
  readonly TINY: "gpt-5.4-nano";
131
174
  };
132
175
  readonly PROVIDER: {
176
+ readonly DEFAULT: string;
177
+ /** @deprecated Size tiers are retired in 2.0. Use PROVIDER.OPENAI.DEFAULT, or pick a specific model from MODEL.*. */
133
178
  readonly MODEL: {
134
179
  readonly DEFAULT: "gpt-5.4";
135
180
  readonly LARGE: "gpt-5.5";
136
181
  readonly SMALL: "gpt-5.4-mini";
137
182
  readonly TINY: "gpt-5.4-nano";
138
183
  };
139
- readonly MODEL_MATCH_WORDS: readonly ["openai", "gpt", RegExp];
184
+ readonly MODEL_MATCH_WORDS: readonly ["gpt", "luna", "openai", "sol", "terra", RegExp];
140
185
  readonly NAME: "openai";
141
186
  };
142
187
  };
188
+ /**
189
+ * @deprecated Size-tier catalogs are retired in 2.0. Pick specific models from
190
+ * MODEL.* (grouped by provider via MODEL_MATCH_WORDS / determineModelProvider).
191
+ */
143
192
  declare const ALL: {
144
193
  readonly BASE: readonly ["claude-sonnet-4-6", "gemini-3.1-pro-preview", "gpt-5.4", "grok-latest"];
145
194
  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")[];
@@ -150,12 +199,14 @@ declare const ALL: {
150
199
 
151
200
  declare const constants_ALL: typeof ALL;
152
201
  declare const constants_DEFAULT: typeof DEFAULT;
202
+ declare const constants_EFFORT: typeof EFFORT;
203
+ type constants_LlmEffort = LlmEffort;
153
204
  type constants_LlmProviderName = LlmProviderName;
154
205
  declare const constants_MODEL: typeof MODEL;
155
206
  declare const constants_PROVIDER: typeof PROVIDER;
156
207
  declare namespace constants {
157
- export { constants_ALL as ALL, constants_DEFAULT as DEFAULT, constants_MODEL as MODEL, constants_PROVIDER as PROVIDER };
158
- export type { constants_LlmProviderName as LlmProviderName };
208
+ export { constants_ALL as ALL, constants_DEFAULT as DEFAULT, constants_EFFORT as EFFORT, constants_MODEL as MODEL, constants_PROVIDER as PROVIDER };
209
+ export type { constants_LlmEffort as LlmEffort, constants_LlmProviderName as LlmProviderName };
159
210
  }
160
211
 
161
212
  interface LlmTool {
@@ -461,6 +512,14 @@ interface LlmProgressEvent {
461
512
  type LlmProgressCallback = (event: LlmProgressEvent) => unknown | Promise<unknown>;
462
513
  interface LlmOperateOptions {
463
514
  data?: NaturalMap;
515
+ /**
516
+ * Provider-neutral reasoning effort (lowest | low | medium | high | highest).
517
+ * Each provider translates it to its native control, spreading the scale
518
+ * across the provider's range; omitting it leaves the provider default
519
+ * untouched, so it is safe across a fallback chain. Providers without
520
+ * reasoning control ignore it.
521
+ */
522
+ effort?: LlmEffort;
464
523
  explain?: boolean;
465
524
  /** Chain of fallback providers to try if primary fails. Set to false to disable instance-level fallback. */
466
525
  fallback?: LlmFallbackConfig[] | false;
@@ -740,4 +799,4 @@ declare class XaiProvider implements LlmProvider {
740
799
  }
741
800
 
742
801
  export { BedrockProvider, GoogleProvider as GeminiProvider, GoogleProvider, JaypieToolkit, constants as LLM, Llm, LlmMessageRole, LlmMessageType, LlmProgressEventType, LlmStreamChunkType, OpenRouterProvider, Toolkit, XaiProvider, extractReasoning, isLlmOperateInput, isLlmOperateInputContent, isLlmOperateInputFile, isLlmOperateInputImage, jsonSchemaToNaturalSchema, naturalSchemaToJsonSchema, toolkit, tools };
743
- export type { LlmFallbackConfig, LlmHistory, LlmInputContent, LlmInputContentFile, LlmInputContentImage, LlmInputContentText, LlmInputMessage, LlmMessageOptions, LlmOperateInput, LlmOperateInputContent, LlmOperateInputFile, LlmOperateInputImage, LlmOperateOptions, LlmOperateResponse, LlmOptions, LlmProgressCallback, LlmProgressEvent, LlmProgressToolCall, LlmProvider, LlmStreamChunk, LlmStreamChunkDone, LlmStreamChunkError, LlmStreamChunkText, LlmStreamChunkToolCall, LlmStreamChunkToolResult, LlmTool };
802
+ export type { LlmEffort, LlmFallbackConfig, LlmHistory, LlmInputContent, LlmInputContentFile, LlmInputContentImage, LlmInputContentText, LlmInputMessage, LlmMessageOptions, LlmOperateInput, LlmOperateInputContent, LlmOperateInputFile, LlmOperateInputImage, LlmOperateOptions, LlmOperateResponse, LlmOptions, LlmProgressCallback, LlmProgressEvent, LlmProgressToolCall, LlmProvider, LlmStreamChunk, LlmStreamChunkDone, LlmStreamChunkError, LlmStreamChunkText, LlmStreamChunkToolCall, LlmStreamChunkToolResult, LlmTool };