Skip to content

Fix reasoning selection for Azure model aliases - #37

Closed
dzianisv wants to merge 2 commits into
mainfrom
fix/36-azure-reasoning-effort-alias
Closed

dzianisv wants to merge 2 commits into
mainfrom
fix/36-azure-reasoning-effort-alias

Conversation

@dzianisv

Copy link
Copy Markdown
Owner

Closes #36

Summary

  • reuse canonical model metadata when provider-backed model IDs are namespaced aliases like azure/gpt-5.4-pro
  • keep the provider wire model ID intact while exposing canonical reasoning levels in /model
  • add regression coverage for both metadata inheritance and the real PTY /model flow

Validation

  • 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

Notes

  • this fixes the no-/models / models.dev alias path by reusing bundled canonical metadata
  • the provider-facing request still uses the original alias slug (for example azure/gpt-5.4-pro)

engineer added 2 commits March 18, 2026 10:01
Apply cross-provider /model selections to the live TUI session instead of forcing a fresh session before the change takes effect. Update the app and chat widget runtime config immediately, keep the persisted config change, and align the TUI regression tests with the intended in-session behavior.

Also fix the GitHub Copilot chat/completions fallback path for Claude-family models. Instead of collapsing fallback replies into a single assistant text message, detect Claude-style <tool_call>/<tool_result> wrapper blocks and synthesize native ResponseItem::FunctionCall and ResponseItem::FunctionCallOutput items so Codex handles them like first-class tool activity. Preserve surrounding assistant prose as normal assistant messages and add focused client-side regression tests for wrapper conversion and plain-text passthrough.

This replaces the UI-only workaround direction with provider-boundary normalization, which is the correct place to adapt non-Responses payloads into Codex's native item model.
@OpenCodeEngineer

Copy link
Copy Markdown

Carried forward onto origin/dev.

I pushed a fresh consolidation branch from origin/main as dev and cherry-picked this work there, together with the CI repair for expired npm staging artifacts.

Validated on dev:

  • python3 -m unittest scripts/test_stage_npm_packages.py
  • 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
  • end-to-end scripts/stage_npm_packages.py --package codex smoke against a live upstream rust-release run after installing dotslash

Recommendation: merge from dev, not directly from this branch.

@dzianisv

Copy link
Copy Markdown
Owner Author

Superseded by #38, which now carries the consolidated branch with the rebased model-switching fixes plus the CI npm-staging fix. Please do not merge this branch separately.

@dzianisv

Copy link
Copy Markdown
Owner Author

Superseded by #38, which now carries the consolidated dev -> main branch with the rebased model-switching fixes plus the CI npm-staging fix. Please do not merge this branch separately.

@dzianisv

Copy link
Copy Markdown
Owner Author

Superseded by direct landing on main at 1328bae.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants