Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/api/src/app/api/integrations/slack/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const SLACK_MODELS = [
{ value: "claude-sonnet-4-5", label: "Sonnet 4.5" },
{ value: "claude-opus-4-6", label: "Opus 4.6" },
{ value: "claude-sonnet-4-6", label: "Sonnet 4.6" },
{ value: "claude-opus-4-7", label: "Opus 4.7" },
{ value: "claude-haiku-4-5", label: "Haiku 4.5" },
] as const;

export const DEFAULT_SLACK_MODEL = "claude-sonnet-4-5";
export const DEFAULT_SLACK_MODEL = "claude-sonnet-4-6";
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function formatErrorForSlack(error: unknown): Promise<string> {
try {
const anthropic = new Anthropic({ apiKey: env.ANTHROPIC_API_KEY });
const response = await anthropic.messages.create({
model: "claude-3-5-haiku-latest",
model: "claude-haiku-4-5",
max_tokens: 256,
messages: [
{
Expand Down
2 changes: 2 additions & 0 deletions packages/db/drizzle/0047_backfill_slack_model_preferences.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
UPDATE "users__slack_users" SET "model_preference" = 'claude-sonnet-4-6' WHERE "model_preference" = 'claude-sonnet-4-5';--> statement-breakpoint
UPDATE "users__slack_users" SET "model_preference" = 'claude-opus-4-7' WHERE "model_preference" = 'claude-opus-4-6';
Comment on lines +1 to +2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Coding guideline violation: files in packages/db/drizzle/ must not be manually edited.

This file (and the accompanying edit to packages/db/drizzle/meta/_journal.json) are manually authored but live under the directory the guideline reserves exclusively for Drizzle-generated output. Drizzle cannot auto-generate data-only backfill migrations, so the common workaround is to keep hand-written data migrations outside the managed directory (e.g., packages/db/migrations/data/ or a dedicated scripts folder) and run them separately from the schema migration pipeline. Placing them here risks a future drizzle-kit generate run overwriting or conflating them.

As per coding guidelines: "Never manually edit files in packages/db/drizzle/ — these are auto-generated by Drizzle. Only modify schema files in packages/db/src/schema/."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/db/drizzle/0047_backfill_slack_model_preferences.sql` around lines 1
- 2, This PR inserted manual data-migration SQL (the two UPDATE statements
targeting "users__slack_users" model_preference values and the accompanying edit
to meta/_journal.json) into a Drizzle-managed output folder, which must not be
edited; move those UPDATE statements into a new standalone data-migration script
outside the Drizzle output tree (e.g., a dedicated migrations/data or scripts
folder) and remove the SQL and any manual changes to meta/_journal.json from the
Drizzle-generated directory so Drizzle outputs remain untouched, then run the
new script separately as part of deployment and/or document it in your migration
runbook.

Loading
Loading