@goliapkg/tiktoken-wasm 3.2.5 → 3.4.0

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/README.md CHANGED
@@ -122,7 +122,7 @@ module.exports = {
122
122
 
123
123
  ### `listEncodings(): string[]`
124
124
 
125
- List all available encoding names (9 encodings).
125
+ List all available encoding names (11 encodings).
126
126
 
127
127
  ### `getEncoding(name: string): Encoding`
128
128
 
@@ -161,7 +161,7 @@ Map a model name to its encoding name without loading the encoding.
161
161
 
162
162
  ### `estimateCost(modelId, inputTokens, outputTokens): number`
163
163
 
164
- Estimate API cost in USD. Supports 57 models across 7 providers.
164
+ Estimate API cost in USD. Supports 63 models across 7 providers.
165
165
 
166
166
  ### `getModelInfo(modelId): ModelInfo`
167
167
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goliapkg/tiktoken-wasm",
3
3
  "type": "module",
4
4
  "description": "WASM bindings for the tiktoken BPE tokenizer",
5
- "version": "3.2.5",
5
+ "version": "3.4.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -104,9 +104,11 @@ export function estimateCost(model_id: string, input_tokens: number, output_toke
104
104
  * Supported encodings:
105
105
  * - `"cl100k_base"` — GPT-4, GPT-3.5-turbo
106
106
  * - `"o200k_base"` — GPT-4o, GPT-4.1, o1, o3
107
+ * - `"o200k_harmony"` — gpt-oss (harmony chat format)
107
108
  * - `"p50k_base"` — text-davinci-002/003
108
109
  * - `"p50k_edit"` — text-davinci-edit
109
110
  * - `"r50k_base"` — GPT-3 (davinci, curie, etc.)
111
+ * - `"gpt2"` — GPT-2 (alias for r50k_base)
110
112
  * - `"llama3"` — Meta Llama 3/4
111
113
  * - `"deepseek_v3"` — DeepSeek V3/R1
112
114
  * - `"qwen2"` — Qwen 2/2.5/3
package/tiktoken_wasm.js CHANGED
@@ -344,9 +344,11 @@ export function estimateCost(model_id, input_tokens, output_tokens) {
344
344
  * Supported encodings:
345
345
  * - `"cl100k_base"` — GPT-4, GPT-3.5-turbo
346
346
  * - `"o200k_base"` — GPT-4o, GPT-4.1, o1, o3
347
+ * - `"o200k_harmony"` — gpt-oss (harmony chat format)
347
348
  * - `"p50k_base"` — text-davinci-002/003
348
349
  * - `"p50k_edit"` — text-davinci-edit
349
350
  * - `"r50k_base"` — GPT-3 (davinci, curie, etc.)
351
+ * - `"gpt2"` — GPT-2 (alias for r50k_base)
350
352
  * - `"llama3"` — Meta Llama 3/4
351
353
  * - `"deepseek_v3"` — DeepSeek V3/R1
352
354
  * - `"qwen2"` — Qwen 2/2.5/3
Binary file