fix: clear relay context limits for official mode - #2159
Open
yytw21 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
从中转 provider 切换到纯官方登录时,
clear_relay_config_to_home_with_auth()会移除model_catalog_json,但会保留此前中转写入的model_context_window和model_auto_compact_token_limit。例如中转站 A 使用 256K 上下文后,切换到官方模式仍可能继续使用该全局上限,而不是恢复官方模式自己的配置。
修改
在清理纯官方模式的中转配置时,同时移除:
model_context_windowmodel_auto_compact_token_limit并扩展现有回归测试,验证 256K 中转上下文与自动压缩阈值均会被清理。
验证
结果:
1 passed; 0 failed。