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.
日本語の概要は準備中です。原文の説明を表示しています。
Upgrade an AI chat model (fast or good) across backend and frontend.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Upgrades the AI model used in the chat app. There are two model slots:
CHAT_MODELS)CHAT_MODELS)The user must specify which slot to upgrade and the new model name (e.g. claude-opus-4-6).
Ask the user (if not already provided):
fast or good?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)File: crates/agent/src/model/predefined_model.rs
Check if the enum variant already exists. If not, add all of the following:
Enum variant in pub enum Model (under the Anthropic section):
#[serde(rename = "{SERDE_NAME}")]
#[strum(serialize = "{SERDE_NAME}")]
{ENUM_VARIANT},
String constant in pub mod constants::models:
pub const {CONST_NAME}: &str = "{CONST_VALUE}";
Match arm in to_provider_model_string():
Model::{ENUM_VARIANT} => (ANTHROPIC, {CONST_NAME}),
Match arm in from_model_str():
{CONST_NAME} => Model::{ENUM_VARIANT},
File: crates/agent/src/model/predefined_model.rs
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.
Provider in fn provider():
Model::{ENUM_VARIANT} => Provider::Anthropic,
File: services/document_cognition_service/src/core/model.rs
CHAT_MODELS and update FALLBACK_MODEL.CHAT_MODELS.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.
cargo check -p agent -p document_cognition_service
Fix any compilation errors before proceeding.
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.
bun check to find frontend usagescd 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_MODELapps/web/src/lib/core/component/AI/component/input/useChatInput.tsx — hardcoded model referencesapps/web/src/lib/core/component/AI/signal/pendingSend.test.ts — test dataReplace old model strings and update display names.
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.
ExhaustiveMap type in constant/model.ts requires an entry for every model in the Model type, so missing entries will cause type errors.SMART_MODE_MODEL constant is the "good" model, DEFAULT_MODEL is the "fast" model.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
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.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.
日本語の概要は準備中です。原文の説明を表示しています。