feat(review): pluggable per-model tokenizer for exact token counts
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- ai, backend-api-design
Hướng nghiên cứu
Start by reading the implementation of the TokenCounter interface and the per-model configuration introduced by issues #53 and #50. Then inspect langchain4j's built-in estimators for OpenAI, Anthropic, and Gemini and how the budgeter uses them. Done means matching models use their provider estimator, unmatched models fall back to jtokkit, and self-calibration from API token usage continues.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The large-diff token budgeting (#53) ships with a single jtokkit (OpenAI BPE) encoding as the estimate for all providers, self-calibrated from the usage.prompt_tokens the API echoes back. That's exact for OpenAI models but approximate for others (e.g. DeepSeek/Gemini/Anthropic use different vocabularies). For closer budgeting on non-OpenAI models, make the estimator pluggable.
Proposed (enhancement — jtokkit stays the default)
- Keep the
TokenCounterinterface introduced by #53; the default stays jtokkit (OpenAI BPE) for any model without a better estimator. - Reuse langchain4j's built-in per-provider token estimators rather than rolling our own — langchain4j already ships estimators for OpenAI, Anthropic, and Gemini. Wire the matching one behind
TokenCounter, keyed by the configured model/provider, for better estimates on those specific models. - Fall back to jtokkit when no provider estimator matches; the budgeter keeps self-calibrating from
usage.prompt_tokensregardless, so estimates only improve.
No conflict with #53
This plugs in behind the same TokenCounter interface #53 introduces — #53 ships jtokkit-default; #239 swaps in the langchain4j per-provider estimator per model. Nothing in #53 changes.
Depends on
#53 — introduces TokenCounter + the jtokkit default + the per-model config surface (#50). Post-v0.3.0 enhancement.
- Ngôn ngữ chính
- Java
- Star
- 35
- Fork
- 7
- Merge trung bình
- 9 giờ 37 phút
- Pull request đã merge (30 ngày)
- 148
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của devops-thiago/ThrillhouseBot
-
docs(site): Mermaid edge-label contrast on Architecture and a table header on How it comparesĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
devops-thiago/ThrillhouseBot#1132 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(review): always name the linked issue and its unmet criterion in the summaryCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
devops-thiago/ThrillhouseBot#1093 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
devops-thiago/ThrillhouseBot#321 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
devops-thiago/ThrillhouseBot#46 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(dashboard): login page returns 500 in mock mode (window is not defined)Có thể đã có người làm @devops-thiago đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
devops-thiago/ThrillhouseBot#1128 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của devops-thiago/ThrillhouseBot
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
scylladb/scylla-cdc-source-connector#350 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:working documentation enhancement go:build lane:needs-decision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sanne/incus-spawn#1435 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:shuffle bug priority:high requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/datafusion-comet#7062 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wait for review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
AnikethTS/ChangeRadar#22 ·
Maintainer thường phản hồi trong vòng 1 ngày