Skip to content

Consolidate model switching fixes and CI staging on dev - #38

Merged
dzianisv merged 9 commits into
mainfrom
dev
Mar 21, 2026
Merged

dzianisv merged 9 commits into
mainfrom
dev

Conversation

@dzianisv

Copy link
Copy Markdown
Owner

Summary

  • consolidate the provider-backed /model fixes onto a fresh rebased dev branch
  • apply provider switches immediately in-session, including Copilot-backed model picks
  • preserve canonical reasoning metadata for provider aliases such as azure/gpt-5.4-pro
  • remove the hardcoded npm staging workflow/version assumption so CI no longer depends on expired upstream artifacts

Included fixes

  • runtime provider switching now rebuilds the active thread manager against the selected provider and carries the selected model forward immediately
  • provider alias model ids inherit canonical reasoning metadata so /model shows reasoning choices and the next prompt uses the selected effort
  • regression coverage now includes runtime provider switching and the in-session /model flow
  • npm staging scripts now resolve the workflow dynamically and honor the current repository before falling back to openai/codex

Validation

  • cargo test -p codex-core --lib model_providers_config_overrides_built_in_provider_definition -- --nocapture
  • CARGO_INCREMENTAL=0 cargo test -p codex-tui --lib persist_model_selection_switches_provider_in_runtime -- --nocapture
  • CARGO_INCREMENTAL=0 cargo test -p codex-tui --test all models_dev_provider_alias_model_switch_then_prompt_uses_selected_reasoning_effort -- --nocapture
  • python3 -m unittest scripts/test_stage_npm_packages.py
  • python3 scripts/stage_npm_packages.py --release-version 0.116.0 --package codex --output-dir /tmp/codex-stage-test

Closes #14
Closes #27
Closes #36
Refs #21

engineer added 9 commits March 19, 2026 15:25
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.

(cherry picked from commit ec5be6b)
(cherry picked from commit 8b7779520d39ccbd0bea17e6f0a33131be05e960)
@dzianisv
dzianisv merged commit 3e7b4b6 into main Mar 21, 2026
13 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant