Skip to content

fix(codex): project upstream model capabilities into discovery - #400

Merged
fylorn merged 3 commits into
mainfrom
codex/codex-reasoning-catalog
Nov 11, 2026
Merged

fylorn merged 3 commits into
mainfrom
codex/codex-reasoning-catalog

Conversation

@fylorn

@fylorn fylorn commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex could list models and aliases but offered no reasoning choices when the upstream returned an ordinary data model list. Core only accepted complete native Codex definitions and discarded reported capabilities such as DeepSeek's effort.supported_levels and effort.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.

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
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 fylorn changed the title fix(codex): retain reasoning choices in discovered catalogs fix(codex): project upstream model capabilities into discovery Nov 11, 2026
@fylorn
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.
@fylorn
fylorn merged commit cdc8e20 into main Nov 11, 2026
7 checks passed
@fylorn
fylorn deleted the codex/codex-reasoning-catalog branch November 11, 2026 18:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant