@cellaware/utils 4.4.3 → 4.4.4

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.
@@ -8,9 +8,9 @@ export interface ChatWMSInstance {
8
8
  }
9
9
  export declare function initChatWMSInstance(): ChatWMSInstance;
10
10
  export interface ChatWMSInstanceWarehouse {
11
+ instanceId: string;
11
12
  clientId: string;
12
13
  customer: string;
13
14
  warehouse: string;
14
- instanceId: string;
15
15
  }
16
16
  export declare function initChatWMSInstanceWarehouse(): ChatWMSInstanceWarehouse;
@@ -10,9 +10,9 @@ export function initChatWMSInstance() {
10
10
  }
11
11
  export function initChatWMSInstanceWarehouse() {
12
12
  return {
13
+ instanceId: '',
13
14
  clientId: '',
14
15
  customer: '',
15
16
  warehouse: '',
16
- instanceId: ''
17
17
  };
18
18
  }
@@ -18,10 +18,10 @@ export function chatwmsExtractUserDataFromHeaders(request) {
18
18
  return userData;
19
19
  }
20
20
  catch (err) {
21
- throw new Error(`Error decoding principal`);
21
+ throw new Error(`Authorization error`);
22
22
  }
23
23
  }
24
24
  else {
25
- throw new Error(`Principal is not present in request`);
25
+ throw new Error(`Authorization header not found`);
26
26
  }
27
27
  }
package/dist/llm/cost.js CHANGED
@@ -3,6 +3,18 @@ export function getLLMCostPerToken(modelName) {
3
3
  let inputCost = 0.0;
4
4
  let outputCost = 0.0;
5
5
  switch (modelName) {
6
+ case 'gpt-4.1':
7
+ inputCost = 0.002;
8
+ outputCost = 0.080;
9
+ break;
10
+ case 'gpt-4.1-mini':
11
+ inputCost = 0.0004;
12
+ outputCost = 0.0016;
13
+ break;
14
+ case 'gpt-4.1-nano':
15
+ inputCost = 0.0001;
16
+ outputCost = 0.0004;
17
+ break;
6
18
  case 'o1':
7
19
  inputCost = 0.015;
8
20
  outputCost = 0.060;
@@ -20,10 +32,6 @@ export function getLLMCostPerToken(modelName) {
20
32
  outputCost = 0.0044;
21
33
  break;
22
34
  case 'gpt-4o':
23
- inputCost = 0.005;
24
- outputCost = 0.015;
25
- break;
26
- case 'gpt-4o-2024-08-06':
27
35
  inputCost = 0.0025;
28
36
  outputCost = 0.010;
29
37
  break;
@@ -1,4 +1,4 @@
1
- export type ModelName = 'o1' | 'o1-preview' | 'o1-mini' | 'o3-mini' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
1
+ export type ModelName = 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'o1' | 'o1-preview' | 'o1-mini' | 'o3-mini' | 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
2
2
  export type ReasoningEffort = 'low' | 'medium' | 'high';
3
3
  export interface OpenAIModelOptions {
4
4
  reasoning_effort?: ReasoningEffort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "4.4.3",
3
+ "version": "4.4.4",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",