@jaypie/llm 1.2.20 → 1.2.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/cjs/constants.d.ts +31 -31
- package/dist/cjs/index.cjs +22 -28
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/operate/adapters/AnthropicAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/GeminiAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/OpenAiAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/OpenRouterAdapter.d.ts +1 -1
- package/dist/cjs/operate/adapters/XaiAdapter.d.ts +1 -1
- package/dist/esm/constants.d.ts +31 -31
- package/dist/esm/index.js +22 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operate/adapters/AnthropicAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/GeminiAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/OpenAiAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/OpenRouterAdapter.d.ts +1 -1
- package/dist/esm/operate/adapters/XaiAdapter.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export declare const PROVIDER: {
|
|
|
4
4
|
readonly DEFAULT: 4096;
|
|
5
5
|
};
|
|
6
6
|
readonly MODEL: {
|
|
7
|
-
readonly DEFAULT: "claude-sonnet-4-
|
|
8
|
-
readonly LARGE: "claude-opus-4-
|
|
9
|
-
readonly SMALL: "claude-sonnet-4-
|
|
7
|
+
readonly DEFAULT: "claude-sonnet-4-6";
|
|
8
|
+
readonly LARGE: "claude-opus-4-6";
|
|
9
|
+
readonly SMALL: "claude-sonnet-4-6";
|
|
10
10
|
readonly TINY: "claude-haiku-4-5";
|
|
11
11
|
};
|
|
12
12
|
readonly MODEL_MATCH_WORDS: readonly ["anthropic", "claude", "haiku", "opus", "sonnet"];
|
|
@@ -26,10 +26,10 @@ export declare const PROVIDER: {
|
|
|
26
26
|
};
|
|
27
27
|
readonly GEMINI: {
|
|
28
28
|
readonly MODEL: {
|
|
29
|
-
readonly DEFAULT: "gemini-3-pro-preview";
|
|
30
|
-
readonly LARGE: "gemini-3-pro-preview";
|
|
29
|
+
readonly DEFAULT: "gemini-3.1-pro-preview";
|
|
30
|
+
readonly LARGE: "gemini-3.1-pro-preview";
|
|
31
31
|
readonly SMALL: "gemini-3-flash-preview";
|
|
32
|
-
readonly TINY: "gemini-3-flash-preview";
|
|
32
|
+
readonly TINY: "gemini-3.1-flash-lite-preview";
|
|
33
33
|
};
|
|
34
34
|
readonly MODEL_MATCH_WORDS: readonly ["gemini", "google"];
|
|
35
35
|
readonly NAME: "google";
|
|
@@ -40,20 +40,20 @@ export declare const PROVIDER: {
|
|
|
40
40
|
};
|
|
41
41
|
readonly OPENAI: {
|
|
42
42
|
readonly MODEL: {
|
|
43
|
-
readonly DEFAULT: "gpt-5.
|
|
44
|
-
readonly LARGE: "gpt-5.
|
|
45
|
-
readonly SMALL: "gpt-5-mini";
|
|
46
|
-
readonly TINY: "gpt-5-nano";
|
|
43
|
+
readonly DEFAULT: "gpt-5.4";
|
|
44
|
+
readonly LARGE: "gpt-5.4";
|
|
45
|
+
readonly SMALL: "gpt-5.4-mini";
|
|
46
|
+
readonly TINY: "gpt-5.4-nano";
|
|
47
47
|
};
|
|
48
48
|
readonly MODEL_MATCH_WORDS: readonly ["openai", "gpt", RegExp];
|
|
49
49
|
readonly NAME: "openai";
|
|
50
50
|
};
|
|
51
51
|
readonly OPENROUTER: {
|
|
52
52
|
readonly MODEL: {
|
|
53
|
-
readonly DEFAULT: "
|
|
54
|
-
readonly LARGE: "
|
|
55
|
-
readonly SMALL: "
|
|
56
|
-
readonly TINY: "
|
|
53
|
+
readonly DEFAULT: "anthropic/claude-sonnet-4-6";
|
|
54
|
+
readonly LARGE: "anthropic/claude-opus-4-6";
|
|
55
|
+
readonly SMALL: "anthropic/claude-sonnet-4-6";
|
|
56
|
+
readonly TINY: "anthropic/claude-haiku-4-5";
|
|
57
57
|
};
|
|
58
58
|
readonly MODEL_MATCH_WORDS: readonly ["openrouter"];
|
|
59
59
|
readonly NAME: "openrouter";
|
|
@@ -68,10 +68,10 @@ export declare const PROVIDER: {
|
|
|
68
68
|
readonly API_KEY: "XAI_API_KEY";
|
|
69
69
|
readonly BASE_URL: "https://api.x.ai/v1";
|
|
70
70
|
readonly MODEL: {
|
|
71
|
-
readonly DEFAULT: "grok-4-
|
|
72
|
-
readonly LARGE: "grok-4-
|
|
73
|
-
readonly SMALL: "grok-
|
|
74
|
-
readonly TINY: "grok-
|
|
71
|
+
readonly DEFAULT: "grok-4.20-0309-reasoning";
|
|
72
|
+
readonly LARGE: "grok-4.20-0309-reasoning";
|
|
73
|
+
readonly SMALL: "grok-4.20-0309-non-reasoning";
|
|
74
|
+
readonly TINY: "grok-4-1-fast-non-reasoning";
|
|
75
75
|
};
|
|
76
76
|
readonly MODEL_MATCH_WORDS: readonly ["grok", "xai"];
|
|
77
77
|
readonly NAME: "xai";
|
|
@@ -80,26 +80,26 @@ export declare const PROVIDER: {
|
|
|
80
80
|
export type LlmProviderName = typeof PROVIDER.ANTHROPIC.NAME | typeof PROVIDER.GEMINI.NAME | typeof PROVIDER.OPENAI.NAME | typeof PROVIDER.OPENROUTER.NAME | typeof PROVIDER.XAI.NAME;
|
|
81
81
|
export declare const DEFAULT: {
|
|
82
82
|
readonly MODEL: {
|
|
83
|
-
readonly BASE: "gpt-5.
|
|
84
|
-
readonly LARGE: "gpt-5.
|
|
85
|
-
readonly SMALL: "gpt-5-mini";
|
|
86
|
-
readonly TINY: "gpt-5-nano";
|
|
83
|
+
readonly BASE: "gpt-5.4";
|
|
84
|
+
readonly LARGE: "gpt-5.4";
|
|
85
|
+
readonly SMALL: "gpt-5.4-mini";
|
|
86
|
+
readonly TINY: "gpt-5.4-nano";
|
|
87
87
|
};
|
|
88
88
|
readonly PROVIDER: {
|
|
89
89
|
readonly MODEL: {
|
|
90
|
-
readonly DEFAULT: "gpt-5.
|
|
91
|
-
readonly LARGE: "gpt-5.
|
|
92
|
-
readonly SMALL: "gpt-5-mini";
|
|
93
|
-
readonly TINY: "gpt-5-nano";
|
|
90
|
+
readonly DEFAULT: "gpt-5.4";
|
|
91
|
+
readonly LARGE: "gpt-5.4";
|
|
92
|
+
readonly SMALL: "gpt-5.4-mini";
|
|
93
|
+
readonly TINY: "gpt-5.4-nano";
|
|
94
94
|
};
|
|
95
95
|
readonly MODEL_MATCH_WORDS: readonly ["openai", "gpt", RegExp];
|
|
96
96
|
readonly NAME: "openai";
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
export declare const ALL: {
|
|
100
|
-
readonly BASE: readonly ["claude-sonnet-4-
|
|
101
|
-
readonly COMBINED: readonly ["claude-sonnet-4-
|
|
102
|
-
readonly LARGE: readonly ["claude-opus-4-
|
|
103
|
-
readonly SMALL: readonly ["claude-sonnet-4-
|
|
104
|
-
readonly TINY: readonly ["claude-haiku-4-5", "gemini-3-flash-preview", "gpt-5-nano", "grok-
|
|
100
|
+
readonly BASE: readonly ["claude-sonnet-4-6", "gemini-3.1-pro-preview", "gpt-5.4", "grok-4.20-0309-reasoning"];
|
|
101
|
+
readonly COMBINED: readonly ["claude-sonnet-4-6", "claude-opus-4-6", "claude-sonnet-4-6", "claude-haiku-4-5", "gemini-3.1-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.1-flash-lite-preview", "gpt-5.4", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "grok-4.20-0309-reasoning", "grok-4.20-0309-reasoning", "grok-4.20-0309-non-reasoning", "grok-4-1-fast-non-reasoning"];
|
|
102
|
+
readonly LARGE: readonly ["claude-opus-4-6", "gemini-3.1-pro-preview", "gpt-5.4", "grok-4.20-0309-reasoning"];
|
|
103
|
+
readonly SMALL: readonly ["claude-sonnet-4-6", "gemini-3-flash-preview", "gpt-5.4-mini", "grok-4.20-0309-non-reasoning"];
|
|
104
|
+
readonly TINY: readonly ["claude-haiku-4-5", "gemini-3.1-flash-lite-preview", "gpt-5.4-nano", "grok-4-1-fast-non-reasoning"];
|
|
105
105
|
};
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -14,35 +14,33 @@ var aws = require('@jaypie/aws');
|
|
|
14
14
|
var openmeteo = require('openmeteo');
|
|
15
15
|
|
|
16
16
|
const FIRST_CLASS_PROVIDER = {
|
|
17
|
+
// https://docs.anthropic.com/en/docs/about-claude/models/overview
|
|
17
18
|
ANTHROPIC: {
|
|
18
|
-
DEFAULT: "claude-sonnet-4-
|
|
19
|
-
LARGE: "claude-opus-4-
|
|
20
|
-
SMALL: "claude-sonnet-4-
|
|
19
|
+
DEFAULT: "claude-sonnet-4-6",
|
|
20
|
+
LARGE: "claude-opus-4-6",
|
|
21
|
+
SMALL: "claude-sonnet-4-6",
|
|
21
22
|
TINY: "claude-haiku-4-5",
|
|
22
23
|
},
|
|
24
|
+
// https://ai.google.dev/gemini-api/docs/models
|
|
23
25
|
GEMINI: {
|
|
24
|
-
DEFAULT: "gemini-3-pro-preview",
|
|
25
|
-
LARGE: "gemini-3-pro-preview",
|
|
26
|
+
DEFAULT: "gemini-3.1-pro-preview",
|
|
27
|
+
LARGE: "gemini-3.1-pro-preview",
|
|
26
28
|
SMALL: "gemini-3-flash-preview",
|
|
27
|
-
TINY: "gemini-3-flash-preview",
|
|
29
|
+
TINY: "gemini-3.1-flash-lite-preview",
|
|
28
30
|
},
|
|
31
|
+
// https://developers.openai.com/api/docs/models
|
|
29
32
|
OPENAI: {
|
|
30
|
-
DEFAULT: "gpt-5.
|
|
31
|
-
LARGE: "gpt-5.
|
|
32
|
-
SMALL: "gpt-5-mini",
|
|
33
|
-
TINY: "gpt-5-nano",
|
|
34
|
-
},
|
|
35
|
-
OPENROUTER: {
|
|
36
|
-
DEFAULT: "z-ai/glm-4.7",
|
|
37
|
-
LARGE: "z-ai/glm-4.7",
|
|
38
|
-
SMALL: "z-ai/glm-4.7",
|
|
39
|
-
TINY: "z-ai/glm-4.7",
|
|
33
|
+
DEFAULT: "gpt-5.4",
|
|
34
|
+
LARGE: "gpt-5.4",
|
|
35
|
+
SMALL: "gpt-5.4-mini",
|
|
36
|
+
TINY: "gpt-5.4-nano",
|
|
40
37
|
},
|
|
38
|
+
// https://docs.x.ai/developers/models
|
|
41
39
|
XAI: {
|
|
42
|
-
DEFAULT: "grok-4-
|
|
43
|
-
LARGE: "grok-4-
|
|
44
|
-
SMALL: "grok-
|
|
45
|
-
TINY: "grok-
|
|
40
|
+
DEFAULT: "grok-4.20-0309-reasoning",
|
|
41
|
+
LARGE: "grok-4.20-0309-reasoning",
|
|
42
|
+
SMALL: "grok-4.20-0309-non-reasoning",
|
|
43
|
+
TINY: "grok-4-1-fast-non-reasoning",
|
|
46
44
|
},
|
|
47
45
|
};
|
|
48
46
|
const PROVIDER = {
|
|
@@ -105,15 +103,11 @@ const PROVIDER = {
|
|
|
105
103
|
NAME: "openai",
|
|
106
104
|
},
|
|
107
105
|
OPENROUTER: {
|
|
108
|
-
// https://openrouter.ai/models
|
|
109
|
-
// OpenRouter provides access to hundreds of models from various providers
|
|
110
|
-
// The model format is: provider/model-name (e.g., "openai/gpt-4", "anthropic/claude-3-opus")
|
|
111
106
|
MODEL: {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
TINY: FIRST_CLASS_PROVIDER.OPENROUTER.TINY,
|
|
107
|
+
DEFAULT: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.DEFAULT}`,
|
|
108
|
+
LARGE: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.LARGE}`,
|
|
109
|
+
SMALL: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.SMALL}`,
|
|
110
|
+
TINY: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.TINY}`,
|
|
117
111
|
},
|
|
118
112
|
MODEL_MATCH_WORDS: ["openrouter"],
|
|
119
113
|
NAME: "openrouter",
|