@goliapkg/tiktoken-wasm 3.5.0 → 3.6.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
@@ -1,7 +1,7 @@
1
1
  # @goliapkg/tiktoken-wasm
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@goliapkg/tiktoken-wasm?style=flat-square&logo=npm)](https://www.npmjs.com/package/@goliapkg/tiktoken-wasm)
4
- [![License](https://img.shields.io/npm/l/@goliapkg/tiktoken-wasm?style=flat-square)](LICENSE)
4
+ [![License](https://img.shields.io/npm/l/@goliapkg/tiktoken-wasm?style=flat-square)](#license)
5
5
 
6
6
  **English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)
7
7
 
@@ -128,14 +128,16 @@ List all available encoding names (11 encodings).
128
128
 
129
129
  Get a tokenizer by encoding name. Supported:
130
130
  - `cl100k_base` — GPT-4, GPT-3.5-turbo
131
- - `o200k_base` — GPT-4o, GPT-4.1, o1, o3
131
+ - `o200k_base` — GPT-4o, GPT-4.1, GPT-5–5.6, o1, o3, o4-mini
132
+ - `o200k_harmony` — gpt-oss (harmony chat format)
132
133
  - `p50k_base` — text-davinci-002/003
133
134
  - `p50k_edit` — text-davinci-edit
134
135
  - `r50k_base` — GPT-3 (davinci, curie, etc.)
136
+ - `gpt2` — GPT-2 (alias for `r50k_base`)
135
137
  - `llama3` — Meta Llama 3/4
136
138
  - `deepseek_v3` — DeepSeek V3/R1
137
139
  - `qwen2` — Qwen 2/2.5/3
138
- - `mistral_v3` — Mistral/Codestral/Pixtral
140
+ - `mistral_v3` — Mistral/Codestral/Pixtral (Tekken)
139
141
 
140
142
  ### `encodingForModel(model: string): Encoding`
141
143
 
@@ -161,7 +163,7 @@ Map a model name to its encoding name without loading the encoding.
161
163
 
162
164
  ### `estimateCost(modelId, inputTokens, outputTokens): number`
163
165
 
164
- Estimate API cost in USD. Supports 68 models across 7 providers.
166
+ Estimate API cost in USD. Supports 94 models across 7 providers.
165
167
 
166
168
  ### `getModelInfo(modelId): ModelInfo`
167
169
 
@@ -169,7 +171,7 @@ Get model metadata with full TypeScript typing.
169
171
 
170
172
  ### `allModels(): ModelInfo[]`
171
173
 
172
- List all 68 supported models with pricing info.
174
+ List all 94 supported models with pricing info.
173
175
 
174
176
  ### `modelsByProvider(provider): ModelInfo[]`
175
177
 
@@ -223,4 +225,4 @@ See [`examples/react-app`](../tiktoken/examples/react-app/) for a complete Vite
223
225
 
224
226
  ## License
225
227
 
226
- [MIT](LICENSE)
228
+ Licensed under either of [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "name": "@goliapkg/tiktoken-wasm",
3
3
  "type": "module",
4
4
  "description": "WASM bindings for the tiktoken BPE tokenizer",
5
- "version": "3.5.0",
6
- "license": "MIT",
5
+ "version": "3.6.0",
6
+ "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/goliajp/rust-tiktoken"
package/tiktoken_wasm.js CHANGED
@@ -476,11 +476,11 @@ export function modelsByProvider(provider) {
476
476
  function __wbg_get_imports() {
477
477
  const import0 = {
478
478
  __proto__: null,
479
- __wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
479
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
480
480
  const ret = Error(getStringFromWasm0(arg0, arg1));
481
481
  return addHeapObject(ret);
482
482
  },
483
- __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
483
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
484
484
  throw new Error(getStringFromWasm0(arg0, arg1));
485
485
  },
486
486
  __wbg_modelinfo_new: function(arg0) {
Binary file
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 GOLIA株式会社
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.