@anyway-sh/node-server-sdk 0.22.10 → 0.22.12

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/index.mjs CHANGED
@@ -21,7 +21,7 @@ import { QdrantInstrumentation } from '@traceloop/instrumentation-qdrant';
21
21
  import { TogetherInstrumentation } from '@traceloop/instrumentation-together';
22
22
  import { McpInstrumentation } from '@traceloop/instrumentation-mcp';
23
23
  import { SimpleSpanProcessor, BatchSpanProcessor } from '@opentelemetry/sdk-trace-node';
24
- import { ATTR_GEN_AI_OPERATION_NAME, ATTR_GEN_AI_REQUEST_MODEL, ATTR_GEN_AI_COMPLETION, ATTR_GEN_AI_OUTPUT_MESSAGES, ATTR_GEN_AI_PROMPT, ATTR_GEN_AI_INPUT_MESSAGES, ATTR_GEN_AI_USAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, ATTR_GEN_AI_RESPONSE_FINISH_REASONS, ATTR_GEN_AI_RESPONSE_MODEL, ATTR_GEN_AI_RESPONSE_ID, ATTR_GEN_AI_SYSTEM, ATTR_GEN_AI_PROVIDER_NAME, ATTR_GEN_AI_CONVERSATION_ID, ATTR_GEN_AI_TOOL_NAME, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_CALL_ARGUMENTS, ATTR_GEN_AI_TOOL_CALL_RESULT, ATTR_GEN_AI_AGENT_NAME } from '@opentelemetry/semantic-conventions/incubating';
24
+ import { ATTR_GEN_AI_OPERATION_NAME, ATTR_GEN_AI_REQUEST_MODEL, ATTR_GEN_AI_COMPLETION, ATTR_GEN_AI_OUTPUT_MESSAGES, ATTR_GEN_AI_PROMPT, ATTR_GEN_AI_INPUT_MESSAGES, ATTR_GEN_AI_USAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, ATTR_GEN_AI_RESPONSE_FINISH_REASONS, ATTR_GEN_AI_RESPONSE_MODEL, ATTR_GEN_AI_RESPONSE_ID, ATTR_GEN_AI_SYSTEM, ATTR_GEN_AI_PROVIDER_NAME, ATTR_GEN_AI_CONVERSATION_ID, ATTR_GEN_AI_TOOL_NAME, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_CALL_ARGUMENTS, ATTR_GEN_AI_TOOL_CALL_RESULT, ATTR_GEN_AI_AGENT_NAME, ATTR_GEN_AI_USAGE_PROMPT_TOKENS, ATTR_GEN_AI_USAGE_COMPLETION_TOKENS } from '@opentelemetry/semantic-conventions/incubating';
25
25
  import fetch$1 from 'cross-fetch';
26
26
  import fetchBuilder from 'fetch-retry';
27
27
  import { suppressTracing } from '@opentelemetry/core';
@@ -66,7 +66,7 @@ class PromptNotFoundError extends TraceloopError {
66
66
  }
67
67
  }
68
68
 
69
- var version = "0.22.10";
69
+ var version = "0.22.12";
70
70
 
71
71
  /**
72
72
  * Base class for handling annotation operations with the Traceloop API.
@@ -3881,6 +3881,7 @@ class PricingCalculator {
3881
3881
  return null;
3882
3882
  }
3883
3883
  addCostAttributes(span) {
3884
+ var _a, _b;
3884
3885
  const attrs = span.attributes;
3885
3886
  if (!attrs)
3886
3887
  return;
@@ -3888,8 +3889,8 @@ class PricingCalculator {
3888
3889
  attrs[ATTR_GEN_AI_REQUEST_MODEL];
3889
3890
  if (!model)
3890
3891
  return;
3891
- const inputTokens = attrs[ATTR_GEN_AI_USAGE_INPUT_TOKENS];
3892
- const outputTokens = attrs[ATTR_GEN_AI_USAGE_OUTPUT_TOKENS];
3892
+ const inputTokens = ((_a = attrs[ATTR_GEN_AI_USAGE_INPUT_TOKENS]) !== null && _a !== void 0 ? _a : attrs[ATTR_GEN_AI_USAGE_PROMPT_TOKENS]);
3893
+ const outputTokens = ((_b = attrs[ATTR_GEN_AI_USAGE_OUTPUT_TOKENS]) !== null && _b !== void 0 ? _b : attrs[ATTR_GEN_AI_USAGE_COMPLETION_TOKENS]);
3893
3894
  if (inputTokens == null && outputTokens == null)
3894
3895
  return;
3895
3896
  const pricing = this.findPricing(model);
@@ -3910,13 +3911,607 @@ class PricingCalculator {
3910
3911
  }
3911
3912
  }
3912
3913
 
3914
+ var embeddings = {
3915
+ "text-embedding-ada-002": 0.0001,
3916
+ "text-embedding-3-small": 0.00002,
3917
+ "text-embedding-3-large": 0.00013,
3918
+ ada: 0.0001,
3919
+ "ada-v2": 0.0001,
3920
+ "text-ada-001": 0.0001,
3921
+ "azure_text-embedding-ada-002": 0.0001,
3922
+ "azure_text-embedding-3-small": 0.00002,
3923
+ "azure_text-embedding-3-large": 0.00013,
3924
+ azure_ada: 0.0001,
3925
+ "azure_ada-v2": 0.0001,
3926
+ "azure_text-ada-001": 0.0001,
3927
+ "embed-english-v3.0": 0.0001,
3928
+ "embed-multilingual-v3.0": 0.0001,
3929
+ "embed-english-light-v3.0": 0.0001,
3930
+ "embed-multilingual-light-v3.0": 0.0001,
3931
+ "embed-english-v2.0": 0.0001,
3932
+ "embed-english-light-v2.0": 0.0001,
3933
+ "embed-multilingual-v2.0": 0.0001,
3934
+ "mistral-embed": 0.0001,
3935
+ "amazon.titan-embed-text-v1": 0.0001,
3936
+ "amazon.titan-embed-text-v2": 0.00002,
3937
+ "textembedding-gecko": 0.0001,
3938
+ "textembedding-gecko@001": 0.0001,
3939
+ "textembedding-gecko@002": 0.0001,
3940
+ "textembedding-gecko@003": 0.0001
3941
+ };
3942
+ var images = {
3943
+ "dall-e-3": {
3944
+ standard: {
3945
+ "1024x1024": 0.04,
3946
+ "1024x1792": 0.02,
3947
+ "1792x1024": 0.08
3948
+ },
3949
+ hd: {
3950
+ "1024x1024": 0.08,
3951
+ "1024x1792": 0.12,
3952
+ "1792x1024": 0.12
3953
+ }
3954
+ },
3955
+ "azure_dall-e-3": {
3956
+ standard: {
3957
+ "1024x1024": 0.04,
3958
+ "1024x1792": 0.02,
3959
+ "1792x1024": 0.08
3960
+ },
3961
+ hd: {
3962
+ "1024x1024": 0.08,
3963
+ "1024x1792": 0.12,
3964
+ "1792x1024": 0.12
3965
+ }
3966
+ },
3967
+ "dall-e-2": {
3968
+ standard: {
3969
+ "1024x1024": 0.02,
3970
+ "512x512": 0.018,
3971
+ "256x256": 0.016
3972
+ }
3973
+ },
3974
+ "black-forest-labs/FLUX.1-dev": {
3975
+ standard: {
3976
+ "1000000": 0.025
3977
+ }
3978
+ },
3979
+ "black-forest-labs/FLUX.1-canny": {
3980
+ standard: {
3981
+ "1000000": 0.025
3982
+ }
3983
+ },
3984
+ "black-forest-labs/FLUX.1-depth": {
3985
+ standard: {
3986
+ "1000000": 0.025
3987
+ }
3988
+ },
3989
+ "black-forest-labs/FLUX.1-redux": {
3990
+ standard: {
3991
+ "1000000": 0.025
3992
+ }
3993
+ },
3994
+ "black-forest-labs/FLUX.1-schnell": {
3995
+ standard: {
3996
+ "1000000": 0.0027
3997
+ }
3998
+ },
3999
+ "black-forest-labs/FLUX.1-pro": {
4000
+ standard: {
4001
+ "1000000": 0.04
4002
+ }
4003
+ },
4004
+ "black-forest-labs/FLUX.1.1-pro": {
4005
+ standard: {
4006
+ "1000000": 0.05
4007
+ }
4008
+ },
4009
+ "stabilityai/stable-diffusion-xl-base-1.0": {
4010
+ standard: {
4011
+ "512X512": 0.001,
4012
+ "1024x1024": 0.01
4013
+ }
4014
+ },
4015
+ "amazon.titan-image-generator-v1": {
4016
+ standard: {
4017
+ "512x512": 0.008,
4018
+ "1024x1024": 0.01
4019
+ },
4020
+ premium: {
4021
+ "512x512": 0.01,
4022
+ "1024x1024": 0.012
4023
+ }
4024
+ }
4025
+ };
4026
+ var audio = {
4027
+ "tts-1": 0.015,
4028
+ "tts-1-hd": 0.03,
4029
+ eleven_multilingual_v2: 0.24,
4030
+ eleven_multilingual_v1: 0.24,
4031
+ eleven_monolingual_v1: 0.24,
4032
+ eleven_english_v1: 0.24,
4033
+ eleven_turbo_v2: 0.24,
4034
+ eleven_english_sts_v2: 0.24,
4035
+ eleven_multilingual_sts_v2: 0.24,
4036
+ best: 0.00010277777,
4037
+ nano: 0.00003333333
4038
+ };
4039
+ var chat = {
4040
+ "gpt-4.1-nano-2025-04-14": {
4041
+ promptPrice: 0.0001,
4042
+ completionPrice: 0.0004
4043
+ },
4044
+ "gpt-4.1-nano": {
4045
+ promptPrice: 0.0001,
4046
+ completionPrice: 0.0004
4047
+ },
4048
+ "gpt-4.1-mini-2025-04-14": {
4049
+ promptPrice: 0.0004,
4050
+ completionPrice: 0.0016
4051
+ },
4052
+ "gpt-4.1-mini": {
4053
+ promptPrice: 0.0004,
4054
+ completionPrice: 0.0016
4055
+ },
4056
+ "gpt-4.1-2025-04-14": {
4057
+ promptPrice: 0.002,
4058
+ completionPrice: 0.008
4059
+ },
4060
+ "gpt-4.1": {
4061
+ promptPrice: 0.002,
4062
+ completionPrice: 0.008
4063
+ },
4064
+ "gpt-4o": {
4065
+ promptPrice: 0.0005,
4066
+ completionPrice: 0.0015
4067
+ },
4068
+ "gpt-4o-2024-08-06": {
4069
+ promptPrice: 0.0025,
4070
+ completionPrice: 0.01
4071
+ },
4072
+ "gpt-4o-2024-05-13": {
4073
+ promptPrice: 0.005,
4074
+ completionPrice: 0.015
4075
+ },
4076
+ "gpt-4o-mini": {
4077
+ promptPrice: 0.00015,
4078
+ completionPrice: 0.0006
4079
+ },
4080
+ "gpt-4o-mini-2024-07-18": {
4081
+ promptPrice: 0.00015,
4082
+ completionPrice: 0.0006
4083
+ },
4084
+ "o1-mini": {
4085
+ promptPrice: 0.003,
4086
+ completionPrice: 0.012
4087
+ },
4088
+ "o1-mini-2024-09-12": {
4089
+ promptPrice: 0.003,
4090
+ completionPrice: 0.012
4091
+ },
4092
+ "o1-preview": {
4093
+ promptPrice: 0.015,
4094
+ completionPrice: 0.06
4095
+ },
4096
+ "o1-preview-2024-09-12": {
4097
+ promptPrice: 0.015,
4098
+ completionPrice: 0.06
4099
+ },
4100
+ "gpt-3.5-turbo": {
4101
+ promptPrice: 0.0005,
4102
+ completionPrice: 0.0015
4103
+ },
4104
+ "gpt-3.5-turbo-0125": {
4105
+ promptPrice: 0.0005,
4106
+ completionPrice: 0.0015
4107
+ },
4108
+ "azure_gpt-35-turbo": {
4109
+ promptPrice: 0.0005,
4110
+ completionPrice: 0.0015
4111
+ },
4112
+ "azure_gpt-35-turbo-16k": {
4113
+ promptPrice: 0.0005,
4114
+ completionPrice: 0.0015
4115
+ },
4116
+ "azure_gpt-35-turbo-instruct": {
4117
+ promptPrice: 0.0015,
4118
+ completionPrice: 0.002
4119
+ },
4120
+ "gpt-4": {
4121
+ promptPrice: 0.03,
4122
+ completionPrice: 0.06
4123
+ },
4124
+ "gpt-4-turbo": {
4125
+ promptPrice: 0.01,
4126
+ completionPrice: 0.03
4127
+ },
4128
+ "gpt-4-32k": {
4129
+ promptPrice: 0.06,
4130
+ completionPrice: 0.12
4131
+ },
4132
+ "gpt-4-1106-preview": {
4133
+ promptPrice: 0.01,
4134
+ completionPrice: 0.03
4135
+ },
4136
+ "gpt-4-0125-preview": {
4137
+ promptPrice: 0.01,
4138
+ completionPrice: 0.03
4139
+ },
4140
+ "gpt-4-preview": {
4141
+ promptPrice: 0.01,
4142
+ completionPrice: 0.03
4143
+ },
4144
+ "gpt-4-1106-vision-preview": {
4145
+ promptPrice: 0.01,
4146
+ completionPrice: 0.03
4147
+ },
4148
+ "gpt-4-vision-preview": {
4149
+ promptPrice: 0.01,
4150
+ completionPrice: 0.03
4151
+ },
4152
+ "azure_gpt-4": {
4153
+ promptPrice: 0.03,
4154
+ completionPrice: 0.06
4155
+ },
4156
+ "azure_gpt-4-32k": {
4157
+ promptPrice: 0.06,
4158
+ completionPrice: 0.12
4159
+ },
4160
+ "claude-3-opus-20240229": {
4161
+ promptPrice: 0.015,
4162
+ completionPrice: 0.075
4163
+ },
4164
+ "claude-3-sonnet-20240229": {
4165
+ promptPrice: 0.003,
4166
+ completionPrice: 0.015
4167
+ },
4168
+ "claude-3-haiku-20240307": {
4169
+ promptPrice: 0.00025,
4170
+ completionPrice: 0.00125
4171
+ },
4172
+ command: {
4173
+ promptPrice: 0.001,
4174
+ completionPrice: 0.002
4175
+ },
4176
+ "command-nightly": {
4177
+ promptPrice: 0.001,
4178
+ completionPrice: 0.002
4179
+ },
4180
+ "command-light": {
4181
+ promptPrice: 0.0003,
4182
+ completionPrice: 0.0006
4183
+ },
4184
+ "command-light-nightly": {
4185
+ promptPrice: 0.0003,
4186
+ completionPrice: 0.0006
4187
+ },
4188
+ "open-mistral-7b": {
4189
+ promptPrice: 0.00025,
4190
+ completionPrice: 0.00025
4191
+ },
4192
+ "open-mixtral-8x7b": {
4193
+ promptPrice: 0.0007,
4194
+ completionPrice: 0.0007
4195
+ },
4196
+ "mistral-small-latest": {
4197
+ promptPrice: 0.002,
4198
+ completionPrice: 0.006
4199
+ },
4200
+ "mistral-medium-latest": {
4201
+ promptPrice: 0.0027,
4202
+ completionPrice: 0.0081
4203
+ },
4204
+ "mistral-large-latest": {
4205
+ promptPrice: 0.008,
4206
+ completionPrice: 0.024
4207
+ },
4208
+ "amazon.titan-text-express-v1": {
4209
+ promptPrice: 0.0008,
4210
+ completionPrice: 0.0016
4211
+ },
4212
+ "amazon.titan-text-lite-v1": {
4213
+ promptPrice: 0.0003,
4214
+ completionPrice: 0.0004
4215
+ },
4216
+ "mistral.mistral-7b-instruct-v0:2": {
4217
+ promptPrice: 0.00015,
4218
+ completionPrice: 0.0002
4219
+ },
4220
+ "mistral.mixtral-8x7b-instruct-v0:1": {
4221
+ promptPrice: 0.00045,
4222
+ completionPrice: 0.0007
4223
+ },
4224
+ "mistral.mistral-large-2402-v1:0": {
4225
+ promptPrice: 0.008,
4226
+ completionPrice: 0.024
4227
+ },
4228
+ "anthropic.claude-3-haiku-20240307-v1:0": {
4229
+ promptPrice: 0.00025,
4230
+ completionPrice: 0.00125
4231
+ },
4232
+ "anthropic.claude-v2": {
4233
+ promptPrice: 0.008,
4234
+ completionPrice: 0.024
4235
+ },
4236
+ "anthropic.claude-3-sonnet-20240229-v1:0": {
4237
+ promptPrice: 0.003,
4238
+ completionPrice: 0.015
4239
+ },
4240
+ "anthropic.claude-3-opus-20240229-v1:0": {
4241
+ promptPrice: 0.015,
4242
+ completionPrice: 0.075
4243
+ },
4244
+ "meta.llama3-8b-instruct-v1:0": {
4245
+ promptPrice: 0.0004,
4246
+ completionPrice: 0.0006
4247
+ },
4248
+ "meta.llama3-70b-instruct-v1:0": {
4249
+ promptPrice: 0.00265,
4250
+ completionPrice: 0.0035
4251
+ },
4252
+ "meta.llama2-13b-chat-v1": {
4253
+ promptPrice: 0.00075,
4254
+ completionPrice: 0.001
4255
+ },
4256
+ "meta.llama2-70b-chat-v1": {
4257
+ promptPrice: 0.00195,
4258
+ completionPrice: 0.00256
4259
+ },
4260
+ "cohere.command-text-v14": {
4261
+ promptPrice: 0.0015,
4262
+ completionPrice: 0.002
4263
+ },
4264
+ "cohere.command-light-text-v14": {
4265
+ promptPrice: 0.0003,
4266
+ completionPrice: 0.0006
4267
+ },
4268
+ "ai21.j2-mid-v1": {
4269
+ promptPrice: 0.0125,
4270
+ completionPrice: 0.0125
4271
+ },
4272
+ "ai21.j2-ultra-v1": {
4273
+ promptPrice: 0.0188,
4274
+ completionPrice: 0.0188
4275
+ },
4276
+ "gemini-1.0-pro": {
4277
+ promptPrice: 0.0005,
4278
+ completionPrice: 0.0015
4279
+ },
4280
+ "gemini-1.5-flash": {
4281
+ promptPrice: 0.000075,
4282
+ completionPrice: 0.0003
4283
+ },
4284
+ "gemini-1.5-pro": {
4285
+ promptPrice: 0.00125,
4286
+ completionPrice: 0.005
4287
+ },
4288
+ "gemini-1.0-pro-002": {
4289
+ promptPrice: 0.0005,
4290
+ completionPrice: 0.0015
4291
+ },
4292
+ "gemini-1.0-pro-001": {
4293
+ promptPrice: 0.0005,
4294
+ completionPrice: 0.0015
4295
+ },
4296
+ "gemini-1.5-pro-preview-0409": {
4297
+ promptPrice: 0.005,
4298
+ completionPrice: 0.015
4299
+ },
4300
+ "gemini-1.5-pro-preview-0514": {
4301
+ promptPrice: 0.005,
4302
+ completionPrice: 0.015
4303
+ },
4304
+ "gemini-1.5-flash-preview-0514": {
4305
+ promptPrice: 0.0005,
4306
+ completionPrice: 0.0015
4307
+ },
4308
+ "gemini-2.0-flash": {
4309
+ promptPrice: 0.0001,
4310
+ completionPrice: 0.0004
4311
+ },
4312
+ "gemini-2.0-flash-lite": {
4313
+ promptPrice: 0.000075,
4314
+ completionPrice: 0.0003
4315
+ },
4316
+ "gemini-2.5-flash": {
4317
+ promptPrice: 0.0003,
4318
+ completionPrice: 0.0025
4319
+ },
4320
+ "gemini-2.5-flash-preview": {
4321
+ promptPrice: 0.0003,
4322
+ completionPrice: 0.0025
4323
+ },
4324
+ "gemini-2.5-flash-lite": {
4325
+ promptPrice: 0.0001,
4326
+ completionPrice: 0.0004
4327
+ },
4328
+ "gemini-2.5-flash-lite-preview": {
4329
+ promptPrice: 0.0001,
4330
+ completionPrice: 0.0004
4331
+ },
4332
+ "gemini-2.5-pro": {
4333
+ promptPrice: 0.00125,
4334
+ completionPrice: 0.01
4335
+ },
4336
+ "text-bison": {
4337
+ promptPrice: 0.001,
4338
+ completionPrice: 0.002
4339
+ },
4340
+ "text-bison@002": {
4341
+ promptPrice: 0.001,
4342
+ completionPrice: 0.002
4343
+ },
4344
+ "text-bison-32k": {
4345
+ promptPrice: 0.001,
4346
+ completionPrice: 0.002
4347
+ },
4348
+ "text-bison-32k@002": {
4349
+ promptPrice: 0.001,
4350
+ completionPrice: 0.002
4351
+ },
4352
+ "text-unicorn": {
4353
+ promptPrice: 0.01,
4354
+ completionPrice: 0.03
4355
+ },
4356
+ "text-unicorn@001": {
4357
+ promptPrice: 0.01,
4358
+ completionPrice: 0.03
4359
+ },
4360
+ "chat-bison": {
4361
+ promptPrice: 0.001,
4362
+ completionPrice: 0.002
4363
+ },
4364
+ "chat-bison@002": {
4365
+ promptPrice: 0.001,
4366
+ completionPrice: 0.002
4367
+ },
4368
+ "chat-bison-32k": {
4369
+ promptPrice: 0.001,
4370
+ completionPrice: 0.002
4371
+ },
4372
+ "chat-bison-32k@002": {
4373
+ promptPrice: 0.001,
4374
+ completionPrice: 0.002
4375
+ },
4376
+ "llama3-8b-8192": {
4377
+ promptPrice: 0.00005,
4378
+ completionPrice: 0.0001
4379
+ },
4380
+ "llama3-70b-8192": {
4381
+ promptPrice: 0.00059,
4382
+ completionPrice: 0.00079
4383
+ },
4384
+ "mixtral-8x7b-32768": {
4385
+ promptPrice: 0.00024,
4386
+ completionPrice: 0.00024
4387
+ },
4388
+ "gemma-7b-it": {
4389
+ promptPrice: 0.0001,
4390
+ completionPrice: 0.0001
4391
+ },
4392
+ "reka-core": {
4393
+ promptPrice: 0.002,
4394
+ completionPrice: 0.002
4395
+ },
4396
+ "reka-core-20240415": {
4397
+ promptPrice: 0.002,
4398
+ completionPrice: 0.002
4399
+ },
4400
+ "reka-core-20240501": {
4401
+ promptPrice: 0.002,
4402
+ completionPrice: 0.002
4403
+ },
4404
+ "reka-flash": {
4405
+ promptPrice: 0.0002,
4406
+ completionPrice: 0.0008
4407
+ },
4408
+ "reka-flash-20240226": {
4409
+ promptPrice: 0.0002,
4410
+ completionPrice: 0.0008
4411
+ },
4412
+ "reka-edge": {
4413
+ promptPrice: 0.0001,
4414
+ completionPrice: 0.0001
4415
+ },
4416
+ "reka-edge-20240208": {
4417
+ promptPrice: 0.0001,
4418
+ completionPrice: 0.0001
4419
+ },
4420
+ "reka-spark": {
4421
+ promptPrice: 0.00005,
4422
+ completionPrice: 0.00005
4423
+ },
4424
+ "grok-beta": {
4425
+ promptPrice: 0.0005,
4426
+ completionPrice: 0.0015
4427
+ },
4428
+ "grok-vision-beta": {
4429
+ promptPrice: 0.0005,
4430
+ completionPrice: 0.0015
4431
+ },
4432
+ "jamba-1.5-mini": {
4433
+ promptPrice: 0.0002,
4434
+ completionPrice: 0.0004
4435
+ },
4436
+ "jamba-1.5-large": {
4437
+ promptPrice: 0.002,
4438
+ completionPrice: 0.008
4439
+ },
4440
+ "meta-llama/Llama-3.3-70B-Instruct-Turbo": {
4441
+ promptPrice: 0.00088,
4442
+ completionPrice: 0.00088
4443
+ },
4444
+ "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo-vLLM-json": {
4445
+ promptPrice: 0.00088,
4446
+ completionPrice: 0.00088
4447
+ },
4448
+ "meta-llama/Meta-Llama-3.1-405B-Instruct-Lite-Pro-lora": {
4449
+ promptPrice: 0.00088,
4450
+ completionPrice: 0.00088
4451
+ },
4452
+ "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": {
4453
+ promptPrice: 0.00088,
4454
+ completionPrice: 0.00088
4455
+ },
4456
+ "Qwen/QwQ-32B-Preview": {
4457
+ promptPrice: 0.0012,
4458
+ completionPrice: 0.0012
4459
+ },
4460
+ "codellama/CodeLlama-34b-Instruct-hf": {
4461
+ promptPrice: 0.0008,
4462
+ completionPrice: 0.0008
4463
+ },
4464
+ "databricks/dbrx-instruct": {
4465
+ promptPrice: 0.0012,
4466
+ completionPrice: 0.0012
4467
+ },
4468
+ "deepseek-ai/deepseek-llm-67b-chat": {
4469
+ promptPrice: 0.0009,
4470
+ completionPrice: 0.0009
4471
+ },
4472
+ "google/gemma-2b-it": {
4473
+ promptPrice: 0.0001,
4474
+ completionPrice: 0.0001
4475
+ },
4476
+ "google/gemma-2-27b-it": {
4477
+ promptPrice: 0.0008,
4478
+ completionPrice: 0.0008
4479
+ },
4480
+ "google/gemma-2-9b-it": {
4481
+ promptPrice: 0.0003,
4482
+ completionPrice: 0.0003
4483
+ },
4484
+ "Gryphe/MythoMax-L2-13b-Lite": {
4485
+ promptPrice: 0.0003,
4486
+ completionPrice: 0.0003
4487
+ },
4488
+ "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": {
4489
+ promptPrice: 0.0088,
4490
+ completionPrice: 0.0088
4491
+ },
4492
+ "deepseek-chat": {
4493
+ promptPrice: 0.00014,
4494
+ completionPrice: 0.00028
4495
+ },
4496
+ "deepseek-reasoner": {
4497
+ promptPrice: 0.00055,
4498
+ completionPrice: 0.00219
4499
+ }
4500
+ };
4501
+ var defaultPricing = {
4502
+ embeddings: embeddings,
4503
+ images: images,
4504
+ audio: audio,
4505
+ chat: chat
4506
+ };
4507
+
3913
4508
  function loadPricing(pricingJsonPath) {
3914
4509
  if (pricingJsonPath) {
3915
4510
  // eslint-disable-next-line @typescript-eslint/no-var-requires
3916
4511
  const fs = require("fs");
3917
4512
  return JSON.parse(fs.readFileSync(pricingJsonPath, "utf-8"));
3918
4513
  }
3919
- return require("./data/default_pricing.json");
4514
+ return defaultPricing;
3920
4515
  }
3921
4516
 
3922
4517
  let _configuration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyway-sh/node-server-sdk",
3
- "version": "0.22.10",
3
+ "version": "0.22.12",
4
4
  "description": "Anyway Software Development Kit (SDK) for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",