Add a token limit attribute on api.openai.com/v1/models

This is something that is also an unanswered request for features in tiktoken, since it seems openAI doesn’t yet see the value of returning context length per model. Best one can do is dump all the models out and after research, create your own dictionary, also noting the endpoints and formatting methods supported if you want a “pick any model” type application. The best one might do is add some heuristics to figure out what “gpt-3.6-boost-24k” in the model list would mean in the future.

Another thing one might do, to make such a dictionary or to add knowledge of unknown models, is simply make a request. It doesn’t need to be costly: just send “hi” but attempt to reserve max_tokens of 4100 or 4090 around typical thresholds and see which doesn’t produce an error.