Update jtokkit library from 0.6.1 to 1.1.0 to support text-embedding-3-small model
Nobody has claimed this yet.
- 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
jtokkitversion from0.6.1to1.1.0inbom/application/pom.xml - Verify that
EncodingUtil.getEncoding()correctly resolves an encoding fortext-embedding-3-smallafter the upgrade - Verify that no
"is not suitable for encoding"warning is logged whentext-embedding-3-smallis 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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