Repository navigation
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.
Fixes #533
变更摘要
Managed目录策略下GET /v1/models返回的私有models数组未过滤纯生图模型、且未补齐官方 Codex 客户端强校验必填默认字段的问题:data数组继续保留全部supported_in_api模型(含gpt-image-2等纯生图模型),确保通用 OpenAI 客户端兼容性不变;Managed策略下的私有models数组过滤掉supports_text_generation == false的纯生图模型,按顺序重排priority,并统一调用prepare_managed_codex_model()补齐shell_type、visibility、truncation_policy、support_verbosity、supports_parallel_tool_calls等 CodexModelInfo非空必填项;OfficialAccountPool策略保持原样透传官方原始models快照,不注入 Managed 默认值;openai/codexModelsResponse结构的反序列化回归单测及OfficialAccountPool原样透传单测。改动范围
主要文件
crates/service/src/codex_model_catalog.rscrates/service/src/gateway/request/local_models.rscrates/service/src/gateway/request/tests/local_models_tests.rs验证
pnpm -C apps run testpnpm -C apps run buildpnpm -C apps run test:uicargo test --workspace(已执行codexmanager-service相关库单测与cargo fmt --all -- --check)已执行的实际验证:
未执行的验证与原因:
风险与影响面
Managed目录策略下GET /v1/models响应中的 Codex 私有models字段;OpenAI 通用data字段及OfficialAccountPool账号池透传目录均保持原行为不变。备注