Index of every page on this site: llms.txt
All skills
macro-inc avatar

/upgrade-model

@3e0a52a
by Macromacro-inc/macro6.4k stars
606
Run it yourself

Upgrade an AI chat model or its default selection across backend and frontend.

Use this Skill: https://skilld.dev/gh/macro-inc/macro/upgrade-model

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈23 tokens for metadata: the name and description. ≈702 when used: this file.

Description uses 1.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈94 characters, or 1.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Upgrade a chat model

Confirm the provider-qualified model ID and which callers should change: a selectable chat model, the paid/free default, or the internal Smart/Fast tier. These are separate choices; the application no longer has a two-entry CHAT_MODELS array in the cognition service.

Model definitions and routing

  • crates/agent/src/model/types.rs accepts provider/model IDs. Routing in crates/agent/src/model/router.rs selects the provider from that prefix.
  • crates/agent/src/model/predefined_model.rs defines the serialize-only PredefinedModel convenience enum and internal Smart/Fast defaults. Update its serialization, conversion, context window, and thinking parameters when the requested change affects one of those predefined models.
  • Check provider-specific behavior and speed support in crates/agent/src/model/ before assigning a new model the capabilities of its predecessor.
  • crates/chat/src/domain/models/model_access.rs owns the selectable chat CHAT_MODELS, PAID_DEFAULT_MODEL, and FREE_MODEL. Change the relevant catalog/default and preserve the intended plan restrictions.

The harness chat handler in services/agent_harness_service/src/cognition/api/stream/chat_message.rs validates and forwards request.model; it does not select an enum variant. There is no cognition core/model.rs or api/ws/chat_message/mod.rs to update.

Frontend and persisted selections

Update apps/web/src/lib/core/component/AI/constant/model.ts: the ID catalog, pretty names, provider icons, and relevant paid/free/database defaults. Search for the retired ID in callers and tests rather than assuming a particular input component contains it. Keep the frontend catalog aligned with the backend.

Check the pricing setup under crates/ai_billing and MacroDB pricing migrations; a new provider ID needs the corresponding pricing configuration.

When retiring a model, migrate saved selections as well. Routines (scheduled_action.task->>'model') and in-memory agents (agent_configs.default_model) persist their model. Follow crates/macro_db_client/migrations/20261019221542_upgrade_retired_claude_models.sql, keep the Macro-runtime scope, and bump the routine's configuration_revision. Create migrations through the sqlx-migration skill.

Validation

Run the affected agent, chat, and agent_harness_service tests, then the rust-validation skill. Run bun run check and the affected model-selector tests in apps/web.

If model schemas changed (including FreeTierModel), regenerate the frontend with bun run gen-api in apps/web and verify bun run gen-api -- --check. Regenerate SDK artifacts when their API specifications change. Resolve all new failures before handing off; report unrelated existing failures explicitly.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts20d3 checks · Risk SAFE
  • Gen Agent Trust Hub20d

    This skill provides a standard set of instructions for developers or agents to upgrade AI model references across a specific codebase. It involves editing internal configuration files and running local validation scripts. No security risks or malicious patterns were identified.

  • Socket20d

    No alerts

  • Snyk20d

    Risk: LOW · No issues

Signed by skilld at 3e0a52a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
What it can do
Runs commands Reads files Edits files
All 6 allowed tools
BashReadWriteEditGrepGlob

README badge

README badge for macro-inc/macro/upgrade-model