[GH-ISSUE #3674] [BUG]: New Azure OpenAI token limits produce an error when saved #2373

Closed
opened 2026-02-22 18:29:24 -05:00 by yindo · 3 comments
Owner

Originally created by @Humdaddy on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3674

How are you running AnythingLLM?

Docker (local)

What happened?

I appreciate the new context limit for Azure OpenAI; however, when you save the changes to 1M tokens using Gpt4.1 it produces an invalid token limit error and will not save.

The error seems to be related to this line of code not being updated:
anything-llm/server/utils/helpers/updateENV.js
803 if (![4_096, 16_384, 8_192, 32_768, 128_000].includes(tokenLimit))

I have not tried adding the new values myself, but I am about to and figured I love your product so much that I should help. Thank you very much for making AnythingLLM!

Are there known steps to reproduce?

Change to the new 4.1 limit and save:

Image

Originally created by @Humdaddy on GitHub (Apr 18, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3674 ### How are you running AnythingLLM? Docker (local) ### What happened? I appreciate the new context limit for Azure OpenAI; however, when you save the changes to 1M tokens using Gpt4.1 it produces an invalid token limit error and will not save. The error seems to be related to this line of code not being updated: anything-llm/server/utils/helpers/updateENV.js 803 if (![4_096, 16_384, 8_192, 32_768, 128_000].includes(tokenLimit)) I have not tried adding the new values myself, but I am about to and figured I love your product so much that I should help. Thank you very much for making AnythingLLM! ### Are there known steps to reproduce? Change to the new 4.1 limit and save: ![Image](https://github.com/user-attachments/assets/5298f18d-e653-44ea-b7b8-3d37d60c8855)
yindo added the possible bug label 2026-02-22 18:29:24 -05:00
yindo closed this issue 2026-02-22 18:29:24 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 18, 2025):

Removed the hard-coded check totally to ensure this kind of artifact does not occur again since they are not clearly directly tied.

@timothycarambat commented on GitHub (Apr 18, 2025): Removed the hard-coded check totally to ensure this kind of artifact does not occur again since they are not clearly directly tied.
Author
Owner

@Humdaddy commented on GitHub (Apr 18, 2025):

Nice! You guys are killing it! I represent a mid-sized community college in Texas. I appreciate your white labeling out of the box and am about to demo the alpha production system. I will be looking to donate to the cause from the official coffers once that is complete, and I get executive buy in. CoPilot is cool...but this is waaaayyyy cooler for what I want to do with it.

@Humdaddy commented on GitHub (Apr 18, 2025): Nice! You guys are killing it! I represent a mid-sized community college in Texas. I appreciate your white labeling out of the box and am about to demo the alpha production system. I will be looking to donate to the cause from the official coffers once that is complete, and I get executive buy in. CoPilot is cool...but this is waaaayyyy cooler for what I want to do with it.
Author
Owner

@timothycarambat commented on GitHub (Apr 18, 2025):

@Humdaddy that is awesome to hear! Let me know if we can help in any way or if you need any recommendations for whatever the end task is destined to be!
team@mintplexlabs.com

@timothycarambat commented on GitHub (Apr 18, 2025): @Humdaddy that is awesome to hear! Let me know if we can help in any way or if you need any recommendations for whatever the end task is destined to be! team@mintplexlabs.com
yindo changed title from [BUG]: New Azure OpenAI token limits produce an error when saved to [GH-ISSUE #3674] [BUG]: New Azure OpenAI token limits produce an error when saved 2026-06-05 14:46:10 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2373