refactor: revert changes made to token logic

This commit is contained in:
Marco Beretta 2026-02-07 15:59:06 +01:00
parent 499380f74c
commit 81db6b655a
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
7 changed files with 11 additions and 693 deletions

View file

@ -1,5 +1,4 @@
const { getModelMaxTokens } = require('@librechat/api');
const { TOKEN_DEFAULTS } = require('librechat-data-provider');
const BaseClient = require('../BaseClient');
class FakeClient extends BaseClient {
@ -42,9 +41,7 @@ class FakeClient extends BaseClient {
}
this.maxContextTokens =
this.options.maxContextTokens ??
getModelMaxTokens(this.modelOptions.model) ??
TOKEN_DEFAULTS.LEGACY_CONTEXT_FALLBACK;
this.options.maxContextTokens ?? getModelMaxTokens(this.modelOptions.model) ?? 4097;
}
buildMessages() {}
getTokenCount(str) {