fix(amr): improve unavailable model gating - #5335
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82dd1ff43f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🧪 This PR has changes that need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready (and design/product have signed off, where applicable). |
nettee
left a comment
There was a problem hiding this comment.
Two blocking regressions remain in the AMR gating path: stale saved model ids can still be sent even after the picker shows a fallback, and the new tier-upgrade failure code is not wired into the run-failure UX so users still land on a generic retry path instead of an upgrade affordance.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
nettee
left a comment
There was a problem hiding this comment.
One blocking regression is still visible on the current head: the new AMR tier-upgrade failure code is emitted by the daemon, but the chat failure UI still falls back to a generic retry path instead of surfacing the upgrade affordance this PR adds elsewhere.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
|
Looper fixer round complete — b69afb3
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
|
To use Codex here, create an environment for this repo. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b69afb359f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
|
Looper fixer round complete — f5b72c6
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
|
To use Codex here, create an environment for this repo. |
Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85f3cc41cc
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9acebe95c0
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
nettee
left a comment
There was a problem hiding this comment.
One blocking regression remains in the AMR unavailable-model path, and a second blocking regression remains in the remembered-catalog fallback; details inline.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b37e7ac905
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
nettee
left a comment
There was a problem hiding this comment.
@mrcfps I re-ran the current head through the remaining AMR gating and default-model paths and the fixes now line up across the daemon and web surfaces. I verified the AMR-focused daemon coverage around model resolution, vela error classification, session resume, status/model cache behavior, and targeted connection-test cases, plus the focused web suites for disabled-model picker behavior, upgrade affordances, and run-failure guidance; those checks passed on this head. Nice work closing out the earlier regressions and keeping the picker/runtime behavior aligned.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
|
Looper fixer round complete — 9d22bbe
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
|
To use Codex here, create an environment for this repo. |
nettee
left a comment
There was a problem hiding this comment.
@mrcfps I re-ran the current head through the AMR gating paths in the changed ranges and the daemon/web behavior is lining up now: unavailable models stay disabled with upgrade affordances, the refreshed AMR status/model polling path updates the picker after sign-in or refocus, and the new entitlement failure classification is wired through to the chat recovery UI. I also checked the surrounding daemon model-resolution, vela status refresh, and picker normalization changes against the updated targeted tests in this PR; aside from this worktree not having package installs available to rerun Vitest locally, I didn’t find a concrete regression on 9d22bbe8fc3074d977084a9e8c37e0747f3de39d. Nice job closing the loop between the backend classification work and the picker/runtime UX.
|
@codex review |
|
Current head already has @nettee's approval and green CI, so I don't have anything additive on top of that pass. I did queue @AmyShang-alt for the manual validation gate. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d22bbe8fc
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
|
Looper fixer round complete — 70575b7
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
|
To use Codex here, create an environment for this repo. |
nettee
left a comment
There was a problem hiding this comment.
@mrcfps I reviewed the current changed ranges on 70575b7, with extra attention to the AMR default-model resolution, cache invalidation after status/wallet refresh, the new entitlement-upgrade failure path, and the picker/runtime alignment in the updated web flows. The follow-up fixes and targeted regression coverage line up on this head; aside from this worktree not having node_modules available for a fresh local Vitest rerun, I did not find a concrete correctness or maintainability regression in scope. Nice work closing the loop between the daemon-side gating changes and the upgrade UX across the picker and run-failure surfaces.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70575b7355
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| new Set(ids), | ||
| ); | ||
| liveModelOrder.set(key, ids); | ||
| liveModelOrder.set(key, remembered); |
There was a problem hiding this comment.
Invalidate remembered AMR metadata on account changes
Now that remembered AMR entries keep enabled/default, this profile-scoped cache can carry account-tier metadata across AMR account or plan changes: detection and run preflight both fall back through getRememberedLiveModels(def.id, resolveAmrProfile(...)), so if a user upgrades or switches accounts within the same profile and the next catalog probe falls back to remembered models, the new account can inherit the previous account's locked/default flags until a successful remote fetch. Clear this remembered AMR list when status/wallet refresh invalidates the model cache, or include an account/entitlement revision in the remembered key.
Useful? React with 👍 / 👎.
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-5335-to-release/v0.14.1
git worktree add --checkout .worktree/backport-5335-to-release/v0.14.1 backport-5335-to-release/v0.14.1
cd .worktree/backport-5335-to-release/v0.14.1
git reset --hard HEAD^
git cherry-pick -x b3356807b62535f93e0bfe9bd8fe1f601f1e951c
git push --force-with-lease |
Generated-By: looper 0.10.1 (runner=fixer, agent=codex)
* fix(amr): honor full model list metadata * fix(amr): classify tier entitlement failures * fix(amr): refine unavailable model upgrade affordance * fix(web): restore stale AMR model fallback Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(web): surface AMR tier upgrade failures Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): mirror chat upgrade attribution Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): skip disabled default models Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): honor catalog default model * chore(pack): bump vela cli to 0.0.20 * fix(amr): align locked catalog fallback state * chore(nix): refresh pnpm deps hash * fix(amr): refresh entitlement-aware model state * fix(amr): refresh models after upgrade return * fix(amr): preserve default model analytics * fix(amr): tighten model gating follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default and refresh follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): resolve explicit default before spawn Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): concretize default model in smoke paths Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default model gating Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): share connection-test model cache Generated-By: looper 0.10.1 (runner=fixer, agent=codex) --------- Co-authored-by: open-design-bot[bot] <282769551+open-design-bot[bot]@users.noreply.github.com> (cherry picked from commit b335680)
* fix(amr): honor full model list metadata * fix(amr): classify tier entitlement failures * fix(amr): refine unavailable model upgrade affordance * fix(web): restore stale AMR model fallback Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(web): surface AMR tier upgrade failures Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): mirror chat upgrade attribution Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): skip disabled default models Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): honor catalog default model * chore(pack): bump vela cli to 0.0.20 * fix(amr): align locked catalog fallback state * chore(nix): refresh pnpm deps hash * fix(amr): refresh entitlement-aware model state * fix(amr): refresh models after upgrade return * fix(amr): preserve default model analytics * fix(amr): tighten model gating follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default and refresh follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): resolve explicit default before spawn Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): concretize default model in smoke paths Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default model gating Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): share connection-test model cache Generated-By: looper 0.10.1 (runner=fixer, agent=codex) --------- (cherry picked from commit b335680) Co-authored-by: Marc Chan <mrc@powerformer.com> Co-authored-by: open-design-bot[bot] <282769551+open-design-bot[bot]@users.noreply.github.com>
* fix(amr): honor full model list metadata * fix(amr): classify tier entitlement failures * fix(amr): refine unavailable model upgrade affordance * fix(web): restore stale AMR model fallback Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(web): surface AMR tier upgrade failures Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): mirror chat upgrade attribution Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): skip disabled default models Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): honor catalog default model * chore(pack): bump vela cli to 0.0.20 * fix(amr): align locked catalog fallback state * chore(nix): refresh pnpm deps hash * fix(amr): refresh entitlement-aware model state * fix(amr): refresh models after upgrade return * fix(amr): preserve default model analytics * fix(amr): tighten model gating follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default and refresh follow-ups Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): resolve explicit default before spawn Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): concretize default model in smoke paths Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): repair default model gating Generated-By: looper 0.10.1 (runner=fixer, agent=codex) * fix(amr): share connection-test model cache Generated-By: looper 0.10.1 (runner=fixer, agent=codex) --------- Co-authored-by: open-design-bot[bot] <282769551+open-design-bot[bot]@users.noreply.github.com>
















































Why
I was updating the AMR/Open Design Cloud model gating flow and hit two UX problems in the model pickers: unavailable models were hard to distinguish from available ones, and the upgrade path was disconnected from the disabled options themselves. This PR tightens that flow so users can immediately see which models require an upgrade and jump straight to the AMR upgrade page from the option row.
What users will see
Unavailable AMR models now stay visibly disabled in the model picker, sort after available models, show a lock beside the model name, and expose an upgrade hint on hover. Clicking the lock opens the AMR upgrade destination from the inline switcher, settings dialog, and avatar menu.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-pack/tools-prflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
Not attached.
Bug fix verification
pnpm exec vitest run tests/integrations/vela-errors.test.tsinapps/daemonpassed for the entitlement classification change. For the picker affordance,apps/web/tests/components/modelOptions.test.tsxwas updated and the designer lane reported it passing together withpnpm --filter @open-design/web typecheckandpnpm guard.Validation
pnpm exec vitest run tests/integrations/vela-errors.test.ts(inapps/daemon)pnpm --filter @open-design/web typecheckpnpm guardapps/web/tests/components/modelOptions.test.tsx