Skip to content

feat(models): auto-refresh nexu official model inventory#634

Merged
mrcfps merged 4 commits intomainfrom
feat/nexu-official-model-refresh
Mar 27, 2026
Merged

feat(models): auto-refresh nexu official model inventory#634
mrcfps merged 4 commits intomainfrom
feat/nexu-official-model-refresh

Conversation

@mrcfps
Copy link
Copy Markdown
Contributor

@mrcfps mrcfps commented Mar 27, 2026

What

Add a controller-side background refresh that re-fetches the Nexu official model inventory every minute.

Why

The Nexu official provider model list can change while the controller is already running. Periodic refresh keeps the available model inventory current without requiring a manual refresh.

How

  • add a 60-second background interval in the controller container lifecycle
  • add refreshNexuOfficialModels() to refresh desktop cloud models only when connected
  • compare the previous and refreshed model lists, then revalidate the default model and sync runtime config when the inventory changes
  • log refresh failures and successful model-list changes

Affected areas

  • Desktop app (Electron shell)
  • Controller (backend / API)
  • Web dashboard (React UI)
  • OpenClaw runtime
  • Skills
  • Shared schemas / packages
  • Build / CI / Tooling

Checklist

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs
  • No any types introduced (use unknown with narrowing)

Notes for reviewers

pnpm test still has an existing unrelated failure in tests/desktop/skill-dir-watcher.test.ts (detects new SKILL.md and syncs ledger after debounce).

Copy link
Copy Markdown

@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: 5fb6d6f789

ℹ️ 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".

Comment thread apps/controller/src/services/model-provider-service.ts Outdated
Comment thread apps/controller/src/app/container.ts Outdated
@mrcfps mrcfps changed the title feat: auto-refresh nexu official model inventory every minute feat: auto-refresh nexu official model inventory Mar 27, 2026
@mrcfps mrcfps changed the title feat: auto-refresh nexu official model inventory feat(models): auto-refresh nexu official model inventory Mar 27, 2026
Copy link
Copy Markdown

@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: 620e4789c6

ℹ️ 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".

Comment thread apps/controller/src/app/container.ts
@mrcfps mrcfps merged commit 1667c20 into main Mar 27, 2026
11 checks passed
@mrcfps mrcfps deleted the feat/nexu-official-model-refresh branch March 27, 2026 15:04
@lefarcen lefarcen mentioned this pull request Mar 30, 2026
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.

2 participants