dotCMS / dotCMS/core

Update jtokkit library from 0.6.1 to 1.1.0 to support text-embedding-3-small model

Open
#34,808 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dotCMS : AI Multiple Vendors stale
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

The jtokkit library (used for tokenizing text before sending to OpenAI's embedding API) is currently pinned at version 0.6.1 in bom/application/pom.xml. This version does not include support for the text-embedding-3-small and text-embedding-3-large model family (released January 2024).

As a result, when dotCMS attempts to generate embeddings using text-embedding-3-small, the EncodingUtil class cannot find a matching encoding in the registry and logs the following warning:

INFO  util.EncodingUtil - Model [text-embedding-3-small] is not suitable for encoding, marking it as invalid and falling back to other models

The model is then marked as ModelStatus.INVALID and the system falls back to other configured models, or fails entirely if no valid fallback exists.

Version 1.1.0 of jtokkit adds support for the text-embedding-3-* model family. Upgrading resolves this issue.

Acceptance Criteria

  • Update jtokkit version from 0.6.1 to 1.1.0 in bom/application/pom.xml
  • Verify that EncodingUtil.getEncoding() correctly resolves an encoding for text-embedding-3-small after the upgrade
  • Verify that no "is not suitable for encoding" warning is logged when text-embedding-3-small is the configured embedding model
  • Confirm embedding generation works end-to-end with text-embedding-3-small
  • Run existing AI-related integration/unit tests to confirm no regressions
Related
  • Epic: #34058
  • Regression Test Task: #34072

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in bom/application/pom.xml and inspect EncodingUtil, then run the existing AI-related unit and integration tests. Update the jtokkit dependency to 1.1.0 and verify that text-embedding-3-small resolves an encoding, avoids the warning, and supports end-to-end embedding generation without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.