fix: hide compact models from public listings - #1
Merged
Conversation
Keep -openai-compact variants available for internal Codex compact routing while filtering them from public model and pricing list responses. Compact billing now inherits the base model's configured price and ratios before falling back to the compact wildcard/default behavior.
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.
Fix report: hide
-openai-compactinternal variants and inherit base billingSummary
This patch keeps
*-openai-compactavailable for internal Codex/v1/responses/compactrouting, but prevents those internal variants from being exposed as user-selectable/public pricing models.It also changes compact billing lookup so a compact variant inherits the base model's configured billing first. For example:
gpt-5.4-openai-compactnow inherits configured billing fromgpt-5.4.*-openai-compactwildcard/default fallback behavior remains available.Why
In suffix-based compact routing builds, deleting compact models from channel abilities can break Codex compaction with errors such as
No available channel for model ...-openai-compact.However, exposing compact variants in public model/pricing endpoints is confusing and can show inaccurate prices. When
ModelRatiohasgpt-5.4but does not havegpt-5.4-openai-compact, the compact variant can fall back to the built-in default ratio (37.5) instead of the base model's configured ratio.Changes
/v1/modelspath/v1/modelspath/api/pricingoutput.CompactBaseModelNamehelper.Verification
Ran locally:
go test ./setting/ratio_setting ./controller -count=1Result:
Related upstream context