Repository navigation
fix(api): for /backend-api/codex/model, return it in codex format - #331
Conversation
cb30c95 to
5a6c965
Compare
|
Thank you very much! Align this is very beneficial. I'm looking for a way to manually override the model cache before running the real codex, This way we can align the /model command benhavior. |
5a6c965 to
b9edf65
Compare
|
I have a simpler configuration to do that, with digging into codex source code, there is an option |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9edf65404
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thank you for your contribution! |
There was a problem hiding this comment.
Just filtering out the list on /backend-api/codex/models for API Allowed Model is not enough for codex-cli as it has a default visibility value for various model. You need to explicitly set it to hide in the response so that the /models will not show the model
Filtering may not align the /v1/models behavior to just let the app to show the models available to the API
* fix(proxy): preserve model_messages in catalog response codex-lb stripped `model_messages` from upstream model entries via `_FILTERED_FIELDS` in model_fetcher.py. The Codex client's model picker needs this field to display newer models (gpt-5.6-sol/terra/luna); without it the client silently drops models absent from its bundled metadata. PR #331 removed `base_instructions` from the filter for the same reason — `model_messages` was left behind by oversight. Remove the dead `_FILTERED_FIELDS` abstraction and use `raw = dict(data)` to preserve all upstream fields verbatim, making the catalog response field-for-field identical to the upstream ChatGPT backend response. Adds regression tests at the fetcher boundary and the catalog endpoint, plus an OpenSpec change folder. * chore(pr): finalize preserve-model-messages-in-catalog for merge - Merge origin/main into the PR branch. - Add zepx (Choong Jun Jin) to .all-contributorsrc (code, test). - Check off completed tasks in the OpenSpec change tasks.md. - Add a direct client_version-path regression test asserting GET /v1/models?client_version=<v> preserves model_messages for a live-catalog model. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Soju06 <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
…ju06#331) * fix(api): for /backend-api/codex/model, return it in codex upstream format * fix(api): preserve codex model visibility gating --------- Co-authored-by: Soju06 <[email protected]>
* fix(proxy): preserve model_messages in catalog response codex-lb stripped `model_messages` from upstream model entries via `_FILTERED_FIELDS` in model_fetcher.py. The Codex client's model picker needs this field to display newer models (gpt-5.6-sol/terra/luna); without it the client silently drops models absent from its bundled metadata. PR Soju06#331 removed `base_instructions` from the filter for the same reason — `model_messages` was left behind by oversight. Remove the dead `_FILTERED_FIELDS` abstraction and use `raw = dict(data)` to preserve all upstream fields verbatim, making the catalog response field-for-field identical to the upstream ChatGPT backend response. Adds regression tests at the fetcher boundary and the catalog endpoint, plus an OpenSpec change folder. * chore(pr): finalize preserve-model-messages-in-catalog for merge - Merge origin/main into the PR branch. - Add zepx (Choong Jun Jin) to .all-contributorsrc (code, test). - Check off completed tasks in the OpenSpec change tasks.md. - Add a direct client_version-path regression test asserting GET /v1/models?client_version=<v> preserves model_messages for a live-catalog model. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Soju06 <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>

Address part of #324 , Updating
/backend-api/codex/modelsAPI to a format that at leastcodex-cliacceptsAlthough that the
codex-clibehavior cannot be changed this moment, and the change of/backend-api/codex/modelsdoes not affect thecodex-cli/modelbecause of thecodexmechanismIt is always good to align the format with the upstream and prepare it when
codexis compatible with that one day.Tested on my modified
codex-cliwith success.