Skip to content

Support reasoning-level selection for provider aliases like azure/gpt-5.4-pro in /model #36

Closed

Description

@OpenCodeEngineer

Summary

/model only shows the reasoning-level submenu when the selected model metadata advertises multiple supported_reasoning_efforts.

For provider-backed aliases like azure/gpt-5.4-pro, Codex currently resolves the provider model id but does not attach canonical reasoning metadata unless the provider slug exactly matches a bundled model slug. That means provider aliases can end up with empty reasoning metadata and /model skips the reasoning-level picker.

Expected

If a provider model id is a prefixed alias of a known canonical model (for example azure/gpt-5.4-pro), Codex should preserve the wire id for requests while inheriting the canonical model's reasoning metadata so /model can offer the supported reasoning levels.

Scope

  • Patch provider model-id mapping to reuse canonical metadata for prefixed aliases.
  • Add regression coverage for azure/gpt-5.4-pro.
  • Add end-to-end coverage that /model exposes multiple reasoning levels for the provider alias and that the selected effort is used on the next prompt.

Activity

  1. OpenCodeEngineer commented on Mar 19, 2026

    @OpenCodeEngineer
    Author

    Started work on this. Root cause is in provider model-id mapping: provider aliases like azure/gpt-5.4-pro do not currently inherit canonical reasoning metadata unless the slug exactly matches a bundled catalog entry. Patching metadata resolution and adding regression + /model e2e coverage.

  2. OpenCodeEngineer commented on Mar 19, 2026

    @OpenCodeEngineer
    Author

    Implemented.

    What changed:

    • Reused the existing namespaced-suffix metadata lookup for provider model listings, so provider aliases like azure/gpt-5.4-pro can inherit canonical bundled metadata while preserving the wire model id.
    • Added a core regression proving models.dev Azure aliases inherit canonical reasoning metadata (low/medium/high/xhigh).
    • Added a real PTY /model end-to-end test that switches to azure/gpt-5.4-pro, selects high reasoning in-session, submits a prompt, and asserts the next /v1/responses request uses both the selected model and reasoning effort.

    Validation run:

    • cd codex-rs && cargo test -p codex-core models_dev_provider_alias_model_inherits_canonical_reasoning_metadata
    • cd codex-rs && CARGO_INCREMENTAL=0 cargo test -p codex-tui --test all models_dev_provider_alias_model_switch_then_prompt_uses_selected_reasoning_effort -- --nocapture

    Both passed.

  3. OpenCodeEngineer commented on Mar 19, 2026

    @OpenCodeEngineer
    Author

    PR opened: #37

  4. OpenCodeEngineer commented on Mar 21, 2026

    @OpenCodeEngineer
    Author

    Completed directly on main.

    What landed:

    • the Azure alias reasoning selection fix that had been tracked here
    • the broader consolidated /model switching work from origin/dev
    • the live-session reflection reload fix and PTY coverage proving /model + /experimental work in the same session

    Final main commit: 1328bae7e86e05d70b4bee27b3d46290a71ce981.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions