본문으로 건너뛰기
cccskills
무료GitHub에 공개

upgrade-model

Upgrade an AI chat model (fast or good) across backend and frontend.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Upgrade Chat Model

Upgrades the AI model used in the chat app. There are two model slots:

  • fast (Enter): default/fallback model (first entry in CHAT_MODELS)
  • good (Cmd+Enter): smart mode model (second entry in CHAT_MODELS)

The user must specify which slot to upgrade and the new model name (e.g. claude-opus-4-6).

Steps

1. Determine the change

Ask the user (if not already provided):

  • Which slot: fast or good?
  • What is the new model name? (e.g. claude-opus-4-6)

Derive from the model name:

  • SERDE_NAME: the kebab-case model ID sent over the wire (e.g. claude-opus-4-6)
  • ENUM_VARIANT: PascalCase variant name (e.g. Claude46Opus)
  • CONST_NAME: SCREAMING_SNAKE constant name (e.g. CLAUDE_46_OPUS)
  • CONST_VALUE: display string used by the frontend/provider (e.g. claude-4.6-opus)
  • PRETTY_NAME: human-readable name (e.g. Claude Opus 4.6)

2. Add model to AI crate (if it doesn't already exist)

File: crates/agent/src/model/predefined_model.rs

Check if the enum variant already exists. If not, add all of the following:

  1. Enum variant in pub enum Model (under the Anthropic section):

    #[serde(rename = "{SERDE_NAME}")]
    #[strum(serialize = "{SERDE_NAME}")]
    {ENUM_VARIANT},
    
  2. String constant in pub mod constants::models:

    pub const {CONST_NAME}: &str = "{CONST_VALUE}";
    
  3. Match arm in to_provider_model_string():

    Model::{ENUM_VARIANT} => (ANTHROPIC, {CONST_NAME}),
    
  4. Match arm in from_model_str():

    {CONST_NAME} => Model::{ENUM_VARIANT},
    

File: crates/agent/src/model/predefined_model.rs

  1. Metadata in fn metadata():

    Model::{ENUM_VARIANT} => ModelMetadata {
        context_window: 200_000,
    },
    

    Use the correct context window for the model. Anthropic models are typically 200,000.

  2. Provider in fn provider():

    Model::{ENUM_VARIANT} => Provider::Anthropic,
    

3. Update DCS constants

File: services/document_cognition_service/src/core/model.rs

  • If upgrading the fast slot: change the first entry in CHAT_MODELS and update FALLBACK_MODEL.
  • If upgrading the good slot: change the second entry in CHAT_MODELS.

4. Update DCS chat message handler

File: services/document_cognition_service/src/api/ws/chat_message/mod.rs

Search for the old model variant being used in the model selection logic (e.g. Model::Claude45Opus). Update it to the new variant.

5. Verify Rust compiles

cargo check -p agent -p document_cognition_service

Fix any compilation errors before proceeding.

6. Generate frontend types

Run from apps/web/:

cd apps/web && bun install && bun run gen-api

This builds all Rust OpenAPI and models binaries from local code, generates openapi.json, runs orval for TypeScript types, and generates model.ts from the local models binary. All generated files will reflect your local Rust changes.

7. Run bun check to find frontend usages

cd apps/web && bun check

This will report TypeScript errors everywhere the old model string is used. Fix each one. Common locations:

  • apps/web/src/lib/core/component/AI/constant/model.ts — MODEL_PRETTYNAME, MODEL_PROVIDER_ICON, SMART_MODE_MODEL / DEFAULT_MODEL
  • apps/web/src/lib/core/component/AI/component/input/useChatInput.tsx — hardcoded model references
  • apps/web/src/lib/core/component/AI/signal/pendingSend.test.ts — test data

Replace old model strings and update display names.

8. Format and verify

cd apps/web && bun format && bun check

The only errors remaining should be pre-existing ones unrelated to models (e.g. three, @aws-crypto/sha256-js type issues). All model-related errors must be resolved.

Finally, run the CI check:

cd apps/web && bun run gen-api -- --check

This must pass.

Notes

  • We only support Anthropic models for chat. Other providers exist in the AI crate but are not used for the chat feature.
  • The ExhaustiveMap type in constant/model.ts requires an entry for every model in the Model type, so missing entries will cause type errors.
  • The SMART_MODE_MODEL constant is the "good" model, DEFAULT_MODEL is the "fast" model.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped. Use when `just coverage` fails, or after adding an endpoint to a Rust service.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

add-tour

무료

Add or change an in-app feature tour (a view's guided flyover) in the web app. Use when adding a tour to a view, adding or editing tour steps, pointing a step at a new control, or when a step's target needs something opened first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

audit

무료

Post-change checks before handing off. Works out which checks apply from the files changed (directory AGENTS.md Checks sections and matching .agents/rules), runs or verifies each, and reports pass/fail/skipped. Use before saying work is done, before pushing, or when asked to audit or verify a change.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

Enforce hexagonal architecture in the Rust backend. Use before modifying crates/ or Rust services, especially inbound axum/tool/listener adapters, domain services/ports, outbound adapters, authorization, permissions, database access, or external clients.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

Use when adding collaborative markdown, notes, or descriptions to a feature with collab surfaces. Covers parent entities, service entry points, authorization, content storage, and lifecycle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

macro-inc/macro4.8천2026년 10월 20일 업데이트

macro-inc의 스킬 모두 보기

이 스킬의 문제 신고