mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6257] [Feature]: Expose the built-in token estimator to Personal Extensions #3493
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3493
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @minikkeuen on GitHub (Sep 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6257
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Personal Extensions currently do not have a public API for using Marinara's built-in text token estimator.
Extensions that need to display or calculate token estimates have to implement their own estimation logic. This can produce estimates that differ from Marinara's own UI and requires extension authors to duplicate and maintain token estimation logic independently.
Proposed solution
Expose Marinara's built-in text token estimator through the Personal Extension API.
For example:
The API would be available to Browser, Full Page, and Server Personal Extensions so they can use the same estimation logic as Marinara itself.
Alternatives considered
Personal Extensions could implement their own token estimation logic, but this duplicates core behavior and can become inconsistent when Marinara's estimator changes.
Extensions could also use an external tokenizer, but that adds unnecessary dependencies and would not necessarily match Marinara's built-in estimates.
Additional context
This would be useful for extensions that display token counts, context usage, or other token-related information.
The API only needs to expose the estimate result; extensions do not need access to the estimator's internal implementation details.
Template check