Skip to content

feat(evi): add a weekly cost and model watchdog - #562

Merged
HugoRCD merged 2 commits into
mainfrom
EVL-248/cost-watchdog
Aug 11, 2026
Merged

feat(evi): add a weekly cost and model watchdog#562
HugoRCD merged 2 commits into
mainfrom
EVL-248/cost-watchdog

Conversation

@evlogai

@evlogai evlogai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes EVL-248.

Adds the weekly cost/model watchdog: a Monday-morning schedule that pulls the AI Gateway spend by surface and model, compares it to the previous week, checks the current model landscape, and proposes per-surface model adjustments (or states that nothing needs to change).

  • apps/evi/agent/schedules/cost-watchdog.ts: weekly cron (Monday 08:00 UTC), clear of the digest (05:00), upstream-sync (Mon/Thu 07:00) and self-review (Wed 08:00). Monday keeps the report aligned to complete calendar weeks.
  • apps/evi/agent/skills/cost-watchdog/SKILL.md: the procedure, grounded in the actual report shape (group_by: tag returns the evi:env:* total plus one evi:surface:* row per surface). It pulls the last 7 full days and the 7 days before for drift, researches the model landscape on the web with sources, and delivers the full report as a Linear document with the top finding in the thread. Material recommendations become Linear issues; a quiet week is a one-line "nothing to improve".
  • apps/evi/docs/notes.md: records the report shape so the next reader does not rediscover it.

Checks, run in /workspace/repo on the branch:

  • lint: clean (the schedule file; markdown is not linted)
  • typecheck: clean after pnpm run dev:prepare rebuilds packages/evlog/dist. The sandbox dist was stale (predated the distinctIdField addition in the posthog adapter), which initially surfaced as a typecheck error in agent/hooks/evlog.ts on clean main; rebuilding the workspace package clears it. CI runs the same build step.
  • test: 91 passed (15 files)

No changeset: the change is confined to apps/evi, which never needs one.

@evlogai
evlogai Bot requested a review from HugoRCD August 11, 2026 19:27
@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a0a766b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 11, 2026 7:42pm
evlog-docs Ready Ready Preview, v0 Aug 11, 2026 7:42pm
evlog-render-lab Ready Ready Preview Aug 11, 2026 7:42pm
evlog-telemetry Ready Ready Preview Aug 11, 2026 7:42pm
just-use-evlog Ready Ready Preview Aug 11, 2026 7:42pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@evlog/cli@562
npm i https://pkg.pr.new/evlog@562
npm i https://pkg.pr.new/@evlog/nuxthub@562
npm i https://pkg.pr.new/@evlog/telemetry@562

commit: a0a766b

@evlogai

evlogai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review comment on cost-watchdog/SKILL.md: added a Resources section with real links so a run goes straight to the sources instead of searching, and pointed the model-landscape step at them.

  • https://ai-gateway.vercel.sh/v1/models — the AI Gateway model catalog as JSON, pricing and capabilities per model in one fetch (verified live, no auth needed)
  • https://vercel.com/ai-gateway/models — the human-readable models browser
  • https://vercel.com/docs/ai-gateway/models-and-providers — the docs
  • https://arena.ai/leaderboard — ex-LMArena, blind A/B human-preference Elo
  • https://artificialanalysis.ai/ — independent Intelligence Index, Cost per Task and speed

web_search remains only as a fallback for what the links do not cover. No code changed; lint/typecheck/test unaffected.

@HugoRCD
HugoRCD merged commit 54364e5 into main Aug 11, 2026
17 of 18 checks passed
@HugoRCD
HugoRCD deleted the EVL-248/cost-watchdog branch August 11, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant