Skip to content

Comments

🤖 feat: refresh LiteLLM models and prune stale overrides#2559

Open
ammar-agent wants to merge 5 commits intomainfrom
feat/update-models-cycle
Open

🤖 feat: refresh LiteLLM models and prune stale overrides#2559
ammar-agent wants to merge 5 commits intomainfrom
feat/update-models-cycle

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Feb 23, 2026

Summary

This PR adds a reusable update-models skill, runs a full model-refresh cycle, and prunes stale models-extra overrides that upstream LiteLLM now covers.

Background

models-extra.ts is checked before models.json, so stale local overrides silently shadow corrected upstream metadata. We needed a repeatable workflow that makes pruning safe and routine.

Implementation

  • Added .mux/skills/update-models/SKILL.md with an end-to-end workflow for:
    • refreshing models.json
    • diffing models-extra against upstream
    • deciding remove/keep/update
    • running focused validation
  • Executed the workflow and refreshed src/common/utils/tokens/models.json from upstream LiteLLM.
  • Pruned src/common/utils/tokens/models-extra.ts down to only models still missing upstream (gpt-5.3-codex, gpt-5.3-codex-spark).
  • Updated model-related tests to match current data ownership and remove stale assumptions tied to older overrides.
  • Incorporated cycle findings back into the skill (including a comparison script and lessons learned section).
  • Stabilized tests/ui/compaction/compaction.test.ts by pinning compaction-flow test sends to Sonnet so auto-compaction still has a deterministic higher-context fallback after Opus metadata moved to 1M context upstream.

Validation

  • make static-check
  • bun test src/common/constants/knownModels.test.ts src/common/utils/tokens/modelStats.test.ts src/common/utils/ai/modelCapabilities.test.ts
  • TEST_INTEGRATION=1 bun x jest tests/ui/compaction/compaction.test.ts --runInBand

Risks

  • Upstream token/cost metadata changes can alter runtime context/cost behavior.
  • Mitigated by preserving only intentional local overrides still missing upstream and validating known model resolution + compaction UI behavior.

Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $2.12

@ammar-agent
Copy link
Collaborator Author

@codex review

Please review the models refresh + models-extra pruning + update-models skill improvements.

@ammar-agent ammar-agent force-pushed the feat/update-models-cycle branch from a8a75e1 to b84b1c1 Compare February 23, 2026 19:24
@ammar-agent
Copy link
Collaborator Author

@codex review

Rebased onto latest main, resolved merge conflicts, and re-ran static-check + targeted model tests.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ammar-agent
Copy link
Collaborator Author

@codex review

Addressed the failing integration check by making compaction UI tests deterministic with an explicit lower-context model for compaction flows. Re-ran static-check and targeted tests.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fab0f4d20f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ammar-agent
Copy link
Collaborator Author

@codex review

Addressed the draft-preservation test concern by keeping sendMessage in-flight while typing the draft, then awaiting completion.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b5999184e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ammar-agent
Copy link
Collaborator Author

@codex review

Adjusted the compaction draft-preservation test to keep the UI send path (app.chat.send) while still making auto-compaction deterministic via preferred compaction model setup before render.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

1 participant