constructor(model = "gpt-3.5-turbo") {
    if (TokenManager.instance && TokenManager.currentModel === model) {
      this.log("Returning existing instance for model:", model);
      return TokenManager.instance;
    }

    this.model = model;
    this.encoderName = this.#getEncodingFromModel(model);
    this.encoder = getEncoding(this.encoderName);

    TokenManager.instance = this;
    TokenManager.currentModel = model;
    this.log("Initialized new TokenManager instance for model:", model);
    return this;
  }
@class TokenManager

@notice
We cannot do estimation of tokens here like we do in the collector
because we need to know the model to do it.
Other issues are we also do reverse tokenization here for the chat history during cannonballing.
So here we are stuck doing the actual tokenization and encoding until we figure out what to do with prompt overflows.