Skip to content

chore: default scheduled-task model to Kimi K3 (moonshotai/kimi-k3) - #155

Merged
sweetmantech merged 2 commits into
mainfrom
chore/default-task-model-kimi-k3
Jul 23, 2026
Merged

chore: default scheduled-task model to Kimi K3 (moonshotai/kimi-k3)#155
sweetmantech merged 2 commits into
mainfrom
chore/default-task-model-kimi-k3

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

Change DEFAULT_TASK_MODEL (src/consts.ts:8) from anthropic/claude-sonnet-5moonshotai/kimi-k3.

This is the model used by customer-prompt-task for every scheduled customer briefing whose scheduled_actions.model column is null (the common case — e.g. the "Weekly Artist Briefing" actions). The resolution is taskConfig?.model ?? DEFAULT_TASK_MODEL in src/tasks/customerPromptTask.ts:51.

Why

Cost/latency: a single weekly briefing generation on Sonnet 5 cost ~106 credits (~2.6M input tokens). Kimi K3 is materially cheaper for the same headless report workload.

⚠️ Risk to verify before merge

Sonnet 5 was deliberately chosen here as an anti-hallucination safeguard. These tasks run headless — no human to catch a fabricated report before it emails a customer. Sonnet 5 respects the data-grounding rule (refuses to invent metrics) where the prior default (haiku-4.5) did not, verified on the OneRPM/Apache benchmark (recoupable/chat#1833).

Kimi K3's grounding behavior in headless runs has not been re-verified on that benchmark. If it fabricates numbers, customers receive false analytics. Recommend running the chat#1833 benchmark against moonshotai/kimi-k3 before merging, and reverting to anthropic/claude-sonnet-5 if it fails. Rationale is preserved inline in consts.ts.

Changes

  • src/consts.ts — flip default + update the rationale comment to flag the unverified grounding risk.
  • src/tasks/__tests__/customerPromptTask.test.ts — assert the new default (2 passed locally).

Test plan

  • npx vitest run src/tasks/__tests__/customerPromptTask.test.ts → 2 passed
  • Run chat#1833 data-grounding benchmark on moonshotai/kimi-k3
  • Spot-check one real scheduled briefing on Kimi K3 for fabricated metrics

🤖 Generated with Claude Code


Summary by cubic

Switch the default model for headless scheduled customer briefings from anthropic/claude-sonnet-5 to moonshotai/kimi-k3 to reduce cost and latency when the task config omits a model. Updated the model-default unit test; removed the Sonnet-5 grounding note from src/consts.ts (K3 grounding still unverified).

Written for commit 515cd25. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Updated the default model used for scheduled customer tasks to provide improved data grounding and verification.
  • Tests

    • Updated automated coverage to reflect the new default model selection.

Switch DEFAULT_TASK_MODEL from anthropic/claude-sonnet-5 to
moonshotai/kimi-k3 for headless scheduled customer tasks
(customer-prompt-task), for cost/latency.

Preserves the anti-hallucination rationale in a comment: Sonnet 5
was originally chosen because it respects the data-grounding rule
where haiku-4.5 did not (OneRPM/Apache benchmark, recoupable/chat#1833).
Kimi K3's grounding behavior in headless runs is NOT yet re-verified
on that benchmark — flagged inline and in the PR to verify before merge.

Updates the model-default unit test to assert the new value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2aeb6eb4-449f-4754-ad4d-8eb772db5764

📥 Commits

Reviewing files that changed from the base of the PR and between 5307dcf and 515cd25.

📒 Files selected for processing (1)
  • src/consts.ts
📝 Walkthrough

Walkthrough

The default task model changes from anthropic/claude-sonnet-5 to moonshotai/kimi-k3, with updated guidance comments and a matching customer prompt task test expectation.

Changes

Default task model

Layer / File(s) Summary
Update model default and test expectation
src/consts.ts, src/tasks/__tests__/customerPromptTask.test.ts
DEFAULT_TASK_MODEL now uses moonshotai/kimi-k3, and the default-model test expects that value.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: switching the default scheduled-task model to Kimi K3.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/default-task-model-kimi-k3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/consts.ts (1)

6-11: 🎯 Functional Correctness | 🔵 Trivial

Verify Kimi K3 grounding before enabling this fallback in production.

customerPromptTask uses DEFAULT_TASK_MODEL whenever scheduled_actions.model is missing or null, so this change affects real scheduled briefings. The test verifies model routing only; run the chat#1833 grounding benchmark and a real scheduled-briefing spot-check before merge, or retain Sonnet 5 until the result is confirmed.

🤖 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 `@src/consts.ts` around lines 6 - 11, Before enabling DEFAULT_TASK_MODEL as
moonshotai/kimi-k3, run the chat#1833 grounding benchmark and perform a real
scheduled-briefing spot-check covering the missing or null
scheduled_actions.model fallback. Retain anthropic/claude-sonnet-5 in
DEFAULT_TASK_MODEL until Kimi K3 is confirmed not to fabricate.
🤖 Prompt for all review comments with 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.

Nitpick comments:
In `@src/consts.ts`:
- Around line 6-11: Before enabling DEFAULT_TASK_MODEL as moonshotai/kimi-k3,
run the chat#1833 grounding benchmark and perform a real scheduled-briefing
spot-check covering the missing or null scheduled_actions.model fallback. Retain
anthropic/claude-sonnet-5 in DEFAULT_TASK_MODEL until Kimi K3 is confirmed not
to fabricate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e7b732fa-4c64-4771-8d45-2bb2c3889aa7

📥 Commits

Reviewing files that changed from the base of the PR and between 9e9c6da and 5307dcf.

📒 Files selected for processing (2)
  • src/consts.ts
  • src/tasks/__tests__/customerPromptTask.test.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/consts.ts">

<violation number="1" location="src/consts.ts:11">
P1: Scheduled customer briefings now use Kimi K3 for the common null-model case before its headless grounding has been verified, so a model regression can send fabricated metrics through the server-side email workflow. Keeping Sonnet 5 as the default until the chat#1833 benchmark passes would preserve the existing anti-hallucination safeguard.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/consts.ts
// (recoupable/chat#1833). Switching the default to Kimi K3 (cost/latency): its data-grounding
// behavior in headless runs has NOT yet been re-verified on that benchmark — re-run it before
// relying on this in production, and revert to anthropic/claude-sonnet-5 if it fabricates.
export const DEFAULT_TASK_MODEL = "moonshotai/kimi-k3";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Scheduled customer briefings now use Kimi K3 for the common null-model case before its headless grounding has been verified, so a model regression can send fabricated metrics through the server-side email workflow. Keeping Sonnet 5 as the default until the chat#1833 benchmark passes would preserve the existing anti-hallucination safeguard.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/consts.ts, line 11:

<comment>Scheduled customer briefings now use Kimi K3 for the common null-model case before its headless grounding has been verified, so a model regression can send fabricated metrics through the server-side email workflow. Keeping Sonnet 5 as the default until the chat#1833 benchmark passes would preserve the existing anti-hallucination safeguard.</comment>

<file context>
@@ -3,6 +3,9 @@ export const RECOUP_API_KEY = process.env.RECOUP_API_KEY;
+// (recoupable/chat#1833). Switching the default to Kimi K3 (cost/latency): its data-grounding
+// behavior in headless runs has NOT yet been re-verified on that benchmark — re-run it before
+// relying on this in production, and revert to anthropic/claude-sonnet-5 if it fabricates.
+export const DEFAULT_TASK_MODEL = "moonshotai/kimi-k3";
</file context>
Suggested change
export const DEFAULT_TASK_MODEL = "moonshotai/kimi-k3";
export const DEFAULT_TASK_MODEL = "anthropic/claude-sonnet-5";

Comment thread src/consts.ts Outdated
@sweetmantech
sweetmantech merged commit 32a5af0 into main Jul 23, 2026
3 checks passed
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.

1 participant