fix: read config.toml service_tier for inherited service mode - #1771
Open
Rat0323 wants to merge 2 commits into
Open
fix: read config.toml service_tier for inherited service mode#1771Rat0323 wants to merge 2 commits into
Rat0323 wants to merge 2 commits into
Conversation
Rat0323
force-pushed
the
fix/service-tier-inherit-label
branch
from
August 4, 2026 19:23
f5a4857 to
918756c
Compare
Inherit mode previously only read the Codex desktop state key default-service-tier and mislabeled the result as coming from config.toml. Now the backend model catalog reports the effective service_tier parsed from config.toml (profile-aware), and the renderer resolves the inherited tier from the Codex app setting first, then config.toml, labeling the source accordingly. Inherited fast requests are still gated by model support before service_tier is injected.
Rat0323
force-pushed
the
fix/service-tier-inherit-label
branch
from
August 4, 2026 21:25
918756c to
7bb595b
Compare
Mirror PR BigPizzaV3#1735 so byte-exact upstream theme asset tests pass on Windows checkouts; this commit becomes a no-op once BigPizzaV3#1735 merges.
Rat0323
force-pushed
the
fix/service-tier-inherit-label
branch
from
August 4, 2026 21:49
7bb595b to
1235aab
Compare
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.
问题
服务模式面板在「继承」状态下此前显示
继承 config.toml:standard,但实现只读取 Codex 桌面状态default-service-tier,从不解析config.toml。当该状态项不存在时会被误显示为 Standard——即使config.toml里实际写了service_tier = "fast",请求也不会带上 priority,与提示语完全不符。修复
后端(真实读取 config.toml)
model_catalog.rs现在在/codex-model-catalog响应中新增service_tier字段,返回 config.toml(含 profile 覆盖)里生效的service_tier;未配置时为null。复用现有的 config 解析逻辑,无新增 I/O 通道。
注入脚本(继承语义修正)
default-service-tier),其次config.toml的service_tier,两者都缺失才显示「默认」。继承 Codex 默认设置:…或继承 config.toml:…,不再猜成 Standard。codexServiceTierInheritedValue),并保留原有的模型支持门控:不支持 Fast 的模型仍会被拦回 Standard。测试
model_catalog_reports_effective_service_tier_from_config/model_catalog_service_tier_is_null_when_config_does_not_set_it。resolveInheritedServiceTier的分辨结果(config-toml / 未设置)、继承 config fast 但模型不支持时的拦截。cargo test -p codex-plus-core --test cdp_bridge --test model_catalog --test bridge_routes全部通过(103 tests)。