feat: orchestration quota, streaming, tools, classify, and vision APIs#38
Merged
stackbilt-admin merged 3 commits intomainfrom Apr 12, 2026
Merged
feat: orchestration quota, streaming, tools, classify, and vision APIs#38stackbilt-admin merged 3 commits intomainfrom
stackbilt-admin merged 3 commits intomainfrom
Conversation
H-1: Add pre-flight cost guard to tool loop — uses previous iteration's cost as estimate to prevent obvious maxCostUSD overshoots. M-1: Strip markdown fences before brace extraction in classify() JSON parser so ```json...``` responses parse correctly. M-2: Make default vision model configurable via defaultVisionModel on ProviderFactoryConfig, falling back to hardcoded defaults. M-3: Fix Groq healthCheck indentation drift (6→4 space artifact). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: orchestration quota, streaming, tools, classify, and vision APIs
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.
Summary
Merges the stacked work from #37 (which landed on
fix-factory-contract-bugs) into main.Includes:
getProviderBalance()with ledger + provider API sourcesgenerateResponseStream()with pre-first-chunk fallbackQuotaHookwithquotaFailPolicy: 'closed' | 'open'generateResponseWithTools()tool-loop helperclassify()JSON response parsing + confidence extractionanalyzeImage()+ vision-capable model routingPlus CodeBeast review fixes (H-1 tool loop cost guard, M-1 JSON fence stripping, M-2 configurable vision model, M-3 Groq indent fix).
All 184 tests passing, tsc clean.
Test plan
npm test— 184 tests passnpm run typecheck— clean🤖 Generated with Claude Code