@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.
@@ -13,7 +13,7 @@ import { BaseProviderAdapter } from "./ProviderAdapter.interface.js";
13
13
  */
14
14
  export declare class AnthropicAdapter extends BaseProviderAdapter {
15
15
  readonly name: "anthropic";
16
- readonly defaultModel: "claude-sonnet-4-5";
16
+ readonly defaultModel: "claude-sonnet-4-6";
17
17
  buildRequest(request: OperateRequest): Anthropic.MessageCreateParams;
18
18
  formatTools(toolkit: Toolkit, outputSchema?: JsonObject): ProviderToolDefinition[];
19
19
  formatOutputSchema(schema: JsonObject | NaturalSchema | z.ZodType): JsonObject;
@@ -13,7 +13,7 @@ import { GeminiPart, GeminiRawResponse, GeminiRequest } from "../../providers/ge
13
13
  */
14
14
  export declare class GeminiAdapter extends BaseProviderAdapter {
15
15
  readonly name: "google";
16
- readonly defaultModel: "gemini-3-pro-preview";
16
+ readonly defaultModel: "gemini-3.1-pro-preview";
17
17
  buildRequest(request: OperateRequest): GeminiRequest;
18
18
  formatTools(toolkit: Toolkit, outputSchema?: JsonObject): ProviderToolDefinition[];
19
19
  formatOutputSchema(schema: JsonObject | NaturalSchema | z.ZodType): JsonObject;
@@ -12,7 +12,7 @@ import { BaseProviderAdapter } from "./ProviderAdapter.interface.js";
12
12
  */
13
13
  export declare class OpenAiAdapter extends BaseProviderAdapter {
14
14
  readonly name: "openai";
15
- readonly defaultModel: "gpt-5.2";
15
+ readonly defaultModel: "gpt-5.4";
16
16
  buildRequest(request: OperateRequest): unknown;
17
17
  formatTools(toolkit: Toolkit, _outputSchema?: JsonObject): ProviderToolDefinition[];
18
18
  formatOutputSchema(schema: JsonObject | NaturalSchema | z.ZodType): JsonObject;
@@ -84,7 +84,7 @@ type OpenRouterContentPart = {
84
84
  */
85
85
  export declare class OpenRouterAdapter extends BaseProviderAdapter {
86
86
  readonly name: "openrouter";
87
- readonly defaultModel: "z-ai/glm-4.7";
87
+ readonly defaultModel: "anthropic/claude-sonnet-4-6";
88
88
  buildRequest(request: OperateRequest): OpenRouterRequest;
89
89
  formatTools(toolkit: Toolkit, outputSchema?: JsonObject): ProviderToolDefinition[];
90
90
  formatOutputSchema(schema: JsonObject | NaturalSchema | z.ZodType): JsonObject;
@@ -6,6 +6,6 @@ import { OpenAiAdapter } from "./OpenAiAdapter.js";
6
6
  */
7
7
  export declare class XaiAdapter extends OpenAiAdapter {
8
8
  readonly name: "xai";
9
- readonly defaultModel: "grok-4-1-fast-reasoning";
9
+ readonly defaultModel: "grok-4.20-0309-reasoning";
10
10
  }
11
11
  export declare const xaiAdapter: XaiAdapter;
@@ -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-5";
8
- readonly LARGE: "claude-opus-4-5";
9
- readonly SMALL: "claude-sonnet-4-5";
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.2";
44
- readonly LARGE: "gpt-5.2-pro";
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: "z-ai/glm-4.7";
54
- readonly LARGE: "z-ai/glm-4.7";
55
- readonly SMALL: "z-ai/glm-4.7";
56
- readonly TINY: "z-ai/glm-4.7";
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-1-fast-reasoning";
72
- readonly LARGE: "grok-4-1-fast-reasoning";
73
- readonly SMALL: "grok-3";
74
- readonly TINY: "grok-3-mini";
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.2";
84
- readonly LARGE: "gpt-5.2-pro";
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.2";
91
- readonly LARGE: "gpt-5.2-pro";
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-5", "gemini-3-pro-preview", "gpt-5.2", "grok-4-1-fast-reasoning"];
101
- readonly COMBINED: readonly ["claude-sonnet-4-5", "claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5", "gemini-3-pro-preview", "gemini-3-pro-preview", "gemini-3-flash-preview", "gemini-3-flash-preview", "gpt-5.2", "gpt-5.2-pro", "gpt-5-mini", "gpt-5-nano", "grok-4-1-fast-reasoning", "grok-4-1-fast-reasoning", "grok-3", "grok-3-mini"];
102
- readonly LARGE: readonly ["claude-opus-4-5", "gemini-3-pro-preview", "gpt-5.2-pro", "grok-4-1-fast-reasoning"];
103
- readonly SMALL: readonly ["claude-sonnet-4-5", "gemini-3-flash-preview", "gpt-5-mini", "grok-3"];
104
- readonly TINY: readonly ["claude-haiku-4-5", "gemini-3-flash-preview", "gpt-5-nano", "grok-3-mini"];
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/esm/index.js CHANGED
@@ -12,35 +12,33 @@ import { getS3FileBuffer, getEnvSecret } from '@jaypie/aws';
12
12
  import { fetchWeatherApi } from 'openmeteo';
13
13
 
14
14
  const FIRST_CLASS_PROVIDER = {
15
+ // https://docs.anthropic.com/en/docs/about-claude/models/overview
15
16
  ANTHROPIC: {
16
- DEFAULT: "claude-sonnet-4-5",
17
- LARGE: "claude-opus-4-5",
18
- SMALL: "claude-sonnet-4-5",
17
+ DEFAULT: "claude-sonnet-4-6",
18
+ LARGE: "claude-opus-4-6",
19
+ SMALL: "claude-sonnet-4-6",
19
20
  TINY: "claude-haiku-4-5",
20
21
  },
22
+ // https://ai.google.dev/gemini-api/docs/models
21
23
  GEMINI: {
22
- DEFAULT: "gemini-3-pro-preview",
23
- LARGE: "gemini-3-pro-preview",
24
+ DEFAULT: "gemini-3.1-pro-preview",
25
+ LARGE: "gemini-3.1-pro-preview",
24
26
  SMALL: "gemini-3-flash-preview",
25
- TINY: "gemini-3-flash-preview",
27
+ TINY: "gemini-3.1-flash-lite-preview",
26
28
  },
29
+ // https://developers.openai.com/api/docs/models
27
30
  OPENAI: {
28
- DEFAULT: "gpt-5.2",
29
- LARGE: "gpt-5.2-pro",
30
- SMALL: "gpt-5-mini",
31
- TINY: "gpt-5-nano",
32
- },
33
- OPENROUTER: {
34
- DEFAULT: "z-ai/glm-4.7",
35
- LARGE: "z-ai/glm-4.7",
36
- SMALL: "z-ai/glm-4.7",
37
- TINY: "z-ai/glm-4.7",
31
+ DEFAULT: "gpt-5.4",
32
+ LARGE: "gpt-5.4",
33
+ SMALL: "gpt-5.4-mini",
34
+ TINY: "gpt-5.4-nano",
38
35
  },
36
+ // https://docs.x.ai/developers/models
39
37
  XAI: {
40
- DEFAULT: "grok-4-1-fast-reasoning",
41
- LARGE: "grok-4-1-fast-reasoning",
42
- SMALL: "grok-3",
43
- TINY: "grok-3-mini",
38
+ DEFAULT: "grok-4.20-0309-reasoning",
39
+ LARGE: "grok-4.20-0309-reasoning",
40
+ SMALL: "grok-4.20-0309-non-reasoning",
41
+ TINY: "grok-4-1-fast-non-reasoning",
44
42
  },
45
43
  };
46
44
  const PROVIDER = {
@@ -103,15 +101,11 @@ const PROVIDER = {
103
101
  NAME: "openai",
104
102
  },
105
103
  OPENROUTER: {
106
- // https://openrouter.ai/models
107
- // OpenRouter provides access to hundreds of models from various providers
108
- // The model format is: provider/model-name (e.g., "openai/gpt-4", "anthropic/claude-3-opus")
109
104
  MODEL: {
110
- // Default uses env var OPENROUTER_MODEL if set, otherwise a reasonable default
111
- DEFAULT: FIRST_CLASS_PROVIDER.OPENROUTER.DEFAULT,
112
- LARGE: FIRST_CLASS_PROVIDER.OPENROUTER.LARGE,
113
- SMALL: FIRST_CLASS_PROVIDER.OPENROUTER.SMALL,
114
- TINY: FIRST_CLASS_PROVIDER.OPENROUTER.TINY,
105
+ DEFAULT: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.DEFAULT}`,
106
+ LARGE: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.LARGE}`,
107
+ SMALL: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.SMALL}`,
108
+ TINY: `anthropic/${FIRST_CLASS_PROVIDER.ANTHROPIC.TINY}`,
115
109
  },
116
110
  MODEL_MATCH_WORDS: ["openrouter"],
117
111
  NAME: "openrouter",