Skip to content

Commit 1356b8f

Browse files
committed
fix: add tokenizer fallback for claude-haiku-4-5
Map claude-haiku-4-5 to claude-3.5-haiku tokenizer as temporary workaround until ai-tokenizer adds native support for the newer model.
1 parent 95fa53b commit 1356b8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/main/tokenizer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export interface Tokenizer {
1717

1818
const MODEL_KEY_OVERRIDES: Record<string, string> = {
1919
"anthropic:claude-sonnet-4-5": "anthropic/claude-sonnet-4.5",
20+
// FIXME(ThomasK33): Temporary workaround since ai-tokenizer does not yet
21+
// claude-haiku-4.5
22+
"anthropic:claude-haiku-4-5": "anthropic/claude-3.5-haiku",
2023
};
2124

2225
const DEFAULT_WARM_MODELS = [

0 commit comments

Comments
 (0)