Skip to content

Conversation

@ytsarev
Copy link
Member

@ytsarev ytsarev commented Nov 20, 2025

Description of your changes

Summary

Migrated intelligent RDS scaling from Sonnet to Haiku model, achieving 85%+ cost reduction on AI inference while maintaining decision quality.

Changes

  • Updated CronOperation to use claude-haiku-4-5 model (operations/rds-intelligent-scaling-cron)
  • Added automated e2e tests for deterministic part of the Configuration
  • Updated test credentials and configurations for v2 namespaced resources
  • Simplified prompt - thanks to reliable markdown sanitization, no verbose output constraints required anymore

Measured Cost Impact

Measured cost reduction: 85-89%

  • Sonnet baseline: ~$45-90/day
  • Haiku: ~$9.52/day

At 1-minute cron schedule (demo frequency):

  • Monthly savings: ~$1,500-2,400 per database
  • Annual savings: ~$18,000-29,000 per database

For production schedules (5-10 minute intervals), costs scale proportionally down while maintaining intelligent scaling benefits.

Dependencies

Requires function-claude v0.4.0 for reliable Haiku markdown sanitization.

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

  • Composition tests
 up test run tests/*
  ✓   Parsing tests
  ✓   Collecting resources
  ✓   Generating language schemas
  ✓   Checking dependencies
  ✓   Building functions
  ✓   Building configuration package
  ✓   Pushing embedded functions to local daemon
  ✓   Assert test-mysql
  ✓   Assert test-postgres
SUCCESS:
SUCCESS: Tests Summary:
SUCCESS: ------------------
SUCCESS: Total Tests Executed: 2
SUCCESS: Passed tests:         2
SUCCESS: Failed tests:         0
  • E2E Tests
 up test run tests/* --e2e

Full Validation

✅ Acceptance tests passing with Haiku model
✅ AI scaling decisions remain accurate and well-reasoned
✅ Clean event messages (markdown handling)
✅ Production metrics confirm 85%+ cost reduction
image

Signed-off-by: Yury Tsarev <yury@upbound.io>
Signed-off-by: Yury Tsarev <yury@upbound.io>
Signed-off-by: Yury Tsarev <yury@upbound.io>
@ytsarev ytsarev requested a review from a team November 21, 2025 11:12
@ytsarev ytsarev merged commit 8f9382b into upbound:main Nov 21, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants