Repository navigation
fix(codex): project upstream model capabilities into discovery - #400
Merged
Merged
Conversation
Ordinary upstream model lists supplied names without effort metadata, so Codex could select DeepSeek and aliases but could not select reasoning. Whole-definition comparisons also discarded shared efforts across aliases. Use documented effort-only profiles when native metadata is unavailable, resolve them from actual targets, and intersect choices independently of other native fields. Honor manual disabling and protocol conversion limits.
fylorn
marked this pull request as draft
November 11, 2026 17:14
DeepSeek already reports effort choices and defaults in its ordinary models response. Read those fields instead of maintaining model profiles. Preserve capability metadata through alias projection while retaining the generic instructions and tools for ordinary providers.
fylorn
marked this pull request as ready for review
November 11, 2026 17:42
Bump the workspace and lockfile versions and describe upstream model capability discovery and alias inheritance in the release notes.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Codex could list models and aliases but offered no reasoning choices when the upstream returned an ordinary
datamodel list. Core only accepted complete native Codex definitions and discarded reported capabilities such as DeepSeek'seffort.supported_levelsandeffort.default_level.Project the upstream's reported effort choices, default, context window, and input modalities onto the generic Codex profile. No model-name lookup or static model capability table is introduced. Missing metadata remains unknown. Full native definitions retain their instructions and tools; ordinary model entries cannot supply native tools or instructions.
Aliases inherit the actual routing targets' capabilities. Intersect effort choices separately from prompts and tools, retain manual disabling, and limit translated requests to efforts the adapter can represent. Metadata caching remains scoped to the provider's credentials and requested client version, and conditional reads reflect capability changes.
Addresses ThinkWatch-Lite #434. The DeepSeek models endpoint contract documents the source fields. Relays must preserve those fields for Core to use them. Prepare Core 0.94.0 with synchronized workspace versions and release notes. A Lite dependency and bundled-binary update are needed before bundled installations receive the fix.
Validation: 22 catalog integration tests, 4 catalog unit tests, 86 real-binary smoke checks, workspace Clippy with warnings denied, and formatting. The official DeepSeek response example was served by a mock upstream through the real Core binary; Codex CLI 0.166.0 parsed the resulting catalog and recognized identical effort choices, defaults, context windows, and image support for the original model and its alias. CI passed for the 0.94.0 release commit: the complete workspace test suite and Clippy on macOS, Linux, and Windows; real-binary smoke checks on macOS and Linux; and startup, control-plane handshake, and graceful shutdown checks on Windows. The catalog tests include requests that forward every advertised DeepSeek effort through an alias to its original model.