feat(sandbox): opt-in Costwise model routing hooks + ADR 0090 (POC) - #6361
Draft
guyoron1 wants to merge 4 commits into
Draft
feat(sandbox): opt-in Costwise model routing hooks + ADR 0090 (POC)#6361guyoron1 wants to merge 4 commits into
guyoron1 wants to merge 4 commits into
Conversation
Pip-install costwise from guyoron1/costwise and copy its Claude Code hook scripts to /opt/costwise/hooks. Not wired into settings.json by default; see internal/security for the FULLSEND_COSTWISE=1 opt-in (ADR 0090). Signed-off-by: guy oron <goron@redhat.com>
When FULLSEND_COSTWISE=1, GenerateClaudeSettings adds a UserPromptSubmit hook and an Agent|Task PreToolUse hook pointing at /opt/costwise/hooks. Default output is unchanged. Signed-off-by: guy oron <goron@redhat.com>
Phase 1: costwise hooks in the sandbox image (opt-in). Phase 2: native internal/routing port. Records the 2026-07-12 RTK+Ponytail benchmark. Signed-off-by: guy oron <goron@redhat.com>
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://3f0da899-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… 3 models) 39/39 trials complete with metrics.json; haiku $0.20-0.75/issue vs opus $0.33-4.30. No-op detection proved model-insensitive (#340, #365). Grid measures cost/completion only - quality judgment over the 13x3 outputs is the stated gate before routing defaults change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft / POC for the 2026-08-19 contributors meeting — not ready for review.
Phase 1 of cost-aware model routing (see ADR 0090 in this PR):
images/sandbox/Containerfile: install Costwise + its hook scripts under/opt/costwise/hooksinternal/security/hooks.go: whenFULLSEND_COSTWISE=1,GenerateClaudeSettingsaddsUserPromptSubmit/PreToolUse(Agent|Task)routing hooks. Default output is byte-identical (tested).docs/ADRs/0090-cost-aware-model-routing.md: context (July-12 30-issue benchmark on the full pipeline: RTK+Ponytail 15.7% total, triage 52.6%, code 24.2%, Wilcoxon p=0.00006), Phase 1 hooks vs Phase 2 nativeinternal/routingGo port.Known gaps (why draft): Costwise pinned to mutable
main(no release tag yet); sandboxCLAUDE_CONFIG_DIRvs where Costwise writes the model switch is unverified; ADR status set to Accepted only to satisfy the frontmatter linter — should be Proposed. Companion:fullsend-ai/agentsPR flipping triage→haiku / review→sonnet defaults.Verified:
go build ./...,go test ./internal/security/ ./internal/scaffold/, ADR linters.